Hardware-based image processing system implemented in Verilog with supporting Python scripts for handling .bmp
↔ .mem
conversions.
Supports both basic pixel filters (invert, grayscale, brightness, color filters) and convolution-based filters (blur, sharpen, sobel, emboss, outline).
ImageProc-Verilog/
├── images/ # Input & output images
│ ├── all_images/
│
├── scripts/ # Python helper scripts
│ ├── bmp_to_mem.py # BMP -> .mem
│ ├── kernel_mem_generator.py # BMP -> 3x3 kernel neighborhood
│ ├── mem_to_bmp.py # .mem -> BMP
│
├── verilog/
│ ├── tb_convolution.v/ # Simple pixel-based filters
│ └── tb_image_proc.v/ # Convolution testbench + tb_convolution.v
│
└── README.md # This file
- Place your test image (e.g.,
test.bmp
) intoimages/input/
cd scripts
python bmp_to_mem.py
Generates input.mem
inside images/mem/
.
python kernel_mem_generator.py
Produces kernel_input.mem
for convolution filters.
- Open Vivado, set simulation top to the required testbench (e.g.,
tb_convolution
andtb_image_proc
). - Run simulation to produce
.mem
outputs inimages/mem/
.
python mem_to_bmp.py
Converts .mem
files (blur.mem, sobel_edge.mem, etc.) back into .bmp
inside images/output/
.
- Invert
- Grayscale
- Brightness Increase / Decrease
- Red / Green / Blue channel filters
- Blur (average filter)
- Motion Blur (diagonal)
- Sharpen
- Sobel Edge Detection
- Emboss
- Outline
Below are the outputs generated by the Verilog image processing system.
All images are located in images/output/
.
- Vivado 2024.2 (or compatible)
- Python 3.8+
Pillow
library for image handling
Install dependencies:
pip install pillow
This project is for learning and experimentation. Free to use and adapt.