This project performs edge detection on images using a multithreaded convolution algorithm.
- OpenCV 4
- C++11 compliant compiler
- pthread library
Ensure that all prerequisites are installed before proceeding.
From the project's root directory, open a terminal and run:
makeAlternatively, compile manually with:
g++ -std=c++11 -O2 -Wall -o edge_detection src/main.cpp `pkg-config --cflags --libs opencv4` -lpthreadAfter a successful compilation, run the program using:
./edge_detection <input_image> <num_threads>For example, to process different images with 4 threads:
./edge_detection images/1MP.jpg 4
./edge_detection images/2MP.jpg 4
./edge_detection images/4MP.jpg 4
./edge_detection images/8MP.jpg 4
./edge_detection images/16MP.jpg 4
./edge_detection images/32MP.jpg 4The command takes the specified input image (e.g., images/1MP.jpg), processes it using the designated number of threads (e.g., 4), and saves the output image as output_1MP.jpg in the current directory.