Low-illumination image enhancement method, device, equipment and medium
Through adaptive brightness partitioning and contrast enhancement model, the problem of inaccurate low-light image enhancement caused by fixed thresholds in existing technologies is solved, and accurate brightness enhancement and structure preservation of low-light images are achieved.
Patent Information
- Application Number
- CN202510792956.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-13
AI Technical Summary
The gradient consistency constraint and regularization terms in existing variational models use fixed values, resulting in inaccurate enhancement effects for low-light images of different colors.
An adaptive brightness partitioning mechanism is adopted to divide the image domain into bright and dark areas by setting the optimal intensity threshold. A contrast enhancement model including gradient consistency constraint, regularization term and characteristic function is constructed to adaptively adjust the contrast and brightness in the dark area.
It achieves precise brightness enhancement of low-light images, preserves the image's structural information and color features, and improves image quality.
Smart Images

Figure CN120655558A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a low-light image enhancement method, device, equipment and medium. Background Art
[0002] Contrast enhancement of dark or overly bright images is a current research hotspot. Low contrast not only leads to unclear or unpleasant images for the human eye, but also reduces the accuracy of automatic visual inspection. Therefore, image contrast optimization becomes a key step in image preprocessing. The main goal of image tone adjustment is to make hidden image features and details clearer, thereby improving image quality. At the same time, image tone adjustment is the basis of geospatial imaging (land mapping, environmental monitoring), clinical diagnosis (functional MRI, tomographic reconstruction) and nanomaterial analysis (cryo-electron microscopy tomography, STEM-EELS spectroscopy).
[0003] Image contrast enhancement methods mainly include explicit methods and implicit paradigms. Explicit methods and implicit paradigms can be divided into three different categories: histogram methods, spectral methods, and spatial methods. Histogram methods enhance the dynamic range of the resulting image by redistributing or expanding digital values. Histogram equalization (HE) is the most representative histogram method. HE uses the cumulative distribution function of the input pixel intensity as a transformation function to obtain a uniformly distributed histogram. However, this method sometimes over-enhances and artifacts appear in the processed image. Spectral methods mainly use Fourier transform and wavelet transform as their basic framework. They generally decompose the input low-light image into multiple scales or subbands and strategically apply nonlinear operations to the transform coefficients derived from these multiple scales or subbands. However, spectral methods are significantly affected by lighting and generally have difficulty correctly distinguishing between bright and dark areas in the image, resulting in large differences in the processed image. Spatial methods directly modify image intensity to achieve the purpose of image enhancement by leveraging certain spatial assumptions of the human visual system. However, spatial methods are affected by human subjectivity and are difficult to perform image enhancement correctly.
[0004] In response to the problems and limitations of the histogram method, spectral method and spatial method, the researchers proposed a variational model that includes a gradient consistency constraint and a regularization term. The gradient consistency constraint in the variational model is the gradient of the desired image minus the gradient of the input image, squared, and then integrated over the image domain. The regularization term is the desired image minus a fixed constant, squared, and then integrated over the image domain. However, the gradient consistency constraint and regularization terms in the variational model are fixed enhancement strategies because the gradient of the subtracted input image is a fixed value compared to the fixed constant. For low-light images with different colors, this fixed enhancement strategy is difficult to achieve more accurate enhancement. Summary of the Invention
[0005] Embodiments of the present invention provide a low-light image enhancement method, apparatus, device, and medium, which can solve the problem in the prior art that the gradient consistency constraint term and regularization term in the current variational model are fixed enhancement strategies because the gradient of the subtracted input image is a fixed value compared to a fixed constant. However, for low-light images with different colors, this fixed enhancement strategy is difficult to achieve relatively accurate enhancement.
[0006] An embodiment of the present invention provides a low-light image enhancement method, comprising the following steps: Obtain a low-light image and the brightness value of each pixel in the low-light image, and calculate the average brightness value of all pixels in the low-light image; A brightness threshold is set according to the average brightness value, and the image domain of the low-light image is divided into a dark area and a bright area based on the brightness threshold; wherein the bright area is an area with a brightness value higher than the brightness threshold, and the dark area is an area with a brightness value lower than the brightness threshold; A contrast enhancement model is constructed, and the brightness of each pixel in the dark area is enhanced based on the contrast enhancement model to obtain an image with enhanced brightness. The contrast enhancement model is expressed as: ; in: represents the gradient consistency constraint, Represents the output image The gradient, represents the gradient of the adaptive gradient adjustment function, Ω represents the image domain; represents the regularization term, represents the equilibrium parameter, Represents the adaptive brightness adjustment function; represents the characteristic function; the gradient consistency constraint is used to adjust the differential structure of each pixel in the dark area, including edge features and texture features, to adjust the contrast of each pixel in the dark area; the regularization term is used to enhance the brightness of each pixel in the dark area; the characteristic function is used to constrain the pixel value of each pixel in the dark area.
[0007] Preferably, when the low-light image is a grayscale image, dividing the image domain of the grayscale image into a dark area and a bright area includes: Get the brightness value of each pixel in the grayscale image and calculate the average brightness value of all pixels in the grayscale image ; According to the average brightness Set the brightness threshold of the grayscale image to 1.1 times the average brightness value , the image domain of the grayscale image is divided into dark and bright areas according to the brightness threshold; The bright area in the grayscale image is an area where the brightness threshold is higher than the brightness threshold, and the dark area in the grayscale image is an area where the brightness threshold is lower than the brightness threshold.
[0008] Preferably, when the low-light image is a color image, dividing the image domain of the color image into a dark area and a bright area includes: Get each pixel in the color image and decompose each pixel into three channel components: 、 and , get the maximum channel brightness value of each pixel , expressed as: ; Calculate the global average maximum brightness value of all pixels , expressed as: ; in: x ∈Ω; According to the global average maximum brightness Set the brightness threshold of the color image to 1.1 times the global average maximum brightness value , the image domain of the color image is divided into dark and bright areas according to the brightness threshold; The bright area in the color image is an area where the brightness threshold is higher than the brightness threshold, and the dark area in the color image is an area where the brightness threshold is lower than the brightness threshold.
[0009] Preferably, the setting of the brightness threshold of the color image includes: Maximum channel brightness value Proportional to the three channels represented by hue, saturation and brightness HSV, the normalization is expressed as: ; but V and the maximum channel brightness value Consistent in division.
[0010] Preferably, the adaptive gradient adjustment function in the contrast enhancement model Expressed as: ; Adaptive brightness adjustment function within the contrast enhancement model Expressed as: ; in: α represents the contrast parameter; β Represents brightness parameter; Represents the bright area of the image domain of low-light images; Represents the dark area of the image domain of low-light images; The characteristic function Expressed as: ; in: S Represents a closed bounded interval.
[0011] An embodiment of the present invention further provides a low-light image enhancement device, comprising: An image partitioning module is used to obtain a low-light image and the brightness value of each pixel in the low-light image, and calculate the average brightness value of all pixels in the low-light image; A brightness threshold is set according to the average brightness value, and the image domain of the low-light image is divided into a dark area and a bright area based on the brightness threshold; wherein the bright area is an area with a brightness value higher than the brightness threshold, and the dark area is an area with a brightness value lower than the brightness threshold; The image enhancement module is used to build a contrast enhancement model, enhance the brightness of each pixel in the dark area based on the contrast enhancement model, and obtain an image with enhanced brightness; the contrast enhancement model is expressed as: ; in: represents the gradient consistency constraint, Represents the output image The gradient, represents the gradient of the adaptive gradient adjustment function, Ω represents the image domain; represents the regularization term, represents the equilibrium parameter, Represents the adaptive brightness adjustment function; represents the characteristic function; the gradient consistency constraint is used to adjust the differential structure of each pixel in the dark area, including edge features and texture features, to adjust the contrast of each pixel in the dark area; the regularization term is used to enhance the brightness of each pixel in the dark area; the characteristic function is used to constrain the pixel value of each pixel in the dark area.
[0012] An embodiment of the present invention further provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the steps of the low-light image enhancement method described above when executing the computer program stored in the memory.
[0013] An embodiment of the present invention further provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of the low-light image enhancement method described above.
[0014] The embodiments of the present invention provide a low-light image enhancement method, apparatus, device, and medium. Compared with the prior art, the embodiments of the present invention have the following beneficial effects: The present invention first introduces an adaptive brightness partitioning mechanism to determine an optimal intensity threshold, and at the same time determines the optimal intensity threshold to be 1.1 times the average brightness value of the image domain. Based on the optimal intensity threshold, the image domain is divided into a bright area and a dark area, and subsequently only the dark area can be brightness enhanced; then, when the brightness of the dark area is enhanced, a contrast enhancement model including a gradient consistency constraint term, a regularization term and a characteristic function is constructed. The gradient consistency constraint term in the contrast enhancement model is the gradient of the desired image minus the gradient of the adaptive gradient adjustment function, which is squared and then integrated over the image domain. The regularization term is The desired image is subtracted from the adaptive brightness adjustment function, squared, and then integrated over the image domain. At the same time, a characteristic function is added to constrain the pixel value of each pixel in the dark area. That is, in the contrast enhancement model of the present invention, the gradient consistency constraint term subtracts the gradient of the adaptive gradient adjustment function, and the regularization term subtracts the adaptive brightness adjustment function. The gradient of the adaptive gradient adjustment function can adaptively adjust the contrast amplification, and the adaptive brightness adjustment function can adaptively adjust the brightness amplification factor, so that the brightness of the dark area in the low-light image can be adaptively adjusted, thereby achieving accurate enhancement of the brightness of the low-light image. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of the overall process of a low-light image enhancement method provided by an embodiment of the present invention; Figure 2 Schematic diagram of the comparison of domain partitioning results of a low-light image enhancement method provided by an embodiment of the present invention; (a), (d), (g), and (j) are test images; (b), (e), (h), and (k) are images obtained using a 0.299 +0.587 +0.114 The result of domain division of the calculated grayscale image; (c), (f), (i) and (l) are the maximum image proposed by the present invention The results of regional division; Figure 3 A schematic diagram of the image effect after setting contrast parameters in a low-light image enhancement method provided by an embodiment of the present invention; Figure 4 A schematic diagram comparing the enhancement effects of a low-light image enhancement method provided by an embodiment of the present invention and other enhancement methods in scene 1; Figure 5 A schematic diagram comparing the enhancement effects of a low-light image enhancement method provided by an embodiment of the present invention and other enhancement methods in scenario 2; Figure 6 A schematic diagram comparing the enhancement effects of a low-light image enhancement method provided by an embodiment of the present invention and a learning-based enhancement method in scene three; Figure 7 A schematic diagram comparing the enhancement effects of a low-light image enhancement method provided by an embodiment of the present invention and a learning-based enhancement method in scenario 4; Figure 8 A schematic diagram comparing an original image of a low-light image enhancement method provided by an embodiment of the present invention and an enhancement effect after enhancement using the enhancement method of the present invention. DETAILED DESCRIPTION
[0016] To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following description sets forth numerous specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0017] See also Figure 1 The embodiment of the present invention provides a low-light image enhancement method. In view of the limitations of the current histogram method, spectral method, and spatial method, researchers at this stage have proposed a simple variational model, which can be expressed as: (1) Where: ∇ represents the first-order differential operator; Ω represents the image domain; g and f Represent the input image and the expected image respectively; represents the average value of f on Ω.
[0018] Integral expression As a gradient consistency constraint, ensure f Preserve the differential structure of the original image.
[0019] Will As a regularization term, it can reduce f variance, thereby eliminating the effect of non-uniform lighting.
[0020] at the same time, µ >0 is a parameter that balances variance reduction and detail preservation; when µ Small enough ( µ →0), the required image f With the input image g coincide; on the contrary, when µ Large enough to expect the imagef is infinitely close to a constant; when µ When becomes large, the variational model described above can act as a high-pass filter.
[0021] Although the variational model described above achieves partially satisfactory computational performance on irregular intensity distributions, it has deficiencies in parameter sensitivity and computational efficiency. For example, in the variational model (1), the selection of the screening coefficient µ has a significant impact on the enhancement effect, and its core is based only on empirical parameter adjustment or simple local gradient statistics. Such strategies may lead to detail loss or noise amplification in complex scenes (such as low-light noisy images) and lack robust theoretical guidance. For high-resolution images (such as 4K or medical volume data), the computational complexity increases significantly, making it difficult to meet real-time processing requirements (such as mobile terminals or video streaming scenarios).
[0022] To address the problems existing in the variational model described above, this paper proposes an innovative adaptive framework to optimize low-brightness images. Specifically: 1. Enhance grayscale images.
[0023] In the variational framework, the low-light image contrast enhancement problem can be expressed as: given an original low-light (low-contrast) image g , the overall goal of enhancement is to identify a g Images with similar gradients but reduced variance f , to compensate for uneven light; the present invention first designs a contrast enhancement model, which is expressed as: (2) From the above description, we can see that variational model (2) is sparser than variational model (1); on the one hand, the enhanced image obtained by variational model (1) is smoother, while the enhanced image obtained by variational model (2) tends to retain the image structure; on the other hand, variational model (1) (i.e. |∇ f −∇ g |²) Based on the assumption ∇ f −∇ g follows a Gaussian distribution, while the variational model (2) (i.e. |∇ f −∇ g |) is based on the assumption that ∇ f −∇ g It conforms to the Laplace distribution; experiments show that ∇ f −∇ g It is closer to the Laplace distribution than the Gaussian distribution. Therefore, the variational model (2) is more reasonable and effective than the variational model (1).
[0024] However, the critical condition of variational model (2) is highly nonlinear, and great difficulties will be encountered when solving it. In order to make variational model (2) simpler and easier to solve, the present invention transforms variational model (2) and expresses it as: (3) in: g represents the average value on Ω, that is Instead of the variational model (2) .
[0025] Although the variational model (3) is simple and efficient, it requires the expected image f Close to pixel-independent average , which is not unreasonable in image enhancement, and is consistent with the requirement ∇ f Close ∇ g and limit parameters µ Very little contradiction.
[0026] In order to obtain better low-light image effects, the present invention inputs the image g and constant In the variational model (3), two adaptive, pixel-dependent functions are replaced u and h , so the variational model (3) can be rewritten as: (4) Adaptive function u 、 h and characteristic function Expressed as: (5) The contrast parameter α >1.
[0027] (6) The brightness parameter β >0.
[0028] (7) in: and Represent the bright part and the dark part of the image domain Ω respectively; the second term in the variational model (4) serves not only as a regularization component, but also partially as a data fidelity component; the reason is that the adjustable function of the bright part in formula (6) h The value of is defined as the value of the original image g(x).
[0029] In order to make the adaptive function u In the variational model (4), the present invention redefines the adaptive function uThe form is as follows: (8) Where: G∗ represents Gaussian convolution; indicator function , if x∈Ξ, the indicator function holds, otherwise .
[0030] The present invention inputs an image g The image domain Ω (i.e., low-light image with non-uniform illumination) is divided into bright parts and Anbu , making ∩ =∅ and Ω= ∪ ; At the same time, the present invention selects 1.1 ( is the average intensity of g) as the segmentation threshold, the present invention selects 1.1 instead of The reason why the input image of the present invention is a low-light image is that the threshold value of the segmentation is . Specifically, if As the segmentation threshold, the interval [ , 1.1 ] will also be marked as a bright area; however, since the input image is a low-light image, [ , 1.1 ] is still dark for the human visual system; for x∈ , the bright elements should be preserved by ensuring that the desired image f closely matches the input image g(x); for , the dark elements should be obtained by making the desired image f close to To enhance, a higher β can more clearly reveal the occluded image features and details; in addition, the contrast parameter Used to enhance dark areas The local gradient of .
[0031] characteristic function exist f If the value of exceeds the closed bounded interval S, it takes zero, otherwise it takes positive infinity; in order to limit f to the closed bounded interval S, is added to the energy functional; in practice, two reasonable choices for S are [0, 255] and [inf f(x), sup f(x)]; for convenience, this paper will use S = [0, 255].
[0032] 2. Enhance color images.
[0033] In the variational model (4), the dynamic function u and hIt is specially developed for processing grayscale images under low light conditions; the present invention extends the previous domain division to include color images; dark areas refer to those pixels that are blurred, invisible and poorly lit (e.g. Figure 2 (a)), while bright areas refer to those pixels that are clearly visible and well-defined in Ω (e.g. Figure 2 (a) lights and ground); the goal of this invention is to classify the pixels in Ω into two categories (dark areas and bright areas) and enhance the dark areas.
[0034] Based on this, the present invention first defines the maximum image as: (9) in:( ) represents that the max operator is performed point by point on x∈Ω.
[0035] The domain Ω of the image is then divided into the following two different parts: (10) (11) in: .
[0036] like Figure 2 (c), (f), (i) and (l) in the figure show the domain segmentation results of low-light images calculated according to formulas (10)-(11), that is, Figure 2 (a), (d), (g) and (j) are the domain segmentation results of low-light images calculated according to formulas (10)-(11); Figure 2 (b), (e), (h), and (k) are calculated by using 0.299 for (a), (d), (g), and (j). +0.587 +0.114 The result of domain partitioning of the calculated grayscale image.
[0037] In our research, we found that using the maximum image as a classifier can produce reasonable partitioning because the maximum image value is proportional to the channel represented by hue, saturation, and value (HSV), where ;therefore, and V achieve the same correct partitioning; on the contrary, other classifiers may lead to incorrect partitioning; e.g. Figure 2 As shown in (b), (e), (h) and (k), it can be seen that some pixels are misclassified. For example, in (e), the window is misclassified as a dark area, and in (h), the red life jacket is misclassified as a dark area.
[0038] To solve this problem, channel domain partitioning is a possible approach, but this method often leads to hue preservation problems; for example, for an element ∈Ω, where the color intensity is given by given; at this time is a larger value; if (or V channel) as a classifier, then will be assigned to As a bright element; therefore, As the bright element will be kept as close as possible to (220,15,15), while the tint will be On the other hand, if the domain is divided by channel, will be classified in channel R as , which are classified in channels G and B as ;therefore, Will keep it near 220 as much as possible, and and will be enhanced; as a result, The tones at the edges will not be preserved, which will result in an unnatural image; therefore, channel domain partitioning is an unreasonable method.
[0039] Based on this, the present invention expands the variational model (4) into: (12) in and Expressed as: (13) (14) in: ; .
[0040] The core of the present invention is to divide the image domain into darker and lighter regions by applying an optimal threshold. Then, suitable terms are used to represent the dark regions so that pixels in the dark regions can be enhanced by adjusting contrast and brightness parameters. The present invention determines an optimal intensity threshold to segment the image into distinct dark and light regions within its algorithmic framework. The model then assigns different optimization criteria to the segmented regions: relatively dark regions are intensity-modulated using calibrated contrast and brightness factors, while high-brightness regions retain their inherent radiometric properties with minimal deviation.
[0041] In the experiment, the present invention sets the contrast parameter ; The reason is the increase A value of 0 can enhance the brightness of dark pixels but also flatten their intensity levels; a larger The value is more preferred to enhance the image structure and avoid overly flat enhancement results; when The effect is best when and The model parameters are , The number of iterations is 1269. The number of iterations are 833, 862 and 860 respectively. .
[0042] like Figure 3 As shown, Figure 3 (a) represents the original image, and (b) represents the The enhanced image, (c) represents the 、 = 0.7 enhanced image, (d) represents the image after 、 =1 enhanced image, (e) represents the image after 、 =1.3 After the enhanced image, it can be seen that the use will darken the sky, which is an undesirable effect; in contrast, using Helps in low light images The original colors were maintained while the trees and stone pillars were restored; As the sky grew larger, the trees and stone pillars became brighter and brighter.
[0043] like Figure 4 and Figure 5 A comparison of the enhancement effects between the method of the present invention and different enhancement methods is shown; Figure 4 In the figure, the sky area is shown to be unable to be accurately processed by LIME and RRM, and some details in the enhanced results of NPE and RRM methods have been lost; Figure 4 In the exterior wall area, the enhancement effect of the present invention achieves better visual effects than the NPE, LIME and RRM methods (for example, in Figure 4 The enhanced effect of the present invention retains more details and is more natural).
[0044] exist Figure 5 In the results of NPE and RRM, there is a phenomenon of detail loss, such as Figure 5 Meanwhile, over-enhancement and color distortion are also observed in the results of LIME. Compared with these methods, the method of the present invention not only retains the color characteristics of the image itself when enhancing low-light images (i.e., produces more natural results), but also retains the texture details in the image.
[0045] like Figure 6 and Figure 7As shown in Figure 2, the proposed method is compared with other learning-based low-light image enhancement methods, including KinD++
[51] , RUAS
[50] , and URetinex-Net
[52] . KinD++ and RUAS use 330 post-processing methods to eliminate noise, which sometimes leads to problems such as loss of details, blurring, and even image quality degradation. In contrast, URetinex-Net aims to suppress noise and retain details, effectively improving the visibility of low-light images. However, its enhancement results often lead to color distortion and other phenomena. For example, Figure 6 The color of leaves in (d) and Figure 7 (d) The sky color. In comparison, the method of the present invention performs better in color correction and noise suppression.
[0046] The present invention uses four indicators (PSNR, SSIM, MAE and LPIPS) to evaluate image quality to judge the enhancement effect; higher PSNR and SSIM values indicate better image quality; conversely, smaller MAE and LPIPS values indicate higher image quality.
[0047] As shown in Table 1, the quantitative results of the 100 images in the dataset are presented. The results show that the proposed method generally outperforms other techniques in multiple indicators, but is slightly inferior to Urentintx-Net in SSIM and slightly inferior to KinD++ and Urentintx-Net in MAE. The proposed method significantly outperforms all other methods in PSNR and 345 LPIPS, demonstrating the effectiveness of the proposed method. In addition, the proposed method achieves the highest average ranking, which is obtained by aggregating the rankings of each indicator.
[0048] Table 1 Quantitative results of 100 images on different indicators like Figure 8 As shown in FIG, there is a comparison between the original image and the enhanced effect after being enhanced using the enhancement method of the present invention. It can be seen that the enhancement method of the present invention can better adapt to the regional image features through adaptive brightness partitioning and achieve a more refined enhancement effect; and the enhancement method of the present invention can achieve more accurate contrast enhancement through adaptive brightness partitioning and variational model, while better preserving the structural information of the image, far exceeding other image enhancement methods at this stage.
[0049] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.
Claims
1. A low-light image enhancement method, characterized in that: The following steps are involved: Obtain a low-light image and the brightness value of each pixel in the low-light image, and calculate the average brightness value of all pixels in the low-light image; A brightness threshold is set according to the average brightness value, and the image domain of the low-light image is divided into a dark area and a bright area based on the brightness threshold; wherein the bright area is an area with a brightness value higher than the brightness threshold, and the dark area is an area with a brightness value lower than the brightness threshold; A contrast enhancement model is constructed, and the brightness of each pixel in the dark area is enhanced based on the contrast enhancement model to obtain an image with enhanced brightness. The contrast enhancement model is expressed as: ; in: represents the gradient consistency constraint, Represents the output image The gradient, represents the gradient of the adaptive gradient adjustment function, Ω represents the image domain; represents the regularization term, represents the equilibrium parameter, Represents the adaptive brightness adjustment function; represents the characteristic function; the gradient consistency constraint is used to adjust the differential structure of each pixel in the dark area, including edge features and texture features, to adjust the contrast of each pixel in the dark area; the regularization term is used to enhance the brightness of each pixel in the dark area; the characteristic function is used to constrain the pixel value of each pixel in the dark area.
2. The low-light image enhancement method according to claim 1, characterized in that: When the low-light image is a grayscale image, dividing the image domain of the grayscale image into a dark area and a bright area includes: Get the brightness value of each pixel in the grayscale image and calculate the average brightness value of all pixels in the grayscale image ; According to the average brightness Set the brightness threshold of the grayscale image to 1.1 times the average brightness value , the image domain of the grayscale image is divided into dark and bright areas according to the brightness threshold; The bright area in the grayscale image is an area where the brightness threshold is higher than the brightness threshold, and the dark area in the grayscale image is an area where the brightness threshold is lower than the brightness threshold.
3. The low-light image enhancement method according to claim 1, wherein: When the low-light image is a color image, dividing the image domain of the color image into a dark area and a bright area includes: Get each pixel in the color image and decompose each pixel into three channel components: 、 and , get the maximum channel brightness value of each pixel , expressed as: ; Calculate the global average maximum brightness value of all pixels , expressed as: ; in: x ∈Ω; According to the global average maximum brightness Set the brightness threshold of the color image to 1.1 times the global average maximum brightness value , the image domain of the color image is divided into dark and bright areas according to the brightness threshold; The bright area in the color image is an area where the brightness threshold is higher than the brightness threshold, and the dark area in the color image is an area where the brightness threshold is lower than the brightness threshold.
4. The low-light image enhancement method according to claim 3, wherein: The setting of the brightness threshold of the color image includes: Maximum channel brightness value Proportional to the three channels represented by hue, saturation and brightness HSV, the normalization is expressed as: ; but V and the maximum channel brightness value Consistent in division.
5. The low-light image enhancement method according to claim 1, wherein: Adaptive gradient adjustment function within the contrast enhancement model Expressed as: ; Adaptive brightness adjustment function within the contrast enhancement model Expressed as: ; in: α represents the contrast parameter; β Represents brightness parameter; Represents the bright area of the image domain of low-light images; Represents the dark area of the image domain of low-light images; The characteristic function Expressed as: ; in: S Represents a closed bounded interval.
6. A low-light image enhancement device, characterized in that: include: An image partitioning module is used to obtain a low-light image and the brightness value of each pixel in the low-light image, and calculate the average brightness value of all pixels in the low-light image; A brightness threshold is set according to the average brightness value, and the image domain of the low-light image is divided into a dark area and a bright area based on the brightness threshold; wherein the bright area is an area with a brightness value higher than the brightness threshold, and the dark area is an area with a brightness value lower than the brightness threshold; The image enhancement module is used to build a contrast enhancement model, enhance the brightness of each pixel in the dark area based on the contrast enhancement model, and obtain an image with enhanced brightness; the contrast enhancement model is expressed as: ; in: represents the gradient consistency constraint, Represents the output image The gradient, represents the gradient of the adaptive gradient adjustment function, Ω represents the image domain; represents the regularization term, represents the equilibrium parameter, Represents the adaptive brightness adjustment function; represents the characteristic function; the gradient consistency constraint is used to adjust the differential structure of each pixel in the dark area, including edge features and texture features, to adjust the contrast of each pixel in the dark area; the regularization term is used to enhance the brightness of each pixel in the dark area; the characteristic function is used to constrain the pixel value of each pixel in the dark area.
7. An electronic device, characterized in that: include: memory and processor; The memory is used to store computer programs; The processor is configured to implement the steps of a low-light image enhancement method according to any one of claims 1 to 5 when executing the computer program stored in the memory.
8. A computer-readable storage medium, characterized in that Used to store a computer program, which, when executed by a processor, implements the steps of a low-light image enhancement method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for enhancing low-light image
CN109255756A
Total variation image fusion method based on an adaptive weight
CN112102216A
Real image reproduction method based on non-ideal illumination image
CN115049561A
Method and device for enhancing image contrast
WO2020082593A1