I used multithreading to improve performance, ensuring thread safety with mutexes like ImageMutex and PixelMutex to prevent shared resource access conflicts. To synchronize threads, I utilized condition variables. For instance, a resizing operation waits until all processing tasks are complete before beginning

Furthermore, I implemented task-based parallelism with a custom Farm class. This class enqueues tasks and distributes them across multiple threads, handling load balancing effectively. The combination of mutexes and this task-based approach made the program both scalable and robust.

The goal of this project was to enhance the quality of dark images by using parallel programming. Poor lighting often results in images with low visibility, so I developed an efficient application to enhance these images, especially for high-resolution datasets. Speed and efficiency were key priorities, and parallel processing provided the ideal solution.

Application Overview

I built the application using the OpenCV library, starting with a simple process: it loads an image and looks at each pixel to decide whether it needs a boost. If the algorithm spots a pixel with low saturation, it enhances it by doubling its BGR values to bring out more vibrancy.

Parallelization and Implementation

Parallel Image Enhancement

On top of that, I added a few extra touches—like median blur, weighted filtering, and detail refinements. These enhancements aren’t applied everywhere but are targeted to specific regions of interest (ROIs). That way, the program focuses its resources where they’ll have the most impact. I chose median blur in particular because it does a great job of reducing noise without blurring important edges, which makes the final result look much cleaner and more natural.