FPGA-based low-light image enhancement using Retinex algorithm and coarse-grained reconfigurable architecture Authors: S Munaf, A Bharathi, A N Jayanthi Published: 2024 ABSTRACT AbstractAdvancements in digital imaging and video processing are often challenged by low-light environments, leading to degraded visual quality. This affects critical sectors such as medical imaging, aerospace, and underwater exploration, where uneven lighting can compromise safety and clarity. To enhance image quality in low-light conditions using a computationally efficient system. This paper introduces an FPGA-based system utilizing the Retinex algorithm for low-light image enhancement, implemented on a Coarse-Grained Reconfigurable Architecture (CGRA). The system is designed using Verilog HDL on a Xilinx FPGA, prioritizing hardware optimization to achieve high-quality outputs with minimal latency. The system achieves a processing rate of 60 frames per second (fps) for images with a resolution of 720 × 576. Quantitative evaluations show a Peak Signal-to-Noise Ratio (PSNR) improvement to 43.18 dB, a Structural Similarity Index (SSIM) of 0.92, and a Mean Squared Error (MSE) reduction, demonstrating significant enhancements in image quality. The design also achieves a low power consumption of 0.186 W and efficient resource utilization, with only 2.2% of Slice LUTs and Slice Registers used. The FPGA-based system demonstrates significant improvements in image quality with high computational efficiency, proving beneficial for critical applications in various sectors.Keywords: CGRA, FPGA, Low-light enhancement, Retinex, Image processing, Gaussian filterSubject terms: Health care, Engineering Introduction The Retinex theory1 serves as a basis for understanding and improving image quality under varying lighting conditions. It separates an image into the product of illumination and reflectance components. This helps in enhancing images where lighting is uneven or insufficient. This theory is especially relevant in the context of advanced digital camera technologies and integrated chip systems, which have pushed the boundaries of research in image processing. The advent of High Dynamic Range Images (HDRI)2 marks a significant advancement in this field. HDRI allows for a more dynamic presentation of visual information, overcoming the limitations of traditional digital cameras. These typically exhibit a dynamic range of 212 dB per channel, which often gets reduced to about 28 dB due to system constraints. In contrast, the human eye can process a much broader dynamic range in real-time, estimated between 120 to 180 dB. To bridge the gap between human visual perception and digital imaging, various adaptive methods have been developed3. These methods enhance the clarity, color, and visibility of images under diverse illumination levels. For instance, algorithms like the Retinex are used to adjust the brightness and contrast of images to mimic the human eye’s ability to perceive details in both brightly lit and shadowed areas. Non-uniform illumination remains a challenge in image processing, particularly in conditions like backlighting4 or presence of bright sources in dark settings. This often results in loss of detail due to overexposure or underexposure in parts of the image. The Retinex technique addresses these issues by simplifying the enhancement process through effective use of algorithms that manipulate pixel data on both a global scale (considering the overall image structure)5 and a local scale (focusing on pixel-level details), thus maintaining image integrity and detail. The implementation of Retinex-based models and algorithms has revolutionized the field of image synthesis, allowing for more accurate simulations of light distribution and realistic rendering of scenes. This not only improves the practical visual appearance of images but also ensures that they closely resemble the modeled scenes, irrespective of the lighting conditions. Related work The need to enhance image brightness and contrast is a crucial aspect of both human and machine vision, driven by the need to optimize visual data in varying light conditions. Various techniques, such as gamma correction, histogram equalization, and tone mapping, have been proposed and developed over the years to address these challenges effectively. Wang and Zhang6 presents a global attention related Retinex network for enhancing low-light images. The technique incorporates a novel global attention module into the Retinex framework to capture channel and spatial attention, significantly improving feature extraction from images captured in poor lighting. Evaluation metrics are used, with GARN showing improvements over existing methods, for instance, achieving a PSNR of 21.48, SSIM of 0.88, NIQE of 3.87, and Entropy of 7.51 on one of the datasets. The main advantage of this method is its ability to effectively recover details in dark regions and reduce colour distortions, which are common issues in other low-light enhancement techniques. However, the complexity introduced by the global attention mechanism might impact the computational efficiency, represents a challenge for real-time applications. With the use of a noise map, the Retinex model for low-light image enhancement proposed by Li et al.7 is able to better handle intense noise in dark images. This method effectively solves problems by using an optimization function that incorporates new regularization terms for the illumination and reflectance components and by using an alternating direction minimization algorithm based on augmented Lagrange multipliers, which does not use logarithmic transformation. This technology has the potential to improve low-light photos by reducing intense noise while maintaining fine-grained structures. It could also be used to enhance underwater or remote sensing images. A new approach to low-light picture enhancement, CA&R Net, was introduced by Wang et al.8. It combines the attention mechanism with the Retinex model to improve images by addressing issues like underexposure, colour distortion, and noise. The methodology depends on developing an attention map that guides the enhancement process adaptively, focusing more on underexposed areas without over-amplifying properly exposed regions. It also jointly predicts the illumination layers of images, which helps in achieving better results. The main merit of this approach is its advanced handling of underexposure and noise, significantly improving image quality. The complexity might impact the model’s computational efficiency, which could be a potential drawback for real-time applications. A Retinex-based network for low-light picture augmentation that incorporates a Decom-Net, Denoise-Net, and Relight-Net is introduced by Hai et al.9 called R2RNet. The aim of these subnets is to improve contrast and brightness in images, decrease noise, and decompose images into illumination and reflectance maps, respectively. In order to maintain details while reducing noise, the network makes use of both spatial and frequency information. Notable for its improved generalizability to current situations, it was trained using a newly-created dataset of real-world low/normal-light image pairs. The paper evaluates the network using PSNR and SSIM metrics, where R2RNet shows superior performance. A key advantage of this approach is its robustness in enhancing visual quality and facilitating high-level visual tasks like face detection. A Variational Retinex Model with Structure-Awareness Regularization is presented by Zhang et al.10 as a means of improving low-light images. By adding a structure-awareness regularization term to the classic total variational Retinex model, this model-based method improves the interplay between global spatial smoothness and feature recovery. Unlike learning-based methods, this model does not rely on extensive training data or architecture engineering, making it robust and generalizable across various conditions without the need for super-parameter tuning. For instance, the PSNR and SSIM values show significant improvements, indicating enhanced image quality and detail preservation. The primary advantage of this approach is its flexibility and effectiveness, allowing deployment as a pre-processing subroutine for higher-level computer vision applications. Duong et al.11 discusses DMT-Net, an advanced approach for enhancing low-light images using a deep multiple networks architecture based on the Retinex model. This method operates within the YCbCr color space, deploying four distinct sub-networks. Each designed to mitigate specific enhancement tasks such as noise reduction, illumination boost, and color distortion correction. The evaluation metrics used to assess the performance include PSNR, SSIM, and no-reference metrics like NIQE, with notable improvements over other existing methods. The proposed approach has demonstrated efficacy in producing visually pleasing enhancements while preserving natural color and detail, highlighting its potential superiority in handling low-light conditions effectively. In their paper on Retinex-Based Low-Light Image Enhancement, Park et al.12 present a Dual Autoencoder Network that uses layered and convolutional autoencoders to improve low-light images. This network addresses both brightness enhancement and noise reduction simultaneously. This method uses a convolutional autoencoder to deal with reflectance noise reduction and a stacked autoencoder to estimate a spatially smooth illumination component. Performance evaluation involves comparative assessments with existing methods using metrics such as PSNR and SSIM. The proposed model shows improvements in enhancing image visibility without introducing noise, making it beneficial for applications like surveillance and remote sensing. Huang et al.13 presents a low-light image enhancement network called Retinex with attention network, which utilizes both the Retinex model and an attention mechanism. This method allows for specific improvement by first estimating the input image’s illumination mask. The network uses an attention mechanism to enhance feature extraction, improving the prediction of illumination maps. The enhanced images are then obtained by modifying color distortions and suppressing noise through convolutional layers. The effectiveness of the method is demonstrated using different metrics, showing significant improvements over existing methods in handling uneven lighting and maintaining color fidelity. The main advantages include better handling of localized light variations and enhanced detail preservation. However, the complexity of the model and potential computational demands might limit its real-time application capabilities. In order to improve low-light images, Zhang and Wang14 present the Multi-Scale Attention Retinex Network (MARN). This network uses a multi-scale attention module in conjunction with a novel illuminance-attention map to forecast a comprehensive inverse illumination map, which in turn greatly improves picture quality in a variety of lighting scenarios. This method enhances image visibility and detail by combining local and global elements. MARN is evaluated using multiple metrics including PSNR, SSIM, and colorfulness index, achieving superior performance compared to existing methods. The primary merits of MARN include its ability to handle images with complex lighting, preserve natural colours, and maintain image details. However, its potential demerits may involve computational complexity due to the multi-scale processing and the advanced architecture that might affect real-time processing capabilities. Additionally, the method’s performance is highly reliant on the effective training of its attention mechanisms, which can be challenging and resource intensive. In order to improve low-light images in a way that is more natural and consistent with human vision, Chen et al.15 present an attention-based Retinex network that uses deep learning. This method trains and decomposes illumination and reflectance maps using paired low-light and normal-light images. An attention mechanism is then applied during the convolution process to refine the illumination adjustment, enhancing image brightness, reducing noise, and improving color reproduction. In order to measure the efficacy of the network, measurable standards like PSNR and SSIM are used. To give only two examples, it outperforms various methodologies with a PSNR of 22.5792 and an SSIM of 0.9063. The main benefits of this method include less noise, improved brightness and color accuracy, and improved handling of low-light images. But, the method’s generalizability to varied real-world situations may be affected if paired training data is not available, which can limit its application in such situations. Lv et al.16 introduces an innovative attention-guided enhancement approach that effectively addresses the challenges of low-light image enhancement through a multi-branch CNN. This technique utilizes two types of attention maps—one for underexposed areas and another for noise detection—to guide the enhancement process, ensuring more precise brightness adjustments and effective denoising. A novel large-scale synthetic low-light dataset is useful for training and testing the approach because it gives a variety of low-light situations. Outperforming the state-of-the-art on several datasets in terms of both quantitative measurements and visual quality is one of the significant achievements. An outstanding PSNR of 25.24 and SSIM of 0.94 were shown by the method. The suggested network is advanced, and it uses synthetic data for training, which would make it unsuitable for use in the actual world without such controlled settings. Additionally, the computational demands of handling multiple attention-guided processes concurrently could pose challenges for real-time applications. Retinex Decomposition and Multi-scale Adjustment (RDMA) is a low-light picture improvement approach introduced by Li et al.17. Using a framework that allows for multi-scale adjustments to an image’s reflectance and lighting, this method combines a feature interaction module with a feature fusion module. By enhancing color integrity, detail visibility, and noise reduction, this technique greatly improves the decomposition and enhancement quality. RDMA outperforms state-of-the-art approaches in common measures like PSNR and SSIM, with remarkable outcomes (e.g., PSNR of 23.92 and SSIM of 0.847). The pros lie in its robust handling of various image degradation issues and superior performance on qualitative and quantitative grounds. However, its complex multi-scale processing might hinder its computational efficiency, potentially limiting real-time application use. The three-stage deep learning-based architecture for low-light image improvement proposed by Lv et al.18 uses bilateral learning and Retinex decomposition to improve fusion refinement, attention-guided illumination adjustment, and reflectance and illumination decomposition. The approach utilizes bilateral grids for decomposition, integrating attention mechanisms to preserve edge details while adjusting illumination. The network further refines results through adversarial learning to enhance naturalness and authenticity. Performance is evaluated using PSNR, SSIM, and a color difference metric (ΔE*), with the method achieving robust scores, such as PSNR of 20.56 and SSIM of 0.86 on the SICE* dataset. This indicates superior handling of color fidelity and detail retention compared to existing methods. The multi-stage process, while effective in improving image quality under varied lighting conditions, might be computationally intensive, potentially limiting its real-time application. To increase image quality in low-light conditions, Wang et al.19 introduce an optimization approach for low-light image enhancement that combines frame accumulation with multi-scale Retinex processing. The technique focuses on increasing the structural similarity index (SSIM) and peak to signal noise ratio of images, achieving a PSNR increase to 51.2041 dB from the original 35.9408 dB and an SSIM enhancement to 0.75. The method’s strength lies in its ability to preserve more image details and edges, enhance grayscale resolution, and reduce color distortion and aperture artifacts. However, the complexity of the process involving frame accumulation and multi-scale adjustments could potentially limit its application in real-time processing scenarios, where faster and less computationally intensive solutions might be preferable. A novel low-light image enhancement method is proposed in20 via Retinex-inline cycle-consistent generative adversarial network named Cycle-Retinex, whose training is totally dependent on unpaired datasets. Specifically, Retinex theory with CycleGAN is combined, by which low-light image enhancement task is decoupled into two sub-tasks, i.e. illumination map enhancement and reflectance map restoration. Retinex theory helps CycleGAN simplify low-light image enhancement problem and CycleGAN provides synthetic paired images to guide the training of Retinex decomposition network. a self-augmented method is introduced to address the color distortion and noise problem, thus making the network learn to enhance low-light images adaptively. Extensive experiments show that this method can achieve promising results. A MER-Retinex (Multiscale Expansion Reconstruction Retinex) algorithm is proposed in21 that integrates attention mechanism and multi-scale expansion pyramid reconstruction. It includes two parts: decomposition and enhancement module. In the decomposition module, two U-shaped networks are used to decompose the image into reflectance and illumination, then, use multi-layer convolution to expand the field of perception and improve the ability to decompose the image to obtain reflectance and illumination. In the enhancement module, a U-shaped network is used to fuse multi-scale expansion pyramids with a multi-attention mechanism to enrich image information, increase image brightness, and fuse the processed global information with local information to enhance the recovered image details. In the enhanced reconstruction section super-resolution techniques are used to enhance and denoise image feature details. Experimental analysis of the MER-Retinex algorithm was carried out on the LOL dataset. The PSNR of the algorithm in this paper was 25.26 and the NIQE was 3.43. The algorithm in this paper can effectively solve the problems of blurred images and poor visual effects, and has improved in both subjective perception and objective evaluation indexes. A robust Retinex-based model is proposed in22 with reflectance map re-weighting that can improve the brightness level of the low-light image and re-balance the brightness concurrently. An alternating scheme is proposed to solve this model, in which the illumination map, reflectance map, and weighting map are updated iteratively. By utilizing the regularization terms, the noise is well-suppressed during the process. An initialization scheme for the weighting map is also proposed to make model adaptable to a wide range of light conditions. A variational model is introduced with an explicitly constructed re-weighting prior and the associated weighing map concept for the reflectance map. It can estimate the reflectance map, suppress noise, and re-balance the brightness simultaneously. A series of experimental results on a variety of popular datasets demonstrate the efficacy of method and its superiority in enhancing real low-light images when compared to other state-of-the-art methods. A new method Maximum Decomposition Diffusion Enhancement (MDDE) for low light image enhancement is proposed in23. This method combines the advantages of Retinex theory and diffusion models, making the model physically interpretable and improving the contrast of low light images, making the images clearer. This method is divided into two modules: Maximum Value Decomposition Module and Diffusion Enhancement Module. The Maximum Value Decomposition Module is mainly based on Retinex theory and decomposes the image into illumination and reflection maps based on the maximum value of the three channels of the image. The Diffusion Enhancement Module is divided into two modules: Enhanced Illumination Diffusion Module and Final Enhanced Diffusion Module. This module mainly implements the image processing of low light images based on the diffusion probability model. The experiment shows that this method produces clearer images compared to other methods. The Retinex method primarily involves estimation and normalization phases to refine image quality. An enhanced multi-scale global Retinex algorithm proposes using varied Gaussian filters to systematically calculate and fuse background information from each frame, leading to a more accurate and detailed enhancement. Research gap In spite of advancements in image processing techniques, many of the current solutions are either computationally intensive or limited in their effectiveness when applied to real-time systems. Traditional software-based implementations of low-light image enhancement algorithms, such as those utilizing the Retinex theory, are often too slow for real-time applications due to the high computational cost of operations like Gaussian filtering and image decomposition. Additionally, many methods rely on general-purpose processors or GPUs, which, while powerful, lack the energy efficiency and flexibility needed for embedded or portable applications. FPGA-based implementations have been explored as a potential solution due to their ability to perform parallel processing and their reconfigurability, but many existing FPGA-based systems still suffer from high power consumption or are unable to handle the complex operations required for effective image enhancement. Moreover, while Coarse-Grained Reconfigurable Architectures (CGRA) have been proposed for various tasks, their specific benefits in low-light image enhancement have not been fully realized or explored. Proposed approach This paper aims to address these gaps by introducing an FPGA-based low-light image enhancement system that combines the Retinex algorithm with a CGRA architecture. The system is designed to balance computational complexity, power consumption, and image quality, offering a real-time solution for environments with poor illumination. The key innovations of this work include the use of a low-complexity Gaussian smoothing filter and a memory-efficient line buffer architecture, which together enable high-performance processing with minimal resource usage. Proposed work Visual data is captured in real-time through transmission cables or digital sensors, which might introduce unwanted signal noise, potentially corrupting the image data pixels. To counteract this noise, a filtering process is implemented. The results from these filters are typically displayed in matrix format, utilizing both the spatial and frequency domains, with the spatial domain often being preferred for its simplicity and effectiveness. The Retinex model, which describes human color perception through the interaction of light sources and object reflectance, utilizes these principles. It enhances dimly lit images by estimating the correct illumination or reflectance from degraded images using a variety of filtering techniques. One widely used method in this approach is Gaussian filtering, which traditionally involves integer operations such as multiplications and additions to produce a pixel output that represents a weighted average of surrounding pixel values. This process, however, demands significant memory and hardware resources due to its complexity. In this newly proposed approach, the Retinex Algorithm is applied to enhance the darker regions of an image and is implemented on a cost-effective FPGA. This allows the process to operate in real-time while preserving the quality of the image. Nonetheless, the substantial resource consumption associated with this method does lead to some performance degradation in FPGA implementations. As shown in Fig. 1, this work presents a low-light image enhancement system based on an FPGA platform using Verilog HDL and the Retinex algorithm. The system is implemented using a Coarse-Grained Reconfigurable Architecture (CGRA) to optimize hardware resources and achieve real-time processing. The primary focus of the design is to enhance image quality in low-light conditions while minimizing power consumption and delay. Block diagram of the proposed flow structure. Design choices FPGA: The choice of an FPGA platform for this system was driven by the need for real-time performance, which can be better achieved with hardware-based solutions compared to traditional software implementations. FPGAs allow parallel processing, making them well-suited for image processing tasks. Additionally, FPGAs offer reconfigurability, enabling the design to be tailored for specific applications and optimized for performance, power, and resource utilization. FPGA: The choice of an FPGA platform for this system was driven by the need for real-time performance, which can be better achieved with hardware-based solutions compared to traditional software implementations. FPGAs allow parallel processing, making them well-suited for image processing tasks. Additionally, FPGAs offer reconfigurability, enabling the design to be tailored for specific applications and optimized for performance, power, and resource utilization. Retinex algorithm: The Retinex algorithm was selected because it models how the human visual system perceives color and brightness, making it effective for enhancing images in low-light environments. The algorithm separates an image into illumination and reflectance components, allowing targeted enhancement of dimly lit regions without distorting overall color fidelity. Retinex algorithm: The Retinex algorithm was selected because it models how the human visual system perceives color and brightness, making it effective for enhancing images in low-light environments. The algorithm separates an image into illumination and reflectance components, allowing targeted enhancement of dimly lit regions without distorting overall color fidelity. Coarse-grained reconfigurable architecture (CGRA): CGRA was chosen for its ability to handle repetitive tasks efficiently while offering some degree of flexibility. This architecture simplifies the computational requirements by reusing hardware resources for multiple operations, reducing overall complexity and power consumption. The integration of bit-serial operations into CGRA improves the efficiency of spatial filtering, particularly in tasks like Gaussian smoothing. Coarse-grained reconfigurable architecture (CGRA): CGRA was chosen for its ability to handle repetitive tasks efficiently while offering some degree of flexibility. This architecture simplifies the computational requirements by reusing hardware resources for multiple operations, reducing overall complexity and power consumption. The integration of bit-serial operations into CGRA improves the efficiency of spatial filtering, particularly in tasks like Gaussian smoothing. Shift-based filtering: A shift-based directional addition and accumulation strategy was used in place of traditional multiplication operations during Gaussian filtering. This design decision was made to reduce hardware complexity, as multipliers are typically resource intensive. By simplifying the filter design, the system minimizes resource usage without compromising performance. Shift-based filtering: A shift-based directional addition and accumulation strategy was used in place of traditional multiplication operations during Gaussian filtering. This design decision was made to reduce hardware complexity, as multipliers are typically resource intensive. By simplifying the filter design, the system minimizes resource usage without compromising performance. Memory configuration: The use of a line buffer instead of a full frame buffer was critical in optimizing memory access and reducing power consumption. Line buffers are more memory-efficient, particularly for real-time processing of images, as they only store a portion of the image at any given time, reducing the need for constant memory access to external storage. Memory configuration: The use of a line buffer instead of a full frame buffer was critical in optimizing memory access and reducing power consumption. Line buffers are more memory-efficient, particularly for real-time processing of images, as they only store a portion of the image at any given time, reducing the need for constant memory access to external storage. The SIMD architecture enhances CGRA by integrating bit-serial operations with high parallelism, facilitating efficient spatial filtering. Utilizing a 3 × 3 Gaussian smoothing filter within the CGRA, this approach transforms the video frame of size 720 × 576 into hexadecimal RGB data via MATLAB. This data is stored within the main memory, formatted in a matrix to commence the Gaussian smoothing operation. Using integer multiplications and additions, the Gaussian mask operation produces an output pixel as a weighted sum of the adjacent pixels. Because this integer multiplication takes a long time to compute, it uses more RAM logic and slows down the system’s performance. The operations of the present Gaussian filter take up more time and resources. Since the amount of noise removed is so little, achieving the desired outcome necessitates the use of greater hardware resources. Overcoming the hardware and computation time requirement is a significant challenge in real-time image processing applications. The fundamental principle behind the suggested method is to break down an arithmetic operation into four stages of additions and accumulations (West, North, South and East). The name of each step defines the direction in which each desired pixel will accumulate, as well as the position of each pixel. In this technique, the primary goal is to build an alternative arithmetic Pre-processing method that is less complicated. Overall, the multiplication and addition operations that comprise the Gaussian filtering convolution process results in a real-time processing that is difficult using conventional algorithms. The Pre-processing techniques discussed here are entirely addition-based directional bit serial shifting algorithms, which are intended to simplify the complexity of processing and the hardware requirements. The output pixel matrix (m x n) model of the image line buffer encoder is shown in Fig. 2a. The shift-based directed addition used in the Gaussian smoothing filter is shown in the processing flow diagram. Pixel addition in the directions of the west, north, south, and east are shown in steps 1, 2, 3, and 4, as well as in Fig. 2b–e, respectively. The arrow markings indicate the direction of the addition operation, and the results are calculated in parallel mode. Bit-serial shifting and adding processes flow diagram. The transformation of input image is represented as a product of the illumination channel and the reflectance channel formulated as: To derive the illumination channel , a Gaussian filter kernel is used, defined by: Here, normalizes the sum of all entries in to 1, and controls the filter’s spread. To address the computational intensity of single-scale and multiscale Retinex algorithms, a streamlined naturalness-restoration approach calculates the illumination channel from the maximum RGB values of and applies Gaussian smoothing: The application of Gaussian kernels may introduce halo effects around sharp edges. To mitigate this, a weight mapping as shown in Eq. (8) modifies the illumination, utilizing the difference between and : The modified illumination channel preserves edges while smoothing flat areas: In Eq. (9), is the final modified illumination channel that balances edge preservation and smoothing. is a weight map that controls the influence of the original and smoothed illumination. It is calculated based on the difference between the maximum illumination and the Gaussian-filtered illumination . is the original illumination channel derived from the maximum RGB values of the image and is the Gaussian-smoothed illumination channel. Moreover, Eq. (9) is part of the process for enhancing the illumination of an image while preserving edge details. The equation combines the illumination channel with the smoothed illumination using a weight map to ensure that edges are preserved during the smoothing process. The term gives more weight to the original illumination where the edges need to be preserved. The term applies smoothing where less detail is needed. The final output thus preserves important details (like edges) while smoothing out noise and unwanted variations in less critical areas. Spatial domain enhancement directly manipulates pixel values, adjusting contrast based on a threshold determined by the bit depth of the color channels: This threshold decides if pixel values are adjusted up for brightness or down for darkness, enhancing the contrast: The architecture outlined in Fig. 3 introduces a sophisticated hardware design that incorporates an external memory, a global memory, an array of processing elements (PE), and shared memory configurations. Each segment of the external memory is allocated to distinct RGB blocks designed specifically to manage the manipulation of red, green, and blue pixel data. The processing of the Gaussian algorithm, weight mapping, the illumination channel, and contrast enhancement tasks are conducted using the processing elements within a Coarse-Grained Reconfigurable Array (CGRA) setup. Block diagram CGRA Image Enhancement Architecture. Integration of these functional blocks is achieved through a comprehensive address and data bus system. All computational results are stored in the global memory. RGB channel data from the input image is processed and stored in the external main memory in blocks designated for each color channel, with each channel being represented in an 8-bit format. The complete architecture, along with the RTL schematic, is depicted in Fig. 4, illustrating the detailed configuration and interaction of the various components. RTL Schematic for CGRA Image Enhancement Architecture. The Retinex algorithm has been implemented using the Verilog HDL programming language to facilitate both reading from and writing to a storage system. This setup allows for testing by reading data from a storage device, generating stimulus signals within a Verilog test module, and then sending the results back to the storage device. Specifically, this research utilized the Verilog HDL to simulate an effective naturalness restoration process of the Retinex algorithm on the Xilinx FPGA Artix-7 XC7A200TFBG676-2, with the entire RTL architecture displayed in Fig. 4. The process starts by converting an image file in JPEG format into a hexadecimal file via MATLAB, which is then read by a file reader and uploaded into the external memory as either memory data or binary data. Due to the CGRA-based design, data manipulations for reading and writing employ a 19-bit address and an 8-bit data context format. This facilitates handling RGB data for the red, green, and blue image channels, which are stored across three designated memory blocks in the external memory system. Following the data reading, a Gaussian smoothing process is initiated, using data fetched from the main memory. This involves a shift-based directed addition and accumulation strategy. Upon completion of the filtering process, the accumulated Gaussian output RGB data is stored in three separate blocks within the global memory, each holding 414,720 × 8 data points, accessed via the RGB block’s write address (18:0). Further in the process, a multiplexer unit segregates the luminance data for the naturalness restoration, taking the maximum value of the Rc data from the main memory as Ln (x, y). The G (x, y) values are then retrieved from the global memory to update the weight map by multiplying two 8-bit values, resulting in a 16-bit value, of which only the most significant 8 bits are stored in shared memory. Following weight mapping, the Calc-FM process begins, enhancing the edges and blurring flat regions using a specific formula accessed from shared memory. Finally, the contrast enhancement stage employs an RGB threshold comparison to enhance the image quality. Required channel data for this process is sourced from the shared and global memories, with the outcomes stored back into the external memory. The comprehensive CGRA-based Retinex architecture and its connections are outlined in the RTL schematic, and the concluding results are transformed into text files by a file reader and subsequently analyzed using MATLAB. Experimental results and discussion In this study, the implementation of the Retinex algorithm was carried out through simulation with Verilog HDL and was synthesized using the Xilinx FPGA Artix-7 XC7A200TFBG676-2 platform. The source material for the simulations consisted of video frames and images formatted in JPEG. These were converted into hex files representative of RGB channels using MATLAB, which are illustrated in Fig. 5a–c. Subsequent simulations and validations of the algorithm were conducted using the ModelSim simulator. (a) Input image R channel hexadecimal data. (b) Input image G channel hexadecimal data. (c) Input image B channel hexadecimal data. Figure 6 in the manuscript presents hex data for the RGB channels of an input image used in low-light image enhancement simulations. This data visualization plays a crucial role in understanding how the image data is manipulated through the image enhancement process described. The figure includes subfigures labeled (a), (b), and (c), which likely represent the hexadecimal values of the red, green, and blue channels, respectively. These subfigures are essential for validating the initial data inputs that lead into the series of processing steps designed to enhance low-light images. The hexadecimal format allows for a precise representation of the image data, which is critical for both the simulations of the enhancement algorithms and the analysis of their effects on image quality. Hexadecimal format input data for Retinex algorithm. The simulation results shown in Fig. 7 provide insight into the encoder’s performance, indicating how pixel data is processed and prepared for subsequent enhancement steps. These results are crucial for validating the design’s efficiency and effectiveness, particularly in terms of speed and resource utilization. Moreover, the successful simulation of the line buffer encoder supports the overall objective of the research, which is to develop a low-power, high-efficiency image enhancement system capable of improving visual quality in low-light conditions. This component’s performance is indicative of the system’s potential to be implemented in practical settings, where fast and reliable image processing is necessary. Simulation results for line encoder. Figure 8 in the manuscript likely depicts the simulation results for the Gaussian image processing direction additions, specifically the directional manipulations of pixel data in the West, North, South, and East directions. This part of the image enhancement process is critical for applying the Gaussian smoothing filter effectively across the image data, a fundamental step in enhancing the visibility and clarity of images captured in low-light conditions. Simulation results for directional bit-serial shifting and addition process. The Gaussian smoothing filter, a key component of many image processing algorithms, uses a kernel to average the pixels based on their spatial relationships, which helps in reducing noise and enhancing image details. The directional additions illustrated in Fig. 8 would be important for understanding how the filter integrates pixel values from different directions to achieve a smooth, uniform effect across the image. This process is vital for maintaining the natural appearance of the image while enhancing its overall quality. The results shown in Fig. 9 would typically display how pixel values are modified by the weight map, illustrating the system’s capability to differentiate between areas that need more enhancement. This differentiation is fundamental to avoiding common issues such as halo effects around bright objects against dark backgrounds or the washing out of details due to uniform application of enhancement techniques. Moreover, the successful simulation of weight map generation would indicate that the system is well-tuned to perform complex image analysis tasks efficiently on an FPGA platform. It demonstrates that the architecture is not only capable of improving image quality in terms of brightness and contrast but also does so intelligently, preserving the integrity and quality of the image content. Simulation results for weight mapping generation. The simulation results shown in Fig. 9 would typically highlight the contrast between original and enhanced images, demonstrating the system’s capability to recover details lost in low-light conditions and to produce images that are clearer and more visually appealing. This is particularly important for applications where image clarity directly impacts functionality, such as in security camera footage or night-time driving aids in vehicles. Furthermore, the results could be used to validate the optimization of the system’s design, including the use of specialized FPGA configurations and algorithmic strategies like weight mapping and Gaussian smoothing, which are important for achieving high-quality image enhancements without introducing latency or consuming excessive power. The RGB data represented in Fig. 10 provides a clear visualization of the final image quality and demonstrates the system’s capabilities in restoring and enhancing visual details that are typically lost in low-light conditions. The RGB format allows for the evaluation of colour accuracy, brightness, and contrast which are key attributes that define the quality of an image. The successful enhancement of RGB output data also confirms that the FPGA-based system effectively utilizes its hardware architecture to perform intensive computations required for real-time image processing. This indicates the system’s ability to operate efficiently under the constraints of power and processing capacity, which are typical challenges in embedded systems. Simulation results for enhanced RGB data. MATLAB is employed to evaluate key image quality metrics such as the Peak Signal to Noise Ratio (PSNR), Structural Similarity Index (SSIM), and Mean Square Error (MSE). PSNR and SSIM are widely used indicators of image quality. MSE quantifies the variance between the squared errors of the filtered image compared to the original. This metric helps to compute the deviation between the enhanced image’s quality and the original by using the following calculation method: For a given set of images with dimensions M (width) and N (height), where Ie (i, j) denotes the pixel values of the enhanced image and Ki (i, j) represents those of the original image, MSE is computed. The indices i and j correspond to the specific rows and columns in both the original and enhanced images. The effectiveness and performance of the CGRA-based Retinex architecture were assessed using various test samples. Figure 11 presents a series of output images showcasing the results of the image enhancement process applied to different real-world scenarios. This kind of display is essential for demonstrating the practical effectiveness of the FPGA-based low-light image enhancement system across a variety of images taken under diverse lighting conditions. The successful application of the system to a diverse set of images would indicate its potential for broad implementation in fields that require real-time image processing under challenging lighting conditions. This could include security surveillance, where clear images are necessary regardless of the time of day, or in automotive systems, where driver assistance technologies depend on clear visual data to operate safely. (a) R channel output hex data. (b) G channel output hex data. (c) B channel output hex data. Table 1 presents a detailed quality analysis of images processed through the proposed architecture. This analysis quantifies the discrepancies between the enhanced and original images using metrics such as Mean Square Error (MSE) and Peak Signal to Noise Ratio (PSNR), which measure absolute errors, alongside the Structural Similarity Index (SSIM), a model based on perceptual quality. The findings indicate that the architecture consistently improves image quality, achieving PSNR values between 25.96 and 43 dB and SSIM values predominantly above 0.6. This demonstrates the architecture’s capacity to enhance darker areas of images effectively, incorporating various criteria for a thorough assessment of image fidelity. The enhanced images maintain high quality, despite not replicating the exact appearance of the original inputs. Table 1Summary of enhanced image quality measures.ImageQuality assessment techniquesPSNRMSESSIMGirl26.7251138.220.67756Arlington historic house25.9264166.1260.63459Light house28.667388.3780.76219Notre-Dame de Paris27.1284125.9630.68330Roadside street building30.250961.3750.63459Images with dark light30.339760.13290.776Palace interior31.558745.41670.69234Low sun light street29.617971.00550.61618Modified laparoscopic fimbrioplasty procedure29.633670.74890.8224Endoscopic picture empyema of gallbladder with pericholecystic43.18443.12350.9206Laparoscopic picture of appendectomy34.074125.44920.88447Empyema of gallbladder with pericholecystic abscess and omental adhesions35.063320.26520.74375Elective laparoscopic cholecystectomy leads to the discovery of asymptomatic gangrenous cholecystitis29.926366.13740.84308Hotel lobby39.29267.652890.88511Nagore32.917933.21180.69794Roadside building30.984451.83750.60050 Summary of enhanced image quality measures. Table 2 provides a summary of device utilization for the proposed FPGA-based image enhancement system, detailing the specific resources used within the FPGA hardware during the operation of the system. This table is important for understanding the efficiency and scalability of the FPGA architecture in implementing the low-light image enhancement algorithm. From Table 2, efficiency of the FPGA design is indicated. A low percentage of resource utilization while achieving high-quality image enhancement indicates that the system is optimized for performance without overloading the FPGA. This suggests that there is opportunity for additional functionalities or enhancements to be added without requiring a hardware upgrade, enhancing the system’s versatility. Firstly, the proposed method operates at a frequency of 219.469 MHz, which is substantially higher than the 130 MHz frequency of Marsi’s implementation and Ustukov’s 200 MHz design. This increase in operating frequency directly correlates to faster processing capabilities, making the proposed method more suitable for real-time applications, especially those requiring high frame rates. Firstly, the proposed method operates at a frequency of 219.469 MHz, which is substantially higher than the 130 MHz frequency of Marsi’s implementation and Ustukov’s 200 MHz design. This increase in operating frequency directly correlates to faster processing capabilities, making the proposed method more suitable for real-time applications, especially those requiring high frame rates. In terms of resource utilization, the proposed method shows a remarkable reduction in the number of Slice LUTs and Slice Registers used. With only 2872 Slice LUTs and 2693 Slice Registers, the proposed design is far more resource-efficient compared to Li’s (18,186 LUTs and 12,724 Registers) and Ustukov’s (20,043 LUTs and 42,0331 Registers) implementations. This demonstrates the success of the design’s optimization, especially through the use of a low-complexity filtering approach and CGRA architecture. Efficient resource utilization makes the proposed design more scalable and potentially more cost-effective for FPGA platforms with limited resources. In terms of resource utilization, the proposed method shows a remarkable reduction in the number of Slice LUTs and Slice Registers used. With only 2872 Slice LUTs and 2693 Slice Registers, the proposed design is far more resource-efficient compared to Li’s (18,186 LUTs and 12,724 Registers) and Ustukov’s (20,043 LUTs and 42,0331 Registers) implementations. This demonstrates the success of the design’s optimization, especially through the use of a low-complexity filtering approach and CGRA architecture. Efficient resource utilization makes the proposed design more scalable and potentially more cost-effective for FPGA platforms with limited resources. In terms of memory usage, the proposed method requires 1215 KB of SRAM, which is lower than both Li’s (1616 KB) and Marsi’s (1179 KB) designs, while external memory usage remains competitive at 2430 KB. This optimized memory usage, particularly in terms of reducing reliance on external memory, further contributes to the design’s overall efficiency, lowering delays associated with memory access. In terms of memory usage, the proposed method requires 1215 KB of SRAM, which is lower than both Li’s (1616 KB) and Marsi’s (1179 KB) designs, while external memory usage remains competitive at 2430 KB. This optimized memory usage, particularly in terms of reducing reliance on external memory, further contributes to the design’s overall efficiency, lowering delays associated with memory access. Finally, the proposed method demonstrates a clear advantage in power consumption, with a reported power usage of only 186 mW. This is significantly lower than Ustukov’s design, which consumes 2640.27 mW. This substantial reduction in power consumption highlights the efficacy of the proposed design for energy-sensitive applications, such as portable or embedded systems where power efficiency is critical.*** Finally, the proposed method demonstrates a clear advantage in power consumption, with a reported power usage of only 186 mW. This is significantly lower than Ustukov’s design, which consumes 2640.27 mW. This substantial reduction in power consumption highlights the efficacy of the proposed design for energy-sensitive applications, such as portable or embedded systems where power efficiency is critical.*** Table 2Summary of device utilization for proposed CGRA Retinex. Summary of device utilization for proposed CGRA Retinex. In summary, the proposed CGRA-based method offers a well-balanced trade-off between performance and resource efficiency, making it a strong candidate for low-light image enhancement applications, especially in scenarios requiring real-time processing and low power consumption. The design’s superior resource utilization, higher frequency, and lower power draw position it as a highly efficient alternative to existing FPGA-based solutions. Table 3 presents a performance comparison of the Retinex algorithm implemented using the proposed FPGA-based method against other similar FPGA implementations. This type of table is crucial for demonstrating the advantages of the proposed system over existing solutions, focusing on key performance metrics such as image resolution, operating frequency, power consumption, and resource utilization. Furthermore, the comparison might highlight that despite using fewer resources and consuming less power, the proposed system does not compromise on image resolution or enhancement quality, maintaining competitive or superior image processing capabilities. Table 3Performance comparison of the Retinex algorithm with proposed method.Performance comparison of similar algorithm implementationLi26Ustukov24Marsi27Proposed CGRA methodFPGAXilinx Virtex-4 (XC4VSX55)Xilinx Virtex-7 (XC7VX485T)Cyclone III (EP3C120F780)Xilinx Artix-7 (XC7A200TFBG676)Resolution720 × 576 (Gray)640 × 480 (RGB)720 × 576 (RGB)720 × 576 (RGB)Operating frequency–200 MHz130 MHz219.469 MHzNumber of slice LUT18,18620,04321,6082872Number of slice register12,72442,0331–2693SRAM (KB)1616925211791215External memory (KB)3317099522430Delay (ns)–5.07.6921.714 Performance comparison of the Retinex algorithm with proposed method. Figure 12 provides detailed key aspects into the synthesis, device utilization, and power analysis of the FPGA-based image enhancement system, presented through a series of sub-figures or charts. These details are essential for demonstrating the technical excellence and implementation specifics of the FPGA architecture used in the system. This type of figure usually aims to corroborate the system’s capabilities and the effectiveness of its design through a visual breakdown of the synthesis process and power consumption metrics. Figure 12 also indicate that the system’s capability to perform complex image enhancement tasks effectively while maintaining high efficiency in resource usage and power consumption. These characteristics are important for deploying the technology in real-world applications where performance, cost, and power efficiency are key considerations. (a) Synthesis report of CGRA based Retinex image system. (b) Summary of device utilization and timing report for CGRA based Retinex image system. (c) Power analysis report of CGRA based Retinex image system. Inferences from the results The results of the proposed FPGA-based low-light image enhancement system using the Retinex algorithm and Coarse-Grained Reconfigurable Architecture (CGRA) provide several key aspects into the performance and efficiency of the design: Image quality improvement: The system achieves significant enhancements in image quality, as demonstrated by the Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM) metrics. With PSNR values reaching up to 43.18 dB and SSIM values as high as 0.92, the system successfully reduces noise and enhances details in low-light images. These metrics indicate that the design preserves the visual integrity of the images while improving brightness and contrast, making it suitable for applications where clarity in low-light conditions is critical. Image quality improvement: The system achieves significant enhancements in image quality, as demonstrated by the Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM) metrics. With PSNR values reaching up to 43.18 dB and SSIM values as high as 0.92, the system successfully reduces noise and enhances details in low-light images. These metrics indicate that the design preserves the visual integrity of the images while improving brightness and contrast, making it suitable for applications where clarity in low-light conditions is critical. Efficient real-time processing: The system’s ability to process images at 60 frames per second (fps) for a resolution of 720 × 576 pixels demonstrates its real-time processing capability. This is a crucial feature for applications that require live image enhancement, such as medical imaging or surveillance, where delays in processing could compromise effectiveness. The design establishes a balance between computational complexity and performance, achieving high frame rates while maintaining image quality. Efficient real-time processing: The system’s ability to process images at 60 frames per second (fps) for a resolution of 720 × 576 pixels demonstrates its real-time processing capability. This is a crucial feature for applications that require live image enhancement, such as medical imaging or surveillance, where delays in processing could compromise effectiveness. The design establishes a balance between computational complexity and performance, achieving high frame rates while maintaining image quality. Power efficiency: The proposed design is synthesized using Xilinx Vivado design suite (2019.2) and implemented in Xilinx XC7A200-TFBG676 FPGA. This system achieves a maximum clock frequency of 219 MHz, allowing it to run 720 × 576-pixel video up to 60 fps. Most of the researchers concentrated on resource utilization estimation levels and not on the estimation of power levels. One of the primary design goals of this research is to minimize power consumption. In this proposed work, the power estimation is carried out and is compared with two existing research studies. The power consumption comparison is shown in Table 4. The proposed work consumes 29% (0.055 W) of the dynamic power and 71% (0.132 W) of the static power and the total on-chip power value is recorded as 0.186 W which is less by 2.45 W and 0.884 W respectively for the existing works carried out by Ustukov24 and Palacios25. This efficiency is achieved through the use of a simplified Gaussian smoothing filter and a line-buffered memory architecture, which reduce the need for power-intensive operations such as full-frame buffering and complex multiplications. Power efficiency: The proposed design is synthesized using Xilinx Vivado design suite (2019.2) and implemented in Xilinx XC7A200-TFBG676 FPGA. This system achieves a maximum clock frequency of 219 MHz, allowing it to run 720 × 576-pixel video up to 60 fps. Most of the researchers concentrated on resource utilization estimation levels and not on the estimation of power levels. One of the primary design goals of this research is to minimize power consumption. In this proposed work, the power estimation is carried out and is compared with two existing research studies. The power consumption comparison is shown in Table 4. The proposed work consumes 29% (0.055 W) of the dynamic power and 71% (0.132 W) of the static power and the total on-chip power value is recorded as 0.186 W which is less by 2.45 W and 0.884 W respectively for the existing works carried out by Ustukov24 and Palacios25. This efficiency is achieved through the use of a simplified Gaussian smoothing filter and a line-buffered memory architecture, which reduce the need for power-intensive operations such as full-frame buffering and complex multiplications. Resource utilization: The system exhibits efficient utilization of FPGA resources, using only 2.2% of Slice LUTs and Slice Registers. This low resource usage indicates that the design is scalable and can potentially be implemented on a wide range of FPGA platforms, including those with limited hardware resources. The efficient resource management also suggests the potential for integrating additional features or processing tasks without significantly increasing the computational load. Resource utilization: The system exhibits efficient utilization of FPGA resources, using only 2.2% of Slice LUTs and Slice Registers. This low resource usage indicates that the design is scalable and can potentially be implemented on a wide range of FPGA platforms, including those with limited hardware resources. The efficient resource management also suggests the potential for integrating additional features or processing tasks without significantly increasing the computational load. Performance-complexity trade-off: The design demonstrates a careful balance between performance and complexity. The shift-based addition and accumulation strategy used in the filtering process reduces the need for complex hardware operations, thus simplifying the overall architecture. However, this complexity reduction does not come at the expense of performance, as evidenced by the high-quality image output and real-time processing capabilities. The system successfully leverages the strengths of the FPGA platform, particularly its parallel processing capabilities, to deliver a low complexity yet high-performance solution. Performance-complexity trade-off: The design demonstrates a careful balance between performance and complexity. The shift-based addition and accumulation strategy used in the filtering process reduces the need for complex hardware operations, thus simplifying the overall architecture. However, this complexity reduction does not come at the expense of performance, as evidenced by the high-quality image output and real-time processing capabilities. The system successfully leverages the strengths of the FPGA platform, particularly its parallel processing capabilities, to deliver a low complexity yet high-performance solution. Table 4Power Consumption comparation with proposed method.FPGAUstukov24Palacios J A25Proposed CGRA methodXilinx (XC7VX485T)Xilinx (XC7A200T-1SBG484C)Xilinx (XC7A200-TFBG676)Power (W)2640.27 mW1.07 W0.186 W Power Consumption comparation with proposed method. Limitations and future work While the results are promising, the system does have some limitations that need to be addressed. The reported power consumption does not include switching power, or the power consumed by IO operations and external memory access, which are critical factors in practical applications. Additionally, the system’s performance has been validated on relatively small image sizes (720 × 576 pixels), and scalability to higher resolutions or more complex scenarios, such as dynamic video streams, needs further investigation. Future work will focus on addressing these limitations by conducting a more comprehensive power analysis and exploring optimizations for larger-scale implementations. In summary, the results demonstrate that the proposed system provides an effective, efficient, and scalable solution for low-light image enhancement in real-time environments. The combination of high image quality, real-time processing, and low power consumption positions this design as a viable option for a variety of critical applications, though further work is necessary to fully explore its potential in more demanding scenarios. Conclusion This research highlights the successful implementation of a low-light image enhancement system using an FPGA-based architecture with Coarse-Grained Reconfigurable Architecture (CGRA). The primary contributions include the development of a low-complexity Gaussian smoothing filter, which optimizes resource usage and reduces computational overhead while maintaining high image quality. The system achieves significant improvements in image quality, demonstrated by high PSNR and SSIM values, while operating efficiently in real-time with minimal power consumption. The use of Hardware Description Language (HDL) was critical in realizing the design’s real-time performance and hardware optimization. The experimental results validate the system’s effectiveness, showing that it can be a viable solution for applications requiring efficient low-light image enhancement. Future work will involve a more detailed experimental validation of the complexity reduction and comparisons with other FPGA-based implementations to further substantiate the system’s advantages. Additionally, the potential for further optimization and adaptation of the architecture for various image processing applications will be explored. Author contributions S. Munaf—Research proposal—construction of the work flow and model—Final Drafting—Dr. A. Bharathi-Survey of Existing works—Improvisation of the proposed model; Dr. A. N. Jayanthi—Initial Drafting of the paper—Collection of datasets and choice of their suitability—Formulation of pseudocode. Data availability https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/, http://www.image-net.org/, https://cocodataset.org/, https://baidut.github.io/BIMEF/images/image22.jpg. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/, http://www.image-net.org/, https://cocodataset.org/, https://baidut.github.io/BIMEF/images/image22.jpg.