Multi-scale Retinex low-illumination image enhancement method based on modified bilateral filtering
By introducing a modified bilateral filtering and an improved Gamma transformation function in the multi-scale Retinex algorithm, the problems of halo effect, color distortion and detail loss in low-illumination image enhancement are solved, and the adaptive enhancement of the image and the improvement of visual effects are achieved.
Patent Information
- Application Number
- CN202411731742.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-18
AI Technical Summary
There are problems such as halo effect, color distortion and loss of dark area details in existing low-illumination image enhancement technologies, making it difficult to achieve adaptive enhancement of local areas under different lighting conditions.
Based on the traditional multi-scale Retinex algorithm, a modified bilateral filtering and an improved Gamma transformation function are introduced. By dynamically adjusting the gamma coefficient and correcting the bilateral filtering weight, the halo effect is suppressed and image details and color restoration effect is improved.
It realizes adaptive enhancement of local areas under different lighting conditions, significantly improving the visual effect of the image, including brightness improvement, detail enhancement and color restoration, and is suitable for real-time image processing scenes.
Smart Images

Figure CN119850498A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital image processing, and in particular to a multi-scale Retinex low-light image enhancement method based on modified bilateral filtering, which aims to improve the brightness, detail clarity and color restoration effect of an image under low-light conditions. Background Art
[0002] In low-light environments, images often suffer from problems such as insufficient brightness, reduced contrast, increased noise, and loss of details. This phenomenon poses a severe challenge to the performance and application scenarios of computer vision systems (such as nighttime monitoring and unmanned driving). In order to improve the visual effect of low-light images, a variety of image enhancement methods have been proposed, including histogram equalization (HE), enhancement algorithms based on Retinex theory, and deep learning methods.
[0003] Histogram equalization is a classic enhancement method that can improve the contrast of images, but it is easy to cause over-enhancement and loss of details; methods based on Retinex theory (such as single-scale Retinex and multi-scale Retinex) can better restore the details and color information of the image by separating the illumination component and the reflection component of the image, but the traditional Retinex method is prone to halo effect and color distortion; although the enhancement method based on deep learning has significant effects, it is highly dependent on computing resources and data sets, and it is difficult to adapt to the needs of real-time applications.
[0004] In view of the above problems, the prior art requires a low-light image enhancement method that can dynamically and adaptively adjust the intensity of the illumination area enhancement, suppress the halo effect and enhance the image details. Based on the traditional multi-scale Retinex method, the present invention introduces modified bilateral filtering and an improved Gamma transformation function to achieve brightness enhancement, detail enhancement and color restoration of low-light images, effectively solving the deficiencies in the prior art. Summary of the invention
[0005] In order to solve the problems of halo effect, color distortion and dark area detail loss in existing low-light image enhancement technology, the present invention improves the traditional multi-scale Retinex algorithm, and significantly improves the image detail retention ability and color restoration effect while enhancing the image brightness.
[0006] In order to solve the above problems, the technical solution of the present invention is:
[0007] Step 1: Convert the input RGB image to HSV color space and separate the brightness component (V) for enhancement processing to avoid distortion caused by direct operation of color information;
[0008] Step 2: Use modified bilateral filtering instead of traditional Gaussian filtering to separate the brightness component into illumination component and reflection component. Use the modified filtering as the center-surround function of the multi-scale Retinex algorithm, and dynamically adjust the weight by introducing the correction function to suppress the halo effect and improve the detail performance of the edge area.
[0009] Step 3: In the process of enhancing the illumination component, an improved Gamma transformation function is used to dynamically adjust the enhancement intensity of the highlight area and the low-brightness area by adding a correction coefficient, effectively avoiding overexposure of highlights and improving the details of dark areas;
[0010] Step 4: Perform non-local mean filtering on the reflection component to remove noise, and combine the Laplacian operator to enhance edge details;
[0011] Step 5: Adaptively adjust the saturation component (S) according to the brightness enhancement result to ensure the color naturalness and consistency of the enhanced image;
[0012] Step 6: Finally, the enhanced brightness component (V), saturation component (S) and original hue (H) are synthesized to generate an enhanced RGB image.
[0013] It can be seen from the above technical solution that compared with the prior art, it has the following technical advantages:
[0014] The method of the present invention can achieve adaptive enhancement of local areas under different lighting conditions and effectively improve the visual effect of the image by dynamically adjusting the gamma coefficient and correcting the bilateral filtering weight. Compared with the existing methods, the present invention has significant advantages in dark area detail enhancement, bright area overexposure suppression and color restoration, and has lower computational complexity, which is suitable for real-time image processing scenarios such as night monitoring, autonomous driving, medical image enhancement and low-light agricultural monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0016] Figure 1 It is the overall flow chart of the method of the present invention;
[0017] Figure 2 In the method of the present invention, the RGB image is decomposed into three HSV component images;
[0018] Figure 3It is the brightness enhancement effect of the original Gamma transform under different classical parameters in the method of the present invention;
[0019] Figure 4 It is a comparison diagram of the original image of a certain example test image in the method of the present invention, the enhancement result of the present invention, and the enhancement result of other classic methods; DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention, so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0021] The image enhancement process of the present invention is as follows Figure 1 The multi-scale Retinex low-light image enhancement method based on modified bilateral filtering of the present invention specifically comprises the following steps:
[0022] Step 1: Convert the input test RGB image to HSV color space. The specific conversion formula is as follows:
[0023] V=M max
[0024]
[0025] In the above formula, N min 、M max The values are expressed as the minimum and maximum values of the R component, G component, and B component of the image. H is the actual hue component, and H' is the enhanced hue component. The effect of the RGB image being decomposed into three HSV components is as follows Figure 2 shown.
[0026] Step 2: Use modified bilateral filtering to replace the traditional Gaussian filtering to separate the brightness component into illumination component and reflection component; When the multi-scale Retinex algorithm (MSR) is used for image enhancement, there are often halos near the higher brightness area and blurred edge details. To solve this problem, this paper proposes to use an improved modified function to optimize the bilateral filter function to replace the Gaussian filter as the center surround function in the multi-scale Retinex method. The core idea is to use an improved bilateral filter function to replace the original Gaussian function for the center surround function F(x,y) in the classic MSR algorithm. As a nonlinear filter function, bilateral filtering can well protect the image boundary and can better avoid distortion during image enhancement. When this filter is used as the center surround function, the grayscale values of two points in the image will be equal or similar, and the center surround function will also change, so there will be errors in the evaluation of the illumination component. Based on the original bilateral filter function, this paper adds a correction function g(x,y) to adjust the bilateral filter function according to the difference between the gray value of the edge pixel and the gray value of the center pixel of the convolution kernel. The weight factor of the modified bilateral filter function is used as the center surround function of the MSR algorithm, and its mathematical expression is:
[0027]
[0028] The correction function g(x,y) is taken as follows: If the difference between the gray value of the edge point and the central point is ≤σ s / 4, then The value range of k here is an arbitrary constant. The smaller k is, the smaller the change in the value of the central surround function is. The larger k is, the larger the change in the value of the central surround function is. If the difference between the gray value of the edge point and the central point is greater than σ s / 4, then g(x,y)=1. This correction function improves the bilateral filter function to prevent the central surround function from deviating too much due to the difference in distance between nodes with the same or similar grayscale values. By introducing the correction function to dynamically adjust the weight, the halo effect can be suppressed and the detail performance of the edge area can be improved.
[0029] Step 3: In the process of enhancing the illumination component, an improved Gamma transformation function is used to dynamically adjust the enhancement intensity of highlight areas and low-brightness areas by adding correction coefficients, effectively avoiding overexposure of highlights and enhancing details in dark areas; in the above step 2, after obtaining the illumination component image of the brightness component (V) through the improved MSR algorithm, it is found that the larger the grayscale value, the brighter the image, and the smaller the grayscale value, the darker the image. In this way, the image can be enhanced by stretching the value range of the pixel grayscale value. This paper improves the traditional gamma function and adds a correction coefficient c to suppress the highlight part of the image and enhance the low-brightness part of the image. The mathematical formula of the original gamma transformation is as follows:
[0030] s=g(x)=kx γ
[0031] In the above formula, k is the gray value control parameter, which is generally set to 1 and is used to control the global gray value. The value ranges of X and γ are both [0,1]. The transformation of the g(x) function can give each pixel a larger dynamic transformation range, thereby enhancing the overall brightness of the image. The effect of the classic gamma transformation is shown in the figure below: Figure 3 As shown. However, this traditional gamma function is used for the entire image synchronously, and does not take into account the situation where the difference between some areas is too large, which may cause the dark area enhancement to be unclear and the bright area to be over-enhanced. Therefore, the bright and dark areas of the image can be enhanced separately to avoid the above situation. The following will introduce the optimized gamma transformation algorithm in detail.
[0032] The optimized gamma transformation algorithm adds a [0-1] correction coefficient c to the original gamma function to enhance dark areas and suppress overly bright areas. The formula is as follows:
[0033] f1(i,j)=(1-c)f(i,j) γ +c
[0034] Where f(i,j) is the pixel grayscale value of the illumination component map of the V channel image, and f1(i,j) is the pixel grayscale value of the enhanced illumination component map. The theoretical value range of the correction coefficient c is between [0-1]. After experimental analysis, the optimal value range is [0.04-0.14]. The larger the value of c, the brighter the image. By introducing this correction parameter, dark areas can be effectively enhanced and overly bright areas can be suppressed.
[0035] Step 4: Perform non-local mean filtering on the reflection component to remove noise, and combine the Laplacian operator to enhance edge details; the reflection component image often involves the boundary features of the image and a large amount of detailed texture information, but the image noise is also mostly concentrated in the reflection component image. Therefore, using the edge enhancement operator to process the reflection component image can effectively improve the edge information of the overall image. This paper selects the Laplace operator, which uses the second-order differential to monitor the edge, has an isotropic property, is not affected by the grayscale difference of nearby pixels, and is more sensitive to detailed textures. Therefore, this algorithm uses the Laplacian operator to extract edges. For the two-dimensional image f(x,y), the principle formula of the Laplacian algorithm is as follows:
[0036]
[0037] Among them, f(x,y) is the second-order derivative, c is a constant, and g(x,y) is the image after edge enhancement.
[0038] However, the Laplace operator is only applicable to noise-free images, so low-pass filtering must be performed first. Compared with unified filtering, the use of non-local mean filtering (NL-means) based on block similarity can better preserve texture details and image edge features. The grayscale value of the center point obtained by the non-local mean filter (NL-means) is obtained by weighting and averaging the grayscale values of points in the regional block that are similar to its regional structure, so that the interference between adjacent and large-difference points when averaging can be greatly reduced, so it can both remove noise and retain image edge details.
[0039] Step 5: According to the brightness enhancement result, the saturation component (S) is adaptively adjusted to ensure the color naturalness and consistency of the enhanced image; after the brightness component (V) is enhanced, the saturation component (S) will change due to the brightness enhancement, and the overall image after enhancement will have color difference, so the saturation component (S) needs to be corrected. This paper adopts the relative coefficient saturation component adaptive correction method, which is described as follows:
[0040] s′(x,y)=s(x,y)+t[v′(x,y)-v(x,y)]λ(x,y)
[0041] in,
[0042]
[0043] Step 6: Finally, the enhanced brightness component (V), saturation component (S) and original hue (H) are synthesized to generate an enhanced RGB image.
[0044] Experimental verification and result analysis: Since different testers are too subjective in judging the same image, different testers have different criteria for judging images. Therefore, to ensure that the objective evaluation conclusion is fair and has certain data value, we should use an objective evaluation method combined with a subjective evaluation method, and use specified theorem formulas and mathematical expressions to evaluate, such as using statistical parameters of objective tests or prior knowledge to evaluate. This paper uses the following evaluation indicators: gray mean (GM), average gradient (AG), information entropy (IE), and peak signal-to-noise ratio (PSNR).
[0045] The comparison with other model effect data is shown in Table 1:
[0046] Table 1
[0047]
[0048] Based on subjective evaluation analysis, such as Figure 4 As shown in the figure, for the HE algorithm, MSR algorithm and MSRCR algorithm, the effect picture of the HE algorithm appears overexposed, while the effect pictures enhanced by the MSR method and the MSRCR method generally have color distortion problems. The newer SIRE algorithm based on the illumination and reflection estimation at the same time has a better overall enhancement effect, but the disadvantage is that the enhancement effect of the background brightness is slightly worse than that of the algorithm in this paper. The multi-scale Retinex low-light image enhancement method based on modified bilateral filtering in this paper effectively avoids chromatic aberration and reduces noise, well restores the color information and edge details of the image, suppresses halo and further improves the image saturation, thereby greatly improving the main visual perception of the image.
[0049] It should be understood that parts not elaborated in detail in this specification belong to the prior art.
[0050] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A multi-scale Retinex low-light image enhancement method based on modified bilateral filtering, characterized in that: The method comprises the following steps: Step 1: Convert the input RGB image to HSV color space and separate the brightness component (V) for enhancement; Step 2: Use modified bilateral filtering as the center-surround function of the multi-scale Retinex algorithm to separate the brightness component into the illumination component and the reflection component; Step 3: Use the improved Gamma transformation function to enhance the illumination component, suppress over-enhancement of bright areas and enhance details of dark areas; Step 4: Use non-local mean filtering to remove noise from the reflection component and use the Laplacian operator to enhance edge details; Step 5: Adopt an adaptive algorithm to adjust the saturation component (S) to ensure the naturalness of the color of the enhanced image; Step 6: Synthesize the enhanced brightness component (V), saturation component (S) and original hue (H) to output the final enhanced RGB image.
2. The method according to claim 1, characterized in that The step of correcting the bilateral filtering includes: adding a correction function g(x, y) to the original bilateral filtering function, adjusting the bilateral filtering function according to the difference between the grayscale value of the edge pixel and the grayscale value of the central pixel of the convolution kernel, and using the weight factor of the modified bilateral filtering function as the center surround function of the MSR algorithm, and its mathematical expression is: The correction function g(x,y) is taken as follows: If the difference between the gray value of the edge point and the central point is ≤σ s / 4, then The value range of k here is an arbitrary constant. The smaller k is, the smaller the change in the value of the central surround function is. The larger k is, the larger the change in the value of the central surround function is. If the difference between the gray value of the edge point and the central point is greater than σ s / 4, then g(x,y)=1.
3. The method according to claim 1, characterized in that: The step of using the improved Gamma transformation function to enhance the illumination component includes: adding a correction coefficient c to the traditional gamma function to suppress overexposure of the highlight part of the image and enhance the low-brightness part of the image, as shown in the following formula: f1(i,j)=(1-c)f(i,j) γ +c Where f(i,j) is the pixel grayscale value of the illumination component map of the V channel image, and f1(i,j) is the pixel grayscale value of the enhanced illumination component map. The theoretical value range of the correction coefficient c is between [0-1]. After experimental analysis, the optimal value range is [0.04-0.14]. The larger the value of c, the brighter the image.
Citation Information
Cited By
Face image enhancement and recognition method in low-light environment
CN120452048A
Image recognition method for port district combined transportation site
CN120912489A
AI video detection method and device based on multi-feature branch fusion, and storage medium
CN121280972A