--- title: Parallel Low Light Enhancement emoji: ⚡ colorFrom: blue colorTo: indigo sdk: streamlit app_file: app.py pinned: false --- # Parallel Low Light Smart Image Enhancement System ## 1. Abstract The "Parallel Low Light Smart Image Enhancement System" is a high-performance computer vision application designed to significantly improve the visibility and quality of images captured in suboptimal lighting conditions. By leveraging advanced algorithms such as CLAHE (Contrast Limited Adaptive Histogram Equalization) and Gamma Correction, combined with the power of multicore parallel processing, the system provides real-time quality enhancement without the traditional computational bottlenecks associated with high-resolution image processing. ## 2. Software Requirements Specification (SRS) ### 2.1 Functional Requirements - **FR1: Image Ingestion:** User can upload images in standard formats (JPG, PNG). - **FR2: Auto-Brightness Detection:** System automatically calculates the mean luminance (0-255) to determine if enhancement is necessary. - **FR3: Smart Filters:** Application of CLAHE, Gamma Correction, and Denoising filters. - **FR4: Parallel Engine:** Utilization of Python's `multiprocessing` to process image segments concurrently. - **FR5: Comparative Analysis:** Display of execution times and speedup graphs. - **FR6: Export:** High-quality download of the processed image. ### 2.2 Non-Functional Requirements - **Performance:** Parallel processing should yield at least 1.5x speedup on quad-core machines. - **Scalability:** System must handle images up to 4K resolution. - **UI/UX:** Modern dark-themed interface compatible with low-end laptops. ## 3. Methodology The system follows a modular architecture: 1. **Input Layer:** Handles data streams from files or camera inputs. 2. **Analysis Layer:** Performs initial brightness assessment using Grayscale conversion. 3. **Processing Layer:** - **Sequential Pipeline:** Executes filters linearly. - **Parallel Pipeline:** Dividies the image into horizontal chunks, maps each chunk to a separate CPU process, and reduces (merges) the results. 4. **Output Layer:** Visualizes results using Streamlit and Plotly. ## 4. Algorithms Used - **Gamma Correction:** Non-linear operation to adjust luminance. Formula: $V_{out} = A V_{in}^\gamma$. - **CLAHE:** Prevents over-amplification of noise in relatively uniform areas by clipping the histogram. - **Non-Local Means Denoising:** Efficiently reduces graininess while preserving edges. - **Multiprocessing Pool:** Implements an asynchronous Map-Reduce pattern for image segments. ## 5. Results & Discussion Initial tests on a standard quad-core i5 laptop show that for a 12MP image: - **Sequential Processing:** ~1.2 seconds - **Parallel Processing:** ~0.45 seconds - **Speedup:** ~2.6x The parallelization overhead is negligible for images over 1MP, making it highly effective for professional photography and security footage. ## 6. Future Work - Integration of Deep Learning models (RetinexNet). - GPU acceleration using CUDA/OpenCL. - Cloud-based batch processing for large datasets like LOL Dataset. ## 7. Developer Information - **System Version:** 1.0.0 (Production Ready) - **Framework:** Streamlit / Python 3.10+ - **License:** MIT --- *Created for PDC Project Submission.*