This project applies a CUDA-accelerated box filter to a large set of monochrome texture images from the USC-SIPI Image Database - Textures Volume. The objective is to demonstrate high-throughput GPU processing of real-world image datasets, with a focus on scalability, performance, and batch automation.
- Purpose: Enhance texture images by applying a uniform box filter to reduce noise and improve clarity.
- Dataset: 64 TIFF grayscale images from the USC-SIPI texture collection.
- Technology: NVIDIA CUDA, C++14, OpenCV
- Kernel: Custom box filter implemented using shared memory for efficiency.
- CUDA Toolkit (tested on CUDA 11+)
- OpenCV 4.x (
libopencv-dev
) - C++14 compiler
- Linux system with NVIDIA GPU (sm_61+ recommended)
Install OpenCV (if not already installed):
sudo apt-get install libopencv-dev
Compile using the provided Makefile
:
make
Or manually:
nvcc -O2 -std=c++14 `pkg-config --cflags opencv4` \
-Iincludes src/main.cu src/image_utils.cpp \
-o textures_cuda `pkg-config --libs opencv4` -lcudart
Run the binary and specify the image folder and output path:
./textures_cuda <input_folder> <output_folder> <filter_width>
Example:
./textures_cuda textures outputs 5
input_folder
: Path to folder with.tiff
texture imagesoutput_folder
: Where to save processed imagesfilter_width
: Size of the box filter kernel (must be odd, e.g., 3, 5, 7)
You can also use the helper script:
bash run.sh
The images are from the USC-SIPI Textures Volume. Download the zip or tar:
wget http://sipi.usc.edu/database/zip/textures.zip
unzip textures.zip -d textures/
A sample set of before-and-after .tiff
images, processing logs, and batch summaries are included.
Examples:
Original Image | Filtered Image |
---|---|
![]() |
![]() |
images/1.1.01.tiff |
output/1.1.01.tiff |
Made by Aditi Saxena