A low-light image enhancement method, device, equipment and medium

By converting low-illumination images from the RGB space of the display system to the HSV space of the human eye visual characteristics, combined with adaptive brightness enhancement and nonlinear saturation processing of area segmentation, the halo and color distortion problems of low-illumination images are solved, improving image quality and reducing computing complexity.

CN114037641BActive Publication Date: 2025-07-29SHANDONG SENTER ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111215441.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2025-07-29
Estimated Expiration
2041-10-19

AI Technical Summary

Technical Problem

The existing low-illumination image enhancement methods can easily lead to halo and color distortion when dealing with brightness differences in different regions, and the traditional methods have high computational complexity.

Method used

The low-illumination image is converted from the first color space to the second color space that conforms to the visual characteristics of the human eye, and the brightness component is processed through adaptive global enhancement, and the saturation component is processed based on the cluster segmentation area, and the saturation component is processed, and finally converted back to the first color space.

Benefits of technology

It effectively reduces color distortion, improves image quality, reduces operation complexity, and achieves selective image enhancement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114037641B_ABST
    Figure CN114037641B_ABST
Patent Text Reader

Abstract

An embodiment of this specification discloses a low-light image enhancement method. The method includes: obtaining a low-light image in a first color space; converting the low-light image from the first color space to a second color space, and obtaining a saturation component and a brightness component of the low-light image in the second color space; performing adaptive global enhancement processing on the brightness component of the low-light image to obtain a first image; performing region segmentation on the first image based on clustering, and determining a first region and a second region of the first image; the brightness of the first region is higher than that of the second region, and the brightness difference between the first region and the second region is greater than a preset threshold; performing non-linear stretching on the saturation component of the second region, and performing masking processing on the first region to adjust the saturation component of the second region and obtain a processed second image; converting the processed second image from the second color space to the first color space to obtain an enhanced image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of image processing technologies, and in particular, to a low-light image enhancement method, device, equipment, and medium. Background Art

[0002] In applications such as image acquisition or video surveillance, there are often low-light situations such as backlighting. The signal-to-noise ratio and contrast of the captured images are relatively low, and image enhancement processing is required to make the details in the images recognizable. Image enhancement is to expand the gray range of the image and increase the overall brightness of the image, improve the subjective quality of the image, and enable unidentifiable image details to be recognized by the human eye or machine.

[0003] In current traditional image enhancement methods, if the significant differences in brightness in different regions are not taken into account, it is easy to cause phenomena such as halos in high-brightness regions or obvious color distortion problems.

[0004] Therefore, there is a need for a method that can effectively enhance low-light images. Summary of the Invention

[0005] One or more embodiments of this specification provide a low-light image enhancement method to solve the following technical problem: how to provide an effective and simple method for enhancing low-light images.

[0006] One or more embodiments of this specification adopt the following technical solutions:

[0007] One or more embodiments of this specification provide a low-light image enhancement method, which includes:

[0008] Obtain a low-light image in a first color space; wherein, the first color space conforms to the color display of the display system;

[0009] Convert the low-light image from the first color space to a second color space, and obtain the saturation component and the brightness component of the low-light image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye;

[0010] Perform adaptive global enhancement processing on the brightness component of the low-light image to obtain a first image;

[0011] Perform region segmentation on the first image based on clustering to determine a first region and a second region of the first image; wherein, the brightness of the first region is higher than that of the second region, and the brightness difference between the first region and the second region is greater than a preset threshold;

[0012] Non-linearly stretch the saturation component of the second region and perform masking processing on the first region to adjust the saturation component of the second region and obtain a processed second image;

[0013] Convert the processed second image from the second color space to the first color space to obtain an enhanced image.

[0014] Optionally, in one or more embodiments of this specification, the method for regionally segmenting the first image based on clustering to determine the first region and the second region of the first image specifically includes:

[0015] Select multiple initial class centers in the first image;

[0016] Assign the points in the first image to the nearest initial class center among the multiple initial class centers according to the Euclidean distance to obtain multiple clustered classes;

[0017] Calculate the current class center of each class according to the clustered classes;

[0018] If the current class center is different from the initial class center, iterate to re-obtain the class center points of the first image; if the current class center is the same as the initial class center, obtain the segmentation result of the first region and the second region.

[0019] Optionally, in one or more embodiments of this specification, the step of selecting multiple initial class centers in the first image specifically includes:

[0020] Determine the number of regional divisions of the first region and the second region in the first image;

[0021] Select multiple initial class center points in the corresponding regions of the first image according to the number of regional divisions; wherein, the number of initial class centers corresponds to the number of regional divisions.

[0022] Optionally, in one or more embodiments of this specification, the step of non-linearly stretching the saturation component of the second region and performing masking processing on the first region to adjust the saturation component of the second region and obtain a processed second image specifically includes:

[0023] Obtain the saturation component and the brightness component of each pixel point in the first image;

[0024] Perform masking occlusion processing on the first region and non-linearly stretch the saturation component of the pixel points in the second region according to a preset stretching formula; wherein, the preset stretching formula is:

[0025] λ is an adjustment parameter, and V is the luminance component; when mask(x,y)=1, it indicates that the pixel is not in the first region; when mask(x,y)=0, it indicates that the pixel is in the first region.

[0026] Optionally, in one or more embodiments of the present specification, the conversion of the low-illumination image from the first color space to the second color space specifically includes:

[0027] Obtaining the luminance component of the low-illumination image in the second color space according to a preset first conversion formula; wherein, the preset first conversion formula is: V = max(R, G, B); V is the luminance component in the second color space, and R, G, and B are the three primary color components in the first color space;

[0028] Obtaining the saturation component of the low-illumination image in the second color space according to a preset second conversion formula; wherein, the preset second conversion formula is: S is the saturation component in the second color space, and C = min(R, G, B);

[0029] Obtaining the chromaticity component of the low-illumination image in the second color space according to a preset third conversion formula; wherein, the preset third conversion formula is H is the chromaticity component in the second color space.

[0030] Optionally, in one or more embodiments of the present specification, the adaptive global enhancement processing of the luminance component of the low-illumination image to obtain a first image specifically includes:

[0031] Obtaining the logarithmic mean value of the luminance component in the second color space according to the logarithmic mean value formula; wherein, the logarithmic mean formula is N represents the total number of pixels, σ is an arbitrary minimum value, represents the logarithmic mean value of the luminance component;

[0032] Performing adaptive enhancement processing on the luminance component of the low-illumination image according to a preset luminance adjustment formula to obtain a first image; wherein the preset luminance adjustment formula is V'(x,y) is the output result of the first image after the enhancement of the luminance component, and V max is the maximum luminance value of the low-illumination image.

[0033] Optionally, in one or more embodiments of the present specification, after obtaining the enhanced image, the method further includes:

[0034] Obtain the enhanced image as the low - illumination color image to be processed, and based on guided filtering in the spatial domain of the low - illumination color image to be processed, remove the high - frequency noise of the low - illumination image to obtain the image after guided filtering;

[0035] Perform wavelet decomposition on the image after guided filtering to perform wavelet threshold denoising on the image after guided filtering;

[0036] Obtain the low - illumination image in the first color space based on inverse wavelet transform.

[0037] One or more embodiments of this specification provide a low - illumination image enhancement device, which is characterized in that the device includes:

[0038] An acquisition unit, configured to acquire a low - illumination image in the first color space; wherein, the first color space conforms to the color display of the display system;

[0039] A first conversion unit, configured to convert the low - illumination image from the first color space to the second color space, and obtain the saturation component and the brightness component of the low - illumination image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye;

[0040] A first processing unit, configured to perform adaptive global enhancement processing on the brightness component of the low - illumination image to obtain a first image;

[0041] A segmentation unit, configured to perform region segmentation on the first image based on clustering, and determine a first region and a second region of the first image; wherein, the brightness of the first region is higher than that of the second region, and the brightness difference between the first region and the second region is greater than a preset threshold;

[0042] A second processing unit, configured to perform non - linear stretching on the saturation component of the second region, and perform masking processing on the first region to adjust the saturation component of the second region to obtain a processed second image;

[0043] A second conversion unit, configured to convert the processed second image from the second color space to the first color space to obtain an enhanced image.

[0044] One or more embodiments of this specification provide a low - illumination image enhancement device, including:

[0045] At least one processor; and,

[0046] A memory communicatively connected to the at least one processor; wherein,

[0047] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0048] Obtain a low-illumination image in a first color space; wherein, the first color space conforms to the color display of the display system;

[0049] Convert the low-illumination image from the first color space to a second color space, and obtain the saturation component and the luminance component of the low-illumination image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye;

[0050] Perform adaptive global enhancement processing on the luminance component of the low-illumination image to obtain a first image;

[0051] Perform region segmentation on the first image based on clustering, and determine a first region and a second region of the first image; wherein, the luminance of the first region is higher than that of the second region, and the luminance difference between the first region and the second region is greater than a preset threshold;

[0052] Perform non-linear stretching on the saturation component of the second region, and perform masking processing on the first region to adjust the saturation component of the second region to obtain a processed second image;

[0053] Convert the processed second image from the second color space to the first color space to obtain an enhanced image.

[0054] A non-volatile computer storage medium provided by one or more embodiments of this specification stores computer-executable instructions, and the computer-executable instructions are set to:

[0055] Obtain a low-illumination image in a first color space; wherein, the first color space conforms to the color display of the display system;

[0056] Convert the low-illumination image from the first color space to a second color space, and obtain the saturation component and the luminance component of the low-illumination image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye;

[0057] Perform adaptive global enhancement processing on the luminance component of the low-illumination image to obtain a first image;

[0058] Perform region segmentation on the first image based on clustering, and determine a first region and a second region of the first image; wherein, the luminance of the first region is higher than that of the second region, and the luminance difference between the first region and the second region is greater than a preset threshold;

[0059] Non-linearly stretch the saturation component of the second region and perform masking processing on the first region to adjust the saturation component of the second region and obtain a processed second image;

[0060] Convert the processed second image from the second color space to the first color space to obtain an enhanced image.

[0061] The above at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:

[0062] Convert a low-illumination image from the first color space suitable for the display system to the second color space that conforms to the human eye's visual characteristics for enhancement processing, avoiding the color imbalance problem caused by enhancing the color components in the first color space and reducing the problem of image color distortion. By performing image segmentation on the low-illumination image, image enhancement can be selectively performed on each image region. In addition, through non-linear stretching of the saturation component, the enhanced low-illumination image has high color retention and reduces the probability of color distortion. Description of the Drawings

[0063] To more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. In the drawings:

[0064] Figure 1 It is a schematic flowchart of a method for enhancing a low-illumination image provided by an embodiment of this specification;

[0065] Figure 2 It is the luminance component image of an original low-illumination image in an application scenario provided by an embodiment of this specification;

[0066] Figure 3 It is the first image after adaptive enhancement of the luminance component in an application scenario provided by an embodiment of this specification;

[0067] Figure 4 It is an image of the region segmentation recognition result in an application scenario provided by an embodiment of this specification;

[0068] Figure 5 It is the saturation component image of an original low-illumination image in an application scenario provided by an embodiment of this specification;

[0069] Figure 6An enhanced saturation component image of a low-illumination image without mask processing in an application scenario provided by an embodiment of this specification;

[0070] Figure 7 An enhanced saturation component image of a low-illumination image after flooding processing in an application scenario provided by an embodiment of this specification;

[0071] Figure 8 A schematic internal structure diagram of a low-illumination image enhancement device provided by an embodiment of this specification;

[0072] Figure 9 A schematic internal structure diagram of a low-illumination image enhancement device provided by an embodiment of this specification;

[0073] Figure 10 A schematic internal structure diagram of a non-volatile storage medium provided by an embodiment of this specification. Detailed implementation manners

[0074] Embodiments of this specification provide a low-illumination image enhancement method, device, equipment, and medium.

[0075] In applications such as image acquisition or video surveillance, due to external factors such as uneven illumination and low illumination, the obtained images often have problems such as uneven brightness, low contrast, and color distortion, resulting in poor image quality and affecting subsequent information interpretation and extraction. Therefore, in order to improve the quality of color images and extract more available information, fast and effective image enhancement algorithms have become one of the key contents in the field of image analysis.

[0076] In the prior art, image enhancement methods mainly include spatial domain and frequency domain image enhancement algorithms, image enhancement algorithms based on artificial neural networks, image enhancement algorithms based on human visual characteristics, etc. However, in traditional algorithms for low-illumination image enhancement, if the differences between bright regions such as sky regions, white objects, water surfaces, etc. and non-bright regions such as non-sky regions in the image are not considered, it is easy to cause problems such as halos and color distortion in the bright regions during the image enhancement process. Moreover, in traditional algorithms for low-illumination enhancement based on the HSV or HSI space, the processing of saturation uses linear stretching, which is prone to color distortion, and has a high computational complexity when using adaptive processing or other methods to process saturation.

[0077] To solve the above technical problems, this specification provides a low-light image enhancement method. By converting a low-light image from a first color space suitable for a display system to a second color space that conforms to the visual characteristics of the human eye for processing, the problem of image color distortion is alleviated. By segmenting the image area, selective adjustment of the image enhancement effect in different areas is achieved. At the same time, through the non-linear stretching of the saturation component, the problem of color distortion easily caused by linear stretching in traditional algorithms is solved.

[0078] To enable those skilled in the art to better understand the technical solutions in this specification, the following will clearly and completely describe the technical solutions in the embodiments of this specification with reference to the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on the embodiments of this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this specification.

[0079] As Figure 1 shown, the embodiments of this specification provide a schematic flowchart of a method for low-light image enhancement.

[0080] As Figure 1 can be seen, the method includes the following steps:

[0081] S101: Obtain a low-light image in a first color space; wherein, the first color space conforms to the color display of the display system.

[0082] In reality, images captured often have low brightness, low contrast, and a lot of noise in the images collected by electronic devices due to reasons such as dim light, insufficient exposure, and backlighting during shooting, which seriously affects the analysis and understanding of the image content. Therefore, it is of great significance to enhance low-light images.

[0083] Before enhancing the image, it is first necessary to obtain the low-light image in the first color space collected by the electronic device for subsequent processing of the low-light image.

[0084] Among them, it should be noted that the first color space is a color space suitable for the display system. For example: The RGB color space is based on three primary colors, R (Red), G (Green), and B (Blue), and through different degrees of superposition, rich and extensive colors are produced, so it is commonly known as the three-primary color model. The RGB space is the most commonly used color display model in life, and most of the TV sets, CRT monitors of computers, etc. adopt this model.

[0085] S102: Convert the low - illumination image from the first color space to the second color space, and obtain the saturation component and the luminance component of the low - illumination image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye.

[0086] In one or more embodiments of this specification, the conversion of the low - illumination image from the first color space to the second color space specifically includes:

[0087] Obtain the luminance component of the low - illumination image in the second color space according to a preset first conversion formula; wherein, the preset first conversion formula is: V = max(R, G, B); V is the luminance component of the second color space, and R, G, B are the three primary color components of the first color space;

[0088] Obtain the saturation component of the low - illumination image in the second color space according to a preset second conversion formula; wherein, the preset second conversion formula is: S is the saturation component of the second color space, and C = min(R, G, B);

[0089] Obtain the chromaticity component of the low - illumination image in the second color space according to a preset third conversion formula; wherein, the preset third conversion formula is H is the chromaticity component of the second color space.

[0090] Since the first color space does not conform to the visual characteristics of the human eye, during the process of image enhancement, directly processing the low - illumination image in the first color space will cause the problem of color distortion. Therefore, it is necessary to convert to another second color space that suits the visual characteristics of the human eye for image enhancement processing. The second color space in the embodiments of this specification is described by the HSV color space.

[0091] The process of converting the obtained low - illumination image from the first color space to the second color space is as follows:

[0092] Obtain the luminance component V of the low - illumination image in the second color space according to the pre - set first conversion formula: V = max(R, G, B). That is, take the maximum value of the R, G, B three components at each point in the first color space of the low - illumination image as the luminance component of that point in the second color space. According to the pre - set second conversion formula Obtain the saturation component S of the low - illumination image in the second color space. Wherein C = min(R, G, B), that is, the minimum value of the R, G, B three components at each point in the first color space. Obtain the chromaticity component of the low - illumination image in the second color space according to the pre - set third conversion formula. The preset third conversion formula is: If the situation of H < 0 occurs during the calculation process, then it is necessary to use the correction formula Correct the chrominance component of the second color space.

[0093] It should be noted that in the HSV color space, the chrominance H is usually used to macroscopically distinguish a certain color. For example, white, yellow, cyan, green, magenta, red, blue, black, etc. are chrominances; the saturation S refers to the purity of the color. Generally, the more vivid the color, the higher the saturation, and the darker the color, the lower the saturation; the brightness V refers to the brightness of the color. The higher the brightness, the brighter the color, and the lower the brightness, the darker the color. The HSV color space is not suitable for the display system, but it is more in line with the visual characteristics of the human eye. Therefore, the color is usually converted from the RGB color space described in step S101 to the HSV color space for image enhancement processing.

[0094] S103: Perform adaptive global enhancement processing on the brightness component of the low-illumination image to obtain a first image.

[0095] In one or more embodiments of this specification, the performing adaptive global enhancement processing on the brightness component of the low-illumination image to obtain a first image specifically includes:

[0096] Obtain the logarithmic mean value of the brightness component in the second color space according to the logarithmic mean value formula; where the logarithmic mean formula is N represents the total number of pixels, σ is an arbitrary minimum value, represents the logarithmic mean value of the brightness component;

[0097] Perform adaptive enhancement processing on the brightness component of the low-illumination image according to a preset brightness adjustment formula to obtain a first image; where the preset brightness adjustment formula is V'(x,y) is the output result of the first image after the brightness component is enhanced, V max is the maximum brightness value of the low-illumination image.

[0098] In order to adaptively enhance the dynamic range of the full-field brightness, use a preset brightness adjustment formula Adjust the brightness component of the second color space pixel by pixel, and adaptively enhance the brightness component V of the second color space to V'; where V max is the maximum brightness value of the low-illumination image.

[0099] is the logarithmic mean value of the brightness component obtained based on the logarithmic mean formula obtained; N represents the total number of pixels; σ is an arbitrary minimum value, such as e -6Its main function is to avoid the problem of numerical overflow when performing logarithmic calculations on pure black pixels with pixel values close to 0. Based on the processing of the luminance component with adaptive global enhancement, the luminance of the non-bright areas of the low-illumination image has been significantly enhanced.

[0100] Such as Figure 2 is the luminance component image of the original low-illumination image in an application scenario of this specification example. Figure 3 is the first image after the luminance component is adaptively enhanced in an application scenario of this specification example. Compare Figure 2 With Figure 3 It can be seen that after adjusting the luminance component of the low-illumination image in the second color space, the low-illumination situation has been significantly improved compared to the original image, and the enhancement effect is more obvious in darker areas. The areas that are bright themselves, such as the sky area in the figure, do not change significantly. Therefore, enhancing the luminance component based on the global adaptive method can alleviate the low-illumination situation.

[0101] S104: Regionally segment the first image based on clustering, and determine the first region and the second region of the first image; wherein, the luminance of the first region is higher than that of the second region, and the luminance difference between the first region and the second region is greater than a preset threshold.

[0102] In one or more embodiments of this specification, the regionally segmenting the first image based on clustering to determine the first region and the second region of the first image specifically includes:

[0103] Select multiple initial class centers in the first image;

[0104] Assign the points in the first image to the nearest initial class center among the multiple initial class centers according to the Euclidean distance, and obtain multiple classes after clustering;

[0105] Calculate the current class center of each class according to the classes after clustering;

[0106] If the current class center is different from the initial class center, then iterate to re-obtain the class center points of the first image; if the current class center is the same as the initial class center, then obtain the segmentation result of the first region and the second region.

[0107] In one or more embodiments of this specification, the selecting multiple initial class centers in the first image specifically includes:

[0108] Determine the number of regional divisions of the first region and the second region in the first image;

[0109] Select a plurality of initial class center points in the corresponding regions of the first image according to the number of the region divisions; wherein, the number of the initial class centers corresponds to the number of the region divisions.

[0110] When there are regions with obvious brightness differences in the low-light image, for example, when there are bright sky regions and non-bright non-sky regions in the low-light image, if the differences between the sky region and the non-sky region are not fully considered, it will lead to phenomena such as halos or color distortion in the sky region after image enhancement. Determine the number of the first region and the second region in the first image, so as to determine the number of regions to be divided when dividing the regions in the first image. Select the initial class center of each region in the first image according to the number of the region divisions. For example: in the first image after brightness processing, there are a sky region, a bright headlight region, and other non-bright ground regions. Then the number of regions to be divided is 3, and it is necessary to randomly select a point in each of the 3 regions, namely the sky region, the bright headlight region, and other non-bright ground regions, as the initial class center of each region. If there are only a sky region and a non-sky region in the first image, the number of region divisions is 2, and it is necessary to extract a point in each of the sky region and the non-sky region as the initial class center of the two regions. It should be noted that the number of regions to be divided can be determined based on the brightness value in the first image. If the brightness difference exceeds the preset threshold, it is determined that they are two regions that can be divided from each other.

[0111] After determining the initial class center of each region, based on the clustering method, allocate each pixel point in the first image to the nearest initial class center according to Euclidean clustering. Assume that it needs to be divided into k regions, then after allocating to k initial class centers, k classes after clustering are obtained. Calculate the current class center of each class according to these k classes. If the current class center is different from the initial class center, repeat the iterative clustering process until the current class center is the same as the initial class center or the number of iterations reaches the set maximum number. Obtain the region separation result of the first image according to the clustering result, and obtain the highly bright first region and the non-bright second region. As Figure 4 shown, it is an image of the region segmentation and recognition result in an application scenario in the embodiment of this specification. Figure 4 Taking the sky region as the first region and the non-sky region as the second region, after clustering analysis according to the above process, the segmentation results of different regions are obtained. In the figure, the white region is the ground object in the non-sky region, and the black region is the recognized sky region. By recognizing different regions, it is possible to fully consider the differences between different regions for adaptive enhancement during subsequent image enhancement processing, and obtain a more effective image enhancement result.

[0112] S105: Non-linearly stretch the saturation component of the second region and perform masking on the first region to adjust the saturation component of the second region and obtain a processed second image.

[0113] In one or more embodiments of this specification, the non-linearly stretching the saturation component of the second region and performing masking on the first region to adjust the saturation component of the second region and obtain a processed second image specifically includes:

[0114] Obtain the saturation component and luminance component of each pixel point in the first image;

[0115] Perform masking on the first region and non-linearly stretch the saturation component of the pixel points in the second region according to a preset stretching formula; wherein, the preset stretching formula is:

[0116] λ is an adjustment parameter, V is the luminance component; when mask(x, y) = 1, it indicates that the pixel point is not in the first region; when mask(x, y) = 0, it indicates that the pixel point is in the first region.

[0117] After performing masking on the first region, non-linearly stretch the saturation component of the pixel points in the second region according to the preset stretching formula. Specifically, When mask(x, y) = 1, it indicates that the pixel does not belong to the first region and its saturation is adjusted non-linearly, otherwise the saturation component is not processed. By masking the first region, when enhancing the saturation of each luminance region in the image simultaneously, the occurrence of over-saturation phenomenon and color distortion phenomenon caused by obvious saturation differences is avoided. It should be noted that λ is an adjustment parameter and its typical value is taken as 2.

[0118] As Figure 5 shown is the saturation component image of an original low-illumination image in an application scenario provided by an embodiment of this specification, Figure 6 is the saturation component enhanced image when the low-illumination image is not masked in an application scenario provided by an embodiment of this specification; Figure 7 is the saturation component enhanced image after masking the low-illumination image in an application scenario provided by an embodiment of this specification.

[0119] Comparing Figure 5 with Figure 6 it can be seen that when performing saturation stretching without masking the first region, Figure 6In the first area, the colors around the clouds and the antenna pole are distorted and the image becomes blurred. That is, when enhancing the saturation component without distinguishing between the first area and the second area, over-saturation problems and color distortion problems will occur in the high-brightness areas of the image. In comparison Figure 5 With Figure 7 It can be seen that after masking the first area and performing non-linear stretching of the saturation on the second area, Figure 7 Relative to Figure 5 the saturation of the original low-illumination image in, the saturation of the second area is significantly improved, and no over-saturation phenomenon occurs in the first area. Therefore, masking the high-brightness first area and performing non-linear stretching of the saturation component on the second area has a better image enhancement effect than the method without adding a mask, and can avoid the color distortion problem caused by full-area saturation stretching.

[0120] S106: Convert the processed second image from the second color space to the first color space to obtain the enhanced image.

[0121] In one or more embodiments of this specification, after obtaining the enhanced image, the method further includes:

[0122] Obtain the low-illumination color image to be processed, and remove the high-frequency noise of the low-illumination image based on guided filtering in the spatial domain of the low-illumination color image to be processed to obtain the image after guided filtering;

[0123] Perform wavelet decomposition on the image after guided filtering to perform wavelet threshold denoising on the image after guided filtering;

[0124] Obtain the low-illumination image in the first color space based on inverse wavelet transform.

[0125] Convert the processed image from the second color space to the first color space for display

[0126] After converting the low-illumination image from the first color space to the second color space for processing, it needs to be converted to the first color space for display to obtain the enhanced image. Among them, the conversion method from the second color space to the first color space is the prior art and will not be elaborated here.

[0127] After obtaining the low-light image in the first color space after image enhancement, in order to further improve the clarity of the image and better retain the edge information of the image, the enhanced image can be used as the low-light image to be processed for noise filtering. Specifically, in the spatial domain, guided filtering is performed on the obtained low-light image to be processed to remove most of the high-frequency noise components in the low-light image to be processed. Then, wavelet transform is performed on the image after guided filtering to decompose the image into sub-images in different spaces and different frequencies to further remove high-frequency noise and low-frequency noise. So that the low-light image to be processed can retain the edge detail information relatively clearly while removing noise.

[0128] It should be noted that: Guided filtering has the property of preserving edges. Selecting guided filtering as the spatial domain filter can perform noise reduction processing on the image. When performing wavelet transform on the image after guided filtering, for a specific image, the selection of different wavelet bases, threshold functions, and thresholds will have different effects on the denoising effect. If the threshold is too small, more noise will be retained. If the threshold is too large, the edges of the image will be blurred while filtering out the noise. Therefore, the parameters of wavelet transform need to be determined according to actual requirements.

[0129] As Figure 8 shown, an internal structure schematic diagram of a low-light image enhancement device is provided in an embodiment of this specification.

[0130] As Figure 8 can be seen, the device includes:

[0131] An acquisition unit 801, configured to acquire a low-light image in the first color space; wherein, the first color space conforms to the color display of the display system;

[0132] A first conversion unit 802, configured to convert the low-light image from the first color space to the second color space, and obtain the saturation component and the luminance component of the low-light image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye;

[0133] A first processing unit 803, configured to perform adaptive global enhancement processing on the luminance component of the low-light image to obtain a first image;

[0134] A segmentation unit 804, configured to perform region segmentation on the first image based on clustering, and determine a first region and a second region of the first image; wherein, the luminance of the first region is higher than that of the second region, and the luminance difference between the first region and the second region is greater than a preset threshold;

[0135] A second processing unit 805, configured to perform non-linear stretching on the saturation component of the second region and perform masking processing on the first region to adjust the saturation component of the second region and obtain a processed second image;

[0136] A second conversion unit 806, configured to convert the processed second image from a second color space to a first color space to obtain an enhanced image.

[0137] Optionally, in one or more embodiments of this specification, the segmentation unit specifically includes: a class selection unit, a clustering unit, a calculation unit, and an iteration unit;

[0138] The class selection unit is configured to select a plurality of initial class centers in the first image;

[0139] The clustering unit is configured to assign the points in the first image to the nearest initial class center among the plurality of initial class centers according to the Euclidean distance to obtain a plurality of clustered classes;

[0140] The calculation unit is configured to calculate the current class center of each class according to the clustered classes;

[0141] The iteration unit is configured to, if the current class center is different from the initial class center, perform iteration to re-obtain the class center points of the first image; if the current class center is the same as the initial class center, obtain the segmentation result of the first region and the second region.

[0142] Optionally, in one or more embodiments of this specification, the class selection unit specifically includes: a determination unit and a corresponding selection unit;

[0143] The determination unit is configured to determine the number of region divisions between the first region and the second region in the first image;

[0144] The corresponding selection unit is configured to select a plurality of initial class center points in the corresponding regions of the first image according to the number of region divisions; wherein, the number of initial class centers corresponds to the number of region divisions.

[0145] Optionally, in one or more embodiments of this specification, the second processing unit specifically includes: a component acquisition unit and a stretching unit;

[0146] The classification acquisition unit is configured to acquire the saturation component and the brightness component of each pixel point in the first image;

[0147] The stretching unit is configured to perform masking occlusion processing on the first region and perform non-linear stretching on the saturation component of the pixel points in the second region according to a preset stretching formula; wherein, the preset stretching formula is:

[0148] Let λ be the adjustment parameter and V be the luminance component; when mask(x,y) = 1, it indicates that the pixel is not in the first region; when mask(x,y) = 0, it indicates that the pixel is in the first region.

[0149] Optionally, in one or more embodiments of the present specification, the first conversion unit specifically includes: a luminance conversion unit, a saturation conversion unit, and a chrominance conversion unit;

[0150] The luminance conversion unit is used to obtain the luminance component of the low-illumination image in the second color space according to a preset first conversion formula; wherein, the preset first conversion formula is: V = max(R, G, B); V is the luminance component of the second color space, and R, G, B are the three primary color components of the first color space;

[0151] The saturation conversion unit is used to obtain the saturation component of the low-illumination image in the second color space according to a preset second conversion formula; wherein, the preset second conversion formula is: S is the saturation component of the second color space, and C = min(R, G, B);

[0152] The chrominance conversion unit is used to obtain the chrominance component of the low-illumination image in the second color space according to a preset third conversion formula; wherein, the preset third conversion formula is H is the chrominance component of the second color space.

[0153] Optionally, in one or more embodiments of the present specification, the first processing unit specifically includes: an averaging unit and a luminance enhancement unit;

[0154] The averaging unit is used to obtain the logarithmic average value of the luminance component in the second color space according to the logarithmic average value formula; wherein, the logarithmic average formula is N represents the total number of pixels, and σ is an arbitrarily small value, represents the logarithmic average value of the luminance component;

[0155] The luminance enhancement unit is used to perform adaptive enhancement processing on the luminance component of the low-illumination image according to a preset luminance adjustment formula to obtain a first image; wherein the preset luminance adjustment formula is V'(x,y) is the output result of the first image after the luminance component is enhanced, and V max is the maximum luminance value of the low-illumination image.

[0156] Optionally, in one or more embodiments of this specification, the device further includes: a filtering unit, configured to obtain the enhanced image as the low-illumination color image to be processed, remove the high-frequency noise of the low-illumination image based on guided filtering in the spatial domain of the low-illumination color image to be processed, and obtain the image after guided filtering; perform wavelet decomposition on the image after guided filtering to perform wavelet threshold denoising on the image after guided filtering; and obtain the low-illumination image in the first color space based on inverse wavelet transform.

[0157] As Figure 9 shown, an embodiment of this specification provides a schematic internal structure diagram of a low-illumination image enhancement device.

[0158] As Figure 9 shown, the device includes:

[0159] at least one processor 901; and,

[0160] a memory 902 communicatively connected to the at least one processor 901; wherein,

[0161] the memory 902 stores instructions executable by the at least one processor 901, and when the instructions are executed by the at least one processor 901, the at least one processor 901 is enabled to:

[0162] obtain a low-illumination image in a first color space; wherein, the first color space conforms to the color display of the display system;

[0163] convert the low-illumination image from the first color space to a second color space, and obtain the saturation component and the luminance component of the low-illumination image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye;

[0164] perform adaptive global enhancement processing on the luminance component of the low-illumination image to obtain a first image;

[0165] perform region segmentation on the first image based on clustering, and determine a first region and a second region of the first image; wherein, the luminance of the first region is higher than that of the second region, and the luminance difference between the first region and the second region is greater than a preset threshold;

[0166] perform non-linear stretching on the saturation component of the second region, and perform masking processing on the first region to adjust the saturation component of the second region, and obtain a processed second image;

[0167] convert the processed second image from the second color space to the first color space to obtain an enhanced image.

[0168] AsFigure 10 As shown in the figure, an embodiment of this specification provides a schematic diagram of the internal structure of a non-volatile storage medium.

[0169] It can be seen from Figure 10 that the non-volatile storage medium stores computer-executable instructions 1001, and is characterized in that the executable instructions 1001 include:

[0170] Obtain a low-light image in a first color space; wherein, the first color space conforms to the color display of the display system;

[0171] Convert the low-light image from the first color space to a second color space, and obtain the saturation component and the brightness component of the low-light image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye;

[0172] Perform adaptive global enhancement processing on the brightness component of the low-light image to obtain a first image;

[0173] Perform region segmentation on the first image based on clustering to determine a first region and a second region of the first image; wherein, the brightness of the first region is higher than that of the second region, and the brightness difference between the first region and the second region is greater than a preset threshold;

[0174] Perform non-linear stretching on the saturation component of the second region, and perform masking processing on the first region to adjust the saturation component of the second region to obtain a processed second image;

[0175] Convert the processed second image from the second color space to the first color space to obtain an enhanced image.

[0176] Each embodiment in this specification is described in a progressive manner. For the same or similar parts between each embodiment, reference can be made to each other. The key point of each embodiment is to illustrate the differences from other embodiments. In particular, for the embodiments of the device, equipment, and non-volatile computer storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and reference can be made to the corresponding parts of the method embodiments for the relevant content.

[0177] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order from that in the embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the specific order or continuous order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0178] The above are only one or more embodiments of this specification and are not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included within the scope of the claims of this specification.

Claims

1. A low-light image enhancement method, characterized in that, The method further includes: Obtaining a low-illumination image in a first color space; wherein, the first color space conforms to the color display of the display system; Converting the low-illumination image from the first color space to a second color space, and obtaining the saturation component and the luminance component of the low-illumination image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye; Performing adaptive global enhancement processing on the luminance component of the low-illumination image to obtain a first image; Performing region segmentation on the first image based on clustering to determine a first region and a second region of the first image; wherein, the luminance of the first region is higher than that of the second region, and the luminance difference between the first region and the second region is greater than a preset threshold; Performing non-linear stretching on the saturation component of the second region and performing masking processing on the first region to adjust the saturation component of the second region and obtain a processed second image; Converting the processed second image from the second color space to the first color space to obtain an enhanced image; Wherein, the performing adaptive global enhancement processing on the luminance component of the low-illumination image to obtain a first image specifically includes: Obtain the logarithmic mean value of the luminance component in the second color space according to the logarithmic mean value formula; wherein, the logarithmic mean formula is N represents the total number of pixels, σ is an arbitrary minimum value, represents the logarithmic mean value of the luminance component; Adaptive enhancement processing is performed on the luminance component of the low-illumination image according to a preset luminance adjustment formula to obtain a first image; wherein the preset luminance adjustment formula is V'(x,y) is the output result of the first image after enhancement of the luminance component, and V max is the maximum luminance value of the low-illumination image.

2. The low-light image enhancement method according to claim 1, wherein The performing region segmentation on the first image based on clustering to determine a first region and a second region of the first image specifically includes: Selecting a plurality of initial class centers in the first image; Assigning the points in the first image to the nearest initial class center among the plurality of initial class centers according to the Euclidean distance to obtain a plurality of clustered classes; Calculating the current class center of each class according to the clustered classes; If the current class center is different from the initial class center, then iteratively re-obtain the class center points of the first image; if the current class center is the same as the initial class center, then obtain the segmentation result of the first region and the second region.

3. The low-light image enhancement method according to claim 2, wherein, The selecting a plurality of initial class centers in the first image specifically includes: Determining the number of region partitions of the first region and the second region in the first image; Selecting a plurality of initial class center points in the corresponding regions of the first image according to the number of region partitions; wherein, the number of initial class centers corresponds to the number of region partitions.

4. A low-light image enhancement method according to claim 1, characterized in that The performing non-linear stretching on the saturation component of the second region and performing masking processing on the first region to adjust the saturation component of the second region and obtain a processed second image specifically includes: Obtaining the saturation component and the luminance component of each pixel point in the first image; Performing masking occlusion processing on the first region and performing non-linear stretching on the saturation component of the pixel points in the second region according to a preset stretching formula; wherein, the preset stretching formula is: λ is an adjustment parameter, and V is the luminance component; when mask(x, y) = 1, it indicates that the pixel is not in the first region; when mask(x, y) = 0, it indicates that the pixel is in the first region.

5. A low-light image enhancement method according to claim 1, characterized in that, The converting the low-illumination image from the first color space to the second color space specifically includes: Obtain the luminance component of the low-illuminance image in the second color space according to a preset first conversion formula; wherein, the preset first conversion formula is: V = max(R, G, B); V is the luminance component of the second color space, and R, G, and B are the three primary color components of the first color space; Obtain the saturation component of the low-illumination image in the second color space according to a preset second conversion formula; wherein, the preset second conversion formula is: S is the saturation component of the second color space, and C = min(R, G, B); Obtain the chrominance component of the low-illumination image in the second color space according to a preset third conversion formula; wherein, the preset third conversion formula is H is the chrominance component of the second color space.

6. A low-light image enhancement method according to claim 1, characterized in that After obtaining the enhanced image, the method further includes: Obtain the enhanced image as the low-illuminance color image to be processed, and remove the high-frequency noise of the low-illuminance image based on guided filtering in the spatial domain of the low-illuminance color image to be processed, to obtain the image after guided filtering; Perform wavelet decomposition on the image after guided filtering to perform wavelet threshold denoising on the image after guided filtering; Obtain the low-illuminance image in the first color space based on inverse wavelet transform.

7. A low-light image enhancement device, characterized in that, The device includes: An acquisition unit, configured to acquire a low-illuminance image in the first color space; wherein, the first color space conforms to the color display of the display system; A first conversion unit, configured to convert the low-illuminance image from the first color space to the second color space, and obtain the saturation component and luminance component of the low-illuminance image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye; A first processing unit, configured to perform adaptive global enhancement processing on the luminance component of the low-illuminance image to obtain a first image; A segmentation unit, configured to perform region segmentation on the first image based on clustering, and determine a first region and a second region of the first image; wherein, the luminance of the first region is higher than that of the second region, and the luminance difference between the first region and the second region is greater than a preset threshold; A second processing unit, configured to perform non-linear stretching on the saturation component of the second region, and perform masking processing on the first region to adjust the saturation component of the second region to obtain a processed second image; A second conversion unit, configured to convert the processed second image from the second color space to the first color space to obtain an enhanced image; Wherein, the performing adaptive global enhancement processing on the luminance component of the low-illuminance image to obtain a first image specifically includes: Obtain the logarithmic mean value of the luminance component in the second color space according to the logarithmic mean value formula; wherein, the logarithmic mean formula is N represents the total number of pixels, σ is an arbitrary minimum value, and V represents the logarithmic mean value of the luminance component; Adaptive enhancement processing is performed on the luminance component of the low-illumination image according to a preset brightness adjustment formula to obtain a first image; wherein the preset brightness adjustment formula is V'(x, y) is the output result of the first image after enhancement of the luminance component, and V max is the maximum luminance value of the low-illumination image.

8. An image enhancement device for low illumination based on a first region, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can: Acquire a low-illuminance image in the first color space; wherein, the first color space conforms to the color display of the display system; Convert the low-illuminance image from the first color space to the second color space, and obtain the saturation component and luminance component of the low-illuminance image in the second color space; wherein, the second color space conforms to the visual characteristics of the human eye; Perform adaptive global enhancement processing on the luminance component of the low-illuminance image to obtain a first image; Perform region segmentation on the first image based on clustering to determine the first region and the second region of the first image; wherein, the brightness of the first region is higher than that of the second region, and the brightness difference between the first region and the second region is greater than a preset threshold; Perform non-linear stretching on the saturation component of the second region and perform masking on the first region to adjust the saturation component of the second region to obtain a processed second image; Convert the processed second image from the second color space to the first color space to obtain an enhanced image; Wherein, the performing adaptive global enhancement processing on the brightness component of the low-light image to obtain the first image specifically includes: Obtain the logarithmic mean value of the luminance component in the second color space according to the logarithmic mean value formula; wherein, the logarithmic mean formula is N represents the total number of pixels, σ is an arbitrary minimum value, represents the logarithmic mean value of the luminance component; Adaptive enhancement processing is performed on the luminance component of the low-illumination image according to a preset brightness adjustment formula to obtain a first image; wherein the preset brightness adjustment formula is V'(x, y) is the output result of the first image after enhancement of the luminance component, and V max is the maximum brightness value of the low-illumination image.

9. A non-volatile storage medium stores computer-executable instructions, characterized in that, The executable instructions include: Obtain a low-light image in the first color space; wherein, the first color space conforms to the color display of the display system; Convert the low-light image from the first color space to the second color space and obtain the second color space saturation component and brightness component of the low-light image; wherein, the second color space conforms to the visual characteristics of the human eye; Perform adaptive global enhancement processing on the brightness component of the low-light image to obtain the first image; Perform region segmentation on the first image based on clustering to determine the first region and the second region of the first image; wherein, the brightness of the first region is higher than that of the second region, and the brightness difference between the first region and the second region is greater than a preset threshold; Perform non-linear stretching on the saturation component of the second region and perform masking on the first region to adjust the saturation component of the second region to obtain a processed second image; Convert the processed second image from the second color space to the first color space to obtain an enhanced image; Wherein, the performing adaptive global enhancement processing on the brightness component of the low-light image to obtain the first image specifically includes: Obtain the logarithmic mean value of the luminance component in the second color space according to the logarithmic mean value formula; wherein, the logarithmic mean formula is N represents the total number of pixels, σ is an arbitrarily small value, represents the logarithmic mean value of the luminance component; Adaptive enhancement processing is performed on the luminance component of the low-illumination image according to a preset brightness adjustment formula to obtain a first image; wherein the preset brightness adjustment formula is V'(x,y) is the output result of the first image after the enhancement of the luminance component, and V max is the maximum brightness value of the low-illumination image.

Citation Information

Patent Citations

  • Enhancement method for low-illumination image

    CN105654437A

  • Low-luminous image enhancement method based on guided filtering

    CN106897981A