1. Introduction
Remote sensing imagery has important applications in a number of fields, such as military reconnaissance, topographic mapping, meteorological monitoring, environmental protection, and agricultural management. In military applications, remote sensing images are used to track enemy activities and obtain battlefield information; in the field of surveying and mapping, they help generate high-precision maps and terrain models; meteorology uses remote sensing data for weather forecasting and climate change research; environmental monitoring relies on remote sensing to analyze changes in the ecological environment and the impact of natural disasters; and, in the field of agriculture, remote sensing images are used to monitor the growth of crops and the precise application of fertilizers, thus improving crop yield and management efficiency. However, remote sensing images often suffer from low illumination due to insufficient light or exposure, which leads to reduced signal-to-noise ratios, color distortion, and insufficient contrast. Therefore, it becomes necessary to enhance the quality of low-light remote sensing images in order to present image details and scene information more clearly [
1].
Traditional image enhancement techniques include methods such as histogram equalization, spatial domain-based convolutional filtering, and gamma correction. Histogram equalization enhances contrast by adjusting the brightness distribution of the image and uses the histogram information of the image to make the gray-level distribution as uniform as possible, thus enhancing details and features. This method is effective when processing low-contrast images but may result in the loss of some details. Spatial filtering processes an image through a convolution operation to reduce noise or enhance edges. Common filters include mean filters (for smoothing noise) and Laplace filters (for enhancing edges). These methods are able to preserve image features while removing unwanted interference. However, although these traditional methods improve image quality to some extent, they usually enhance only one or two aspects of the image, making it difficult to significantly improve the overall visual effect of low-light remote sensing images. Non-physical model enhancement algorithms enhance the visual effect of the image by smoothing low-frequency noise and sharpening high-frequency information to achieve a more desirable low-light image enhancement effect. Representative algorithms include the Retinex algorithm, which was proposed by Land et al. [
2] based on the human visual perception model, and the human visual perception model, which simulates the adaptive ability of the human eye to adapt to brightness, color, and contrast, achieving more subjective image processing by separating the illumination and reflection components. It is a classical image enhancement algorithm that is often applied to the enhancement of low-illumination images. The Retinex theory divides the image into two parts, light and reflection, in which the light part corresponds to the low-frequency signal part of the image, and the reflection component corresponds to the high-frequency signal part of the image. Based on Retinex theory, Jobson et al. [
3] proposed the single-scale Retinex (SSR) algorithm, which uses Gaussian low-pass filtering to estimate the illumination component, but it suffers from serious color distortion after enhancement and produces an overall whiteness in the image. To address the problem of color distortion, Jobson et al. [
4] subsequently proposed the multi-scale Retinex (MSR) algorithm, which uses low-pass filtering with multiple Gaussian kernels to estimate the light component. However, this algorithm does not resolve the color distortion problem and the image is accompanied by the halo phenomenon. Rahman et al. [
5] proposed the multi-scale Retinex with color restoration (MS-RCR) algorithm, which uses the color factor C to adjust the ratio of the three RGB channels, thereby reducing color distortion to some extent; however, some distortion remains. Wang et al. [
6] proposed using a bilateral filter to estimate the illumination component. The approach improves the halo phenomenon and the computational complexity but does not resolve the color distortion problem. Chen et al. [
7] proposed shooting multi-frame images, converting the low-illumination image to the YUV color space, and using a noise reduction method to select the optimal Y-channel component. Huang et al. [
8] proposed combining smoothing clustering and the improved Retinex algorithm to estimate the illumination of the low-illumination panorama image enhancement algorithm.
To address the challenge of uneven illumination in images, numerous Retinex-based enhancement methods have been proposed. Extending traditional Retinex theory, Guo et al. [
9] proposed an image enhancement method that estimates an illumination map through maximum grayscale value extraction across RGB channels, followed by refinement to produce improved results. For low-light image enhancement, Dong et al. [
10] capitalized on dark channel prior-based defogging techniques. Their method exploits the similarity between inverted low-light images and foggy images in grayscale distribution, enabling visibility enhancement through defogging-inspired processing. Hao et al. [
11] further advanced this field with a semi-decoupled decomposition (SDD) model, where decomposition is achieved via a pseudo-decoupling scheme: the illumination component is derived from Gaussian variation, while reflectance is jointly computed from the input image and the illumination component. However, existing methods still face limitations. For instance, Cai et al.’s [
12] Joint Internal and External Prior (JieP) model, while effective, tends to over-smooth illumination and reflectance components. To mitigate this issue, Li et al. [
13] developed a robust structure-aware Retinex enhancement method that incorporates noise mapping, significantly improving the algorithm’s robustness and effectiveness in low-light conditions. Collectively, these contributions refine Retinex theory and expand its applicability in image enhancement.
Currently, there are many other methods to combine deep learning (AI) with low-illumination images. Wang et al. [
14] proposed a multi-exposure fusion algorithm for low-light enhancement, leveraging simulated exposure data. Lore et al. [
15] demonstrated that a unified deep learning framework could simultaneously achieve low-light enhancement and denoising. Chen et al. [
16] designed the Retinex-Net, which includes two parts, Decom-Net and Enhance-Net. Jiang et al. [
17] proposed an efficient unsupervised generative adversarial network, including a global–local discriminator structure, self-regularized perceptual loss fusion, and an attention mechanism. Jiang et al. [
18] proposed a new degenerate generative network (DRGN), which not only can synthesize enough paired samples for model training, but also effectively solves the complex unmixing problem and improves the visibility of images. However, deep learning methods usually have high computational demands, which makes it difficult to meet the real-time requirements in scenarios with limited hardware resources and certain power consumption constraints (mainly oriented to satellite payload platforms). In recent years, a variety of efficient algorithmic improvement schemes have also been proposed in the field of remote sensing. Xiao et al. [
19] proposed SpikeSR, a spiking neural network (SNN)-based approach for achieving efficient remote sensing image super-resolution while maintaining benchmark performance, and Zhang et al. [
20] designed a lightweight hybrid neural network to solve the challenges of large model size and high computational complexity in the neural network of remote sensing images. Wang et al. [
21] proposed an attention-based multilevel feature fusion network to improve the resolution of RSI, integrating three efficient design strategies to provide a lightweight solution.
In recent years, hardware-accelerated low-light image-processing techniques have made significant progress. Lv et al. [
22] innovatively combined bootstrap filtering, grayscale stretching, and image fusion techniques to effectively address low-light defogging challenges. Wang’s team [
23] took an alternative approach to develop a lightweight CNN architecture for low-light enhancement, and verified its excellent performance by deploying it on hardware platforms. In the field of target detection, Qu et al. [
24] introduced the attention mechanism into the YOLOV4 miniaturized model, achieving performance breakthroughs through FPGA acceleration. For agricultural application scenarios, Luo’s research group [
25] proposed a seven-layer Lite CNN which significantly improves the real-time performance of plant disease recognition while maintaining accuracy through model compression techniques such as knowledge distillation. Particularly noteworthy is the low-light defogging system developed by Zhang and other scholars [
26] based on the Zynq platform, which employs the HLS toolchain to realize the IP core design of the Retinex algorithm, providing an efficient hardware solution for real-time LCD image processing. Together, these research efforts promote the development of real-time image-processing technology in edge computing environments.
In this paper, a ZYNQ-based hardware solution is proposed to address the problems of blurred edges and insufficient contrast in low-light remote sensing images. The solution adopts the improved BGIR (Bilateral-Guided Image Retinex) algorithm by implementing multi-scale Retinex enhancement in the HSV color space, and this combination not only improves the results of the image enhancement, but also accelerates the performance, which is significantly novel compared with the existing low-light image restoration methods. When converting the image from RGB to HSV space, only the V (value) channel requires processing, and the computational complexity is reduced by 66% of compared to the traditional three-channel processing, which significantly improves the real-time processing capability and is more suitable for real-time application scenarios. Adopting bilateral filtering instead of the traditional Gaussian filtering effectively suppresses the loss of edge information and maintains the integrity of details at the image edge transitions, and gamma correction is introduced at the end of the algorithmic process, which further improves the local gamma correction, to further improve the local contrast, so that the enhanced image is more in line with the visual characteristics of the human eye. Finally, multiple hardware optimization techniques are implemented for the algorithm in the hardware implementation, and a set of complete imaging systems based on OV5640 image sensors is implemented. The results are displayed in real time on the LCD, which provides a reliable platform for the verification of the algorithm.
2. Algorithm Overview
2.1. BGIR Algorithm Steps
To address the shortcomings of the traditional Retinex theory algorithm combined with the HSV space and gamma correction algorithm, and so improve on Retinex algorithm fusion, we put forward a new realization of the algorithm and deploy it to the hardware platform ZYNQ. The algorithm flow is shown in
Figure 1, and the specific steps are as follows:
The original low-light remote sensing RGB image is converted to HSV space to obtain H, S, and V components.
Improved algorithmic enhancement of luminance V is performed to globally improve image clarity and retain image detail information.
To improve the local contrast of the image and to improve the visibility of the image to the human eye, the above results are gamma corrected for enhancement.
The component H is kept unchanged, and the component S is segmented via linear enhancement.
The results are transformed back to the RGB color space, and the restored image is output.
2.2. Retinex Theory and Algorithms
The Retinex theory is based on the illumination–reflection model of an image, where the reflection component of an image is obtained by removing or reducing the irradiation component of the original image obtained by estimation to obtain a clear image. Its mathematical expression is shown in Equation (1):
where
and
denote the coordinates of the pixel points;
denotes the initial image;
denotes the image irradiation component;
denotes the image reflection component. The single-scale Retinex mathematical expressions are shown in Equations (2)–(5):
where
is the Gaussian convolution function, * denotes the convolution operation, the coefficient K is determined by the normalization function, and σ is the scale parameter of the Gaussian kernel function. The flow of the single-scale Retinex algorithm is shown in
Figure 2.
The multi-scale Retinex algorithm can be viewed as the result of a linearly weighted combination of multiple single-scale Retinex algorithms on different scales, with mathematical expressions as shown in Equation (6):
where
is the output of the single-scale Retinex algorithm;
= 1, …, N, represents the number of spectral bands, where N = 1 represents the grayscale image and N = 3 represents the color image; and
represents the number of Gaussian functions and is generally selected as the three high, medium, and low scales. Usually,
= 3 is taken when
= 1, and the multi-scale Retinex algorithm becomes a single-scale Retinex algorithm.
represents the scale function, with the Gaussian function usually selected as the scale function. The MSR algorithm will process results at different scales through a weighted combination of color fidelity and balanced image detail information.
MSRCR introduces a color recovery factor (
) to suppress the proportional imbalance between color channels and maintain color naturalness, which is achieved by the formulas in Equations (7) and (8):
In the formula, represents the pixel value of the cth color channel (R/G/B), and and represent the adjustment parameters.
As illustrated in
Figure 3 (image from the LOL [
16] dataset), the image that has been processed by the MSR algorithm demonstrates a substantial enhancement in brightness and an improvement in defect visibility. However, the figure also demonstrates that some regions of the image are over-enhanced, resulting in a disruption of the original proportionality of the R, G, and B image components. This phenomenon is accompanied by local exposure issues and a significant loss of detailed information, accompanied by color distortion.
2.3. HSV Spatial Domain Transformations
When applying the MSR algorithm in the RGB color space, it is first necessary to process each of the image’s color channels—red (R), green (G), and blue (B)—independently. Specifically, the MSR algorithm enhances the visual effect of the image by adjusting the brightness and contrast of each channel. To achieve this goal, the MSR algorithm uses a multi-scale processing technique, i.e., by blurring the image at various scales to simulate the human eye’s perception of brightness. The image of each color channel is blurred at different scales and undergoes a ratio operation to enhance the brightness and detail performance of the image.
However, even though the brightness and contrast of the image are improved, the MSR algorithm’s processing of each of the three RGB color channels also alters the proportionality between them. While this processing enhances the visual effect of the overall image, it also introduces inconsistencies in the color structure, which is manifested as color distortion. This means that the brightness and contrast adjustments of the brightness and contrast adjustments of the RGB channels are not identical, resulting in color shifts in the image, making the colors appear visually unnatural. Therefore, although the MSR algorithm can improve the quality of low-light images to a certain extent, its impact on the color structure cannot be ignored, and the issue of color distortion becomes particularly evident in the processed images. This phenomenon reminds us that, when applying such algorithms, in addition to brightness and contrast enhancement, the naturalness and coordination of colors need to be taken into account in order to avoid the side effects of over-processing.
The HSV space separates the value from the hue and saturation of the image, allowing Retinex to process the luminance channel (V) directly to avoid color distortion. Only the V channel needs adjustment, and the chromaticity (H, S) remains unchanged to prevent color distortion, which is especially suitable for remote sensing imaging scenarios where the lighting is uneven but the color needs to be preserved. Since HSV only processes the V channel, and the computational load is about one-third of that required for the RGB channels, it is very suitable for real-time applications deployed on the hardware platform.
In color space analysis, hue represents the type of color through angular measurements ranging from 0° to 360°, where 0° corresponds to red, 120° to green, and 240° to blue, enabling visual color identification. Saturation quantifies color purity on a scale from 0% (completely grayscale) to 100% (fully vibrant), where increased saturation enhances color vividness while decreased saturation shifts towards neutral gray tones, thus allowing for adjustment of color sharpness. Value represents the color brightness or light intensity, similarly scaled from 0% (darkest) to 100% (brightest), with higher luminance values producing brighter appearances and lower values creating darker tones, so that identical hues exhibit different visual characteristics under varying illumination conditions. As illustrated in
Figure 4, our proposed algorithm selectively enhances only the luminance component, thereby preserving the original hue and saturation information while improving image visibility. The equations for conversion between RGB and HSV are as shown in (9)–(12):
where (
,
,
) represents the red, green, and blue coordinates of the pixel point, and the values range from 0 to 1. Max is the maximum value of
,
, and
, and min the minimum value. The corresponding component decomposition diagram is shown in
Figure 4 (image from the LOL [
16] dataset).
2.4. Bilateral Filter Center Surround Function
In this paper, an improved version of the Retinex algorithm is proposed based on the analysis of existing Retinex algorithms. The traditional Retinex framework uses Gaussian linear filtering to estimate the illumination component of an image, thus obtaining an irradiation component that represents the real image. The algorithm is able to achieve good enhancement results provided that the image satisfies the light consistency assumption, i.e., the light intensity in the image remains consistent and varies smoothly. However, this assumption is often not met in practice, particularly in the high-contrast edge regions of the image. When the algorithm estimates illumination, it is limited by the Gaussian filter only based on the pixel distance. This leads to drastic changes in the pixel values of the bright and dark junctions, causing interference, and thus triggering a distortion of illumination estimation and generating halo artifacts, which seriously affects the visual effect. The visual effect is seriously affected. Unlike traditional linear filters, bilateral filtering is a nonlinear filtering method that combines null-domain weights (considering spatial proximity) and value-domain weights (considering grayscale similarity) to smooth an image while effectively preserving edges and details. The bilateral filter kernel degrades to a Gaussian kernel when assuming that there are regions of consistent illumination in the image, while, in the case of inconsistent illumination, the bilateral filter is able to overcome the shortcomings of the Gaussian filter by avoiding excessive smoothing and detail loss. Therefore, the use of bilateral filtering for light estimation can effectively solve the problem of “halo artifacts” in images.
A Gaussian filter with the same size window (13), a Gaussian filter with the same value of
(
), and a bilateral filter
(
) are used to filter the same image, and the experimental results are shown in
Figure 5 (images from our lab), where the a figure shows the Gaussian filtering effect and the b figure shows the bilateral filtering effect.
As shown in
Figure 5, the noise in the image is partially suppressed after filtering by both the Gaussian filter and bilateral filter. The edges of the image filtered by the Gaussian filter are blurred and too much image detail information is lost; however, the image filtered by the bilateral filter maintains the edge structure well and the image detail information is more prominent. It is proved that the bilateral filter can maintain the structure of the edges better than the Gaussian filter in low-illumination image enhancement, and the filtering effect is better.
The principle of the bilateral filter used in digital image processing is shown in Equations (13) and (14):
In the above equations,
is the irradiated component of the image with fog,
is the neighborhood range of pixel point
,
is the original image,
is the spatial-domain weights,
is the grayscale-domain weights, and
is the weighting parameter. The expression is shown by Equations (15) and (16):
where
and
are the distance standard deviation and gray standard deviation of the Gaussian function, respectively. When the value of
increases, pixels with large spatial distances can also participate in the filtering, and when the value of
increases, pixel points with large pixel differences can also participate in the filtering.
Finally, the illuminance component of the bilateral filter is replaced with the original illuminance component of the MSR algorithm to optimize the bilateral filter function and the MSR algorithm.
2.5. Gamma Correction
Illumination image estimation is a critical step in the Retinex algorithm. If the illumination component is not accurately estimated, the illumination and reflection images will not be an orthogonal decomposition of the original image, but mixed with each other part of the information, which will lead to the amplification of the error in the subsequent processing, affecting the final processing results. From the perspective of the frequency domain, the illumination image represents the low-frequency part of the original image, which reflects the total intensity of the light source and determines the dynamic range of the image. Due to uneven illumination, the actual image may exhibit low contrast or saturation distortion in certain regions, at which time the bilaterally filtered illuminance image may show lower brightness in some regions. Therefore, the illumination component must be compensated. In this paper, the compensation is performed using gamma correction, a method that aligns with human visual perception, so that the corrected illuminance image is more in line with the assumptions of the Retinex theory. The formula for gamma correction is shown in Equation (17):
where
and
are the gray value and the maximum gray level of the input image pixels,
is the changed pixel value,
is the control parameter in the transformation process to determine the enhancement effect, and
is the correction factor. When
> 1, the overall gray value of the image becomes smaller, i.e., the image becomes darker; when
< 1, the overall gray value of the image becomes larger, i.e., the image becomes brighter. In order to avoid image darkening caused by underestimation of transmittance, the value of
is set to [0, 1]. According to the data test,
= 1/2.2 is the better result.
2.6. Handling of Saturation Components and Color Recovery
During image enhancement, the saturation (S) of an image usually decreases as the brightness (V) increases. In order to avoid distortion of the image colors and to maintain the sharpness of the colors, saturation needs to be enhanced appropriately. Saturation reflects the purity of the colors, and it must be enhanced in such a way that the enhancement is natural and does not produce noticeable distortion. Excessive grayscale changes can make the image color look unrealistic, so you need to avoid the use of too intense processing methods. In order to obtain a softer and more vibrant color effect, we, according to the original image’s saturation of different levels of saturation, divide saturation into three intervals: the saturation of the higher part of the moderate maintenance or attenuation and the saturation of the lower part of the enhancement. This can effectively enhance the color expression of the image. To realize this saturation enhancement, we use the segmented logarithmic transformation method, as shown in Equation (18):
where
,
, and
are stretching coefficients,
= 0.3,
= 0.6,
, and
. When the image saturation is too low, the stretching coefficient selects a larger value; conversely, a smaller value is selected.