Adaptive enhancement method for non-uniform illumination image
By combining adaptive threshold and brightness remapping function, a symmetric brightness mapping function is designed, which solves the problem of uneven exposure in non-uniform light images, avoids local under-enhancement, and improves the enhancement effect and versatility.
Patent Information
- Application Number
- CN202510600879.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-05-12
AI Technical Summary
The prior art is difficult to effectively solve the problem of uneven exposure in non-uniform light images, resulting in under-enhancement of some areas, affecting the enhancement effect and versatility.
Adaptive thresholds are used to judge the exposure degree of local pixels, and combined with the brightness remapping function, a symmetric brightness mapping function is designed to adaptively control the adjustment amplitude of local brightness to reduce local over-enhancement.
It effectively avoids the local under-enhancement problem caused by a single threshold, and is suitable for images with complex lighting changes, improves the enhancement effect and versatility, and ensures clear details and color balance of the image.
Smart Images

Figure CN120125489A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an adaptive enhancement method for non-uniformly illuminated images, belonging to the technical field of image processing. Background Art
[0002] When there are large differences in illumination in the environment, the illuminance received by each object in the scene is uneven, and there is regional differentiation in the brightness of the captured color image. On the one hand, the areas with stronger illumination correspond to overexposure in the image, and details and colors are severely compressed; on the contrary, the areas with weaker illumination correspond to underexposure in the image, and details and colors are submerged in darkness.
[0003] Therefore, to enhance non-uniformly illuminated images, it is necessary to correct both the highlighted and dark areas in the image at the same time. Traditional single brightness adjustment methods, such as Gamma transformation and histogram equalization, have poor effects and are prone to over-enhancement or under-enhancement in small areas. Therefore, it is necessary to design an adaptive enhancement scheme using local information to increase the brightness of underexposed areas and suppress the brightness of overexposed areas.
[0004] Patent CN 113112429 A decomposes the image into a base layer and a detail layer, uses the gray mean value of the base layer as a boundary threshold, and believes that the areas with gray values greater than this threshold are overexposed and their brightness should be suppressed, while the brightness of the remaining areas should be increased. However, for images with large areas of overexposure or underexposure, their gray mean values are relatively extreme, which easily leads to under-enhancement of small areas in the image. Patent CN 110992287 A estimates the image brightness through a series of maximum filtering operations, and uses the median value of the image gray range as an invisible threshold to distinguish between highlighted and dark areas, and remaps the image brightness. However, a single empirical threshold cannot cope with complex illumination changes. Considering the limitations of a single threshold, Patent CN 114331873 A obtains the boundaries in the image through a series of binarization operations, thereby dividing the image into multiple regions, and judging the exposure degree of each region to adaptively adjust the brightness of each region. However, this method is highly dependent on the accuracy of region segmentation. In addition to heuristic brightness adjustment functions, existing technologies have studied non-uniformly illuminated image enhancement methods based on deep learning. Patent CN 115526803 A proposes an unsupervised enhancement method based on a differential neural network model and an entropy maximization loss function, but its enhancement effect on the highlighted areas in the image is not significant.
[0005] For non-uniformly illuminated images, heuristic single thresholds used to define highlighted and dark areas often cannot adapt to the complex changes in image content and illumination, easily causing under-enhancement in some areas, and affecting the enhancement effect and generality. Summary of the Invention
[0006] The technical problem to be solved by the present invention is: to provide an adaptive enhancement method for non-uniformly illuminated images, to propose a local adaptive threshold for judging the exposure degree of local pixels, and to avoid local under-enhancement caused by a single threshold. Combining with this threshold, a symmetric brightness mapping function is designed to adaptively control the adjustment amplitude of local brightness, thereby reducing the phenomenon of local over-enhancement.
[0007] The present invention adopts the following technical solutions to solve the above technical problems: An adaptive enhancement method for non-uniformly illuminated images, comprising the following steps: Step 1, for the original non-uniformly illuminated color image, using the gray values of its RGB channels, calculate the Y channel value in the YUV space to obtain the brightness channel of the original non-uniformly illuminated color image; Step 2, perform a convolution operation on the brightness channel obtained in Step 1 using an anisotropic bilateral filter to estimate the illumination intensity map of the original non-uniformly illuminated color image; Step 3, calculate an adaptive threshold map for judging the exposure degree according to the illumination intensity map obtained in Step 2, and judge the exposure degree of each pixel on the original non-uniformly illuminated color image; Step 4, according to the exposure degree of each pixel, remap the brightness channel of the original non-uniformly illuminated color image using a brightness remapping function to obtain a remapped brightness map; Step 5, reconstruct the original non-uniformly illuminated color image according to the remapped brightness map obtained in Step 4 to obtain a reconstructed color image; Step 6, use an exponential function to enhance the local contrast of the reconstructed color image obtained in Step 5 to obtain the final adaptive enhancement result map.
[0008] Compared with the prior art, the present invention adopts the above technical solutions and has the following technical effects: 1. For non-uniformly illuminated images, the present invention designs an adaptive threshold for judging the exposure degree of local regions based on the local illumination intensity of the image. Compared with heuristic thresholds, the adaptive threshold can more flexibly judge underexposure and overexposure in small regions, is applicable to images with complex ambient light changes, and can effectively avoid the problem of under-enhancement in small regions.
[0009] 2. The present invention combines the designed adaptive threshold with a brightness remapping function to effectively control the brightness adjustment amplitude of local regions, and can avoid the result distortion caused by local over-enhancement.
[0010] 3. The adaptive enhancement method designed in the present invention can take into account both highlight and dark regions in images with drastic illumination changes, and obtain a clear result image. For images with complex illumination changes, especially those with extreme illumination in small regions, the enhancement method of the present invention can achieve effective enhancement results. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a flowchart of the adaptive enhancement method for non-uniform illumination images proposed by the present invention; Figure 2 is a color image and its threshold map example; Figure 3 is a specific parameter and threshold schematic diagram of the brightness remapping curve under; Figure 4 is an indoor non-uniform illumination image and its enhancement result. Among them, (a) has indoor backlight, (b) has a single indoor light source, and (c) has a single indoor light source; Figure 5 is an outdoor non-uniform illumination image and its enhancement result; Figure 6 is an underexposed image and its enhancement result. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0012] The following details the embodiments of the present invention. The examples of the embodiments are shown in the drawings. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0013] As Figure 1 shown, for non-uniform illumination images, the present invention proposes an adaptive enhancement method, and the specific process is as follows: (1) Input a non-uniform illumination color image, and obtain the grayscale images of each channel in the RGB color space, which are respectively denoted as .
[0014] (2) Calculate the brightness channel of the image, that is, use the grayscale images of the RGB channels to calculate the Y channel value in the YUV space. The specific formula is as follows: , where and represent the abscissa and ordinate of the pixel in the image, is the brightness value of the pixel , represents the grayscale value of the pixel in the channel.
[0015] (3) In the Y channel, perform a convolution operation using an anisotropic bilateral filter to estimate the illumination intensity map of the image , and the specific formula is: , where, is the estimated illumination of pixel , represents a circular neighborhood area centered on pixel , and the radius of the area is one-fifth of the diagonal length of the original color image. is the gray value of pixel in the Y channel. is the weight value of the bilateral filter between pixel and , and the calculation formula is as follows: , where, the spatial domain variance takes a value of one-tenth of the diagonal length of the original color image, and the gray domain variance takes a value of one-tenth of the difference between the maximum gray value and the minimum gray value in the luminance channel Y.
[0016] (4) According to the image illumination map calculated in (3), calculate the adaptive threshold map for judging the exposure degree to judge the exposure degree of each pixel.
[0017] Generally speaking, the higher the illumination intensity of a pixel, the more severely overexposed it should be judged to guide subsequent steps to suppress its brightness and restore the details therein; on the contrary, the lower the illumination intensity of a pixel, the more severely underexposed it should be judged to guide subsequent steps to increase its brightness. Therefore, design the adaptive threshold map according to the illumination map , and the specific formula is: , where, the parameter is used to control the maximum value of the threshold , and here is set. The parameter is used to characterize the change rate of the threshold with brightness, and it is recommended to take a value of 1.5. Figure 2 shows the threshold map of the example image, and its value changes inversely with the pixel illumination. Based on the threshold map , for any pixel , if its estimated illumination is greater than its corresponding threshold , it is judged as overexposed; otherwise, it is judged as underexposed.
[0018] (5) Based on the threshold map obtained in (4) , the exposure degree of each pixel can be determined. According to the exposure degree, the luminance channel Y of the input image is remapped to correct the exposure problem existing in the image. Specifically, at the threshold , the monotonically increasing Naka-Rushton function and its symmetric function about the gray median (0.5, 0.5) are spliced to obtain a luminance remapping function that can simultaneously improve underexposure and suppress overexposure, as follows: , where is calculated from (2), is calculated from (4). The adjustable parameter is used to control the amplitude of the luminance remapping and is a function of the mean value of the luminance channel of the input image, as follows: , In the formula, is the absolute value operation. Specifically, the curve of the luminance remapping function with respect to the parameter and the threshold is shown in Figure 3 .
[0019] It can be seen from Figure 3 that for the parameter , when the input pixel luminance is less than the threshold , it is determined to be underexposed, and the luminance after mapping is greater than its input luminance ; conversely, if the input pixel luminance is greater than the threshold , it is determined to be overexposed, and the luminance after mapping is less than its input luminance . In addition, to illustrate the influence of the parameter on the luminance remapping, Figure 3 shows the change trend of the remapping function curve with fixed. According to the calculation formula of the parameter , when the mean value of the input image luminance is closer to the median value 0.5 of the image gray dynamic range, the value of is closer to 1, then the luminance remapping function curve is closer to , that is, the amplitude of the luminance adjustment is smaller, and the remapping result is closer to the input luminance ; Conversely, when the average brightness of the input image deviates from 0.5, the smaller the value, the greater the adjustment range of brightness remapping.
[0020] (6) According to the remapped brightness map calculated in (5) , combined with the input color image , reconstruct the color image after brightness adjustment : , where the subscript represents a channel in the RGB color space. The exponent is an adjustable parameter used to reduce the distortion caused by brightness changes to color reconstruction, specifically as follows: , In the formula, is the absolute value operation. The parameter is used to control the value range, and the recommended value is 1. The parameter is used to control the influence of brightness changes on the color reconstruction of the output image, and the recommended value is 0.6. Therefore, when the input grayscale is greater than , takes a value greater than 1 and changes positively with , which can achieve the effect of enhancing the color of the highlight area in the input image; when the input grayscale is less than , takes a value less than 1 and changes inversely with , which can effectively avoid the over-enhancement of the color in the dark area due to the increase in brightness.
[0021] (7) For the color image reconstructed in (6), in the RGB channels respectively, with the help of the exponential function, enhance the local contrast to improve the local details of the image, specifically as follows: , where the in the exponential part is the result of performing small-scale Gaussian filtering on , and the calculation formula is as follows: , where is calculated from (6), is the Gaussian filter weight, and the calculation formula is as follows: , In the formula, represents the Gaussian variance, and the recommended value is one-twentieth of the diagonal length of the original color image.
[0022] Figure 4 Shown is a set of indoor non-uniform illumination images and their enhancement results. Among them, Figure 4 the problem existing in (a) in is indoor backlighting, resulting in indoor objects being submerged in darkness, while Figure 4 the outdoor scene details in (a) in are clear. Therefore, it is necessary to maintain the clarity and color of the outdoor while enhancing the indoor; Figure 4 (b) and (c) in are images under a single indoor light source, where the part close to the light source is overexposed, while the rest is severely underexposed. It is necessary to suppress the brightness of the high-brightness area while increasing the brightness of the dark area.
[0023] Figure 5 Shown is an outdoor non-uniform illumination image and its enhancement result. The unidirectional sunlight outdoors causes shadow areas in the image, so it is necessary to optimize the details of the areas under strong light while improving the quality of the shadow areas.
[0024] In addition, to demonstrate the generality of the present invention, Figure 6 exposure-deficient images and their enhancement results are shown. The present invention can also effectively enhance image details and avoid over-enhancement of colors.
[0025] In summary Figures 4 - 6 , the present invention can adaptively enhance the details of each local area of the exposure-uneven image, avoid over-enhancement or under-enhancement of a small part of the area, and the obtained result has clear details and balanced colors.
[0026] Based on the same inventive concept, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the foregoing adaptive enhancement method for non-uniform illumination images are implemented.
[0027] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the foregoing adaptive enhancement method for non-uniform illumination images are implemented.
[0028] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0029] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general purpose computers, special purpose computers, embedded processors, or other programmable data processing devices to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in one flow Figure 1 one flow or more flows and / or blocks Figure 1 or means for implementing the functions specified in one block or more blocks.
[0030] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one flow Figure 1 one flow or more flows and / or blocks Figure 1 or means for implementing the functions specified in one block or more blocks.
[0031] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one flow Figure 1 one flow or more flows and / or blocks Figure 1 or means for implementing the functions specified in one block or more blocks.
[0032] The above embodiments are only used to illustrate the technical idea of the present invention, and the protection scope of the present invention cannot be limited thereby. Any modification made on the basis of the technical solution according to the technical idea proposed by the present invention falls within the protection scope of the present invention.
Claims
1. An adaptive enhancement method for non-uniform illumination images, characterized in that: The steps include: Step 1: for the original non-uniform illumination color image, the grayscale value of its RGB channel is used to calculate the Y channel value in the YUV space to obtain the brightness channel of the original non-uniform illumination color image; Step 2, using an anisotropic bilateral filter to perform a convolution operation on the brightness channel obtained in step 1 to estimate the illumination intensity map of the original non-uniform illumination color image; Step 3, calculating an adaptive threshold map for determining the exposure level according to the illumination intensity map obtained in step 2, and determining the exposure level of each pixel on the original non-uniform illumination color image; Step 4, according to the exposure degree of each pixel, the brightness channel of the original non-uniform illumination color image is remapped using a brightness remapping function to obtain a remapped brightness map; Step 5, reconstructing the original non-uniform illumination color image according to the remapped brightness image obtained in step 4 to obtain a reconstructed color image; Step 6, using an exponential function to enhance the local contrast of the reconstructed color image obtained in step 5, to obtain the final adaptive enhancement result image.
2. The adaptive enhancement method for non-uniform illumination images according to claim 1, characterized in that: In step 1, the Y channel value of the original non-uniform illumination color image in the YUV space is calculated as follows: , in, is the pixel in the original non-uniform illumination color image The grayscale value in the Y channel, and Represents the horizontal and vertical coordinates of the pixel, Represents pixels exist The grayscale value of the channel, .
3. The adaptive enhancement method for non-uniform illumination images according to claim 1, characterized in that: In step 2, the calculation formula of the light intensity map is as follows: , in, is the pixel in the original non-uniform illumination color image The estimated lighting In pixels The neighborhood area centered on Represents the neighborhood area A pixel in Pixel Grayscale value in the Y channel; For the bilateral filter at pixel and The weight value between is calculated as follows: , in, is the spatial domain variance, which is one tenth of the diagonal length of the original non-uniform illumination color image; is the grayscale domain variance, which is one tenth of the difference between the maximum grayscale and the minimum grayscale in the Y channel; Pixel Grayscale value in the Y channel.
4. The method for adaptive enhancement of non-uniform illumination images according to claim 1, characterized in that: In step 3, the calculation formula of the adaptive threshold map is as follows: , in, is the pixel in the original non-uniform illumination color image The estimated lighting Pixel The corresponding threshold value, is a parameter used to control the maximum value of the threshold, is a parameter used to characterize the rate of change of the threshold with brightness; If the pixel Estimated lighting Greater than the corresponding threshold , then determine the pixel otherwise it is considered underexposed.
5. The method for adaptive enhancement of non-uniform illumination images according to claim 1, characterized in that: In step 4, the calculation formula for remapping is as follows: , in, is the pixel in the original non-uniform illumination color image The grayscale value in the Y channel, Pixel The corresponding threshold value, Pixel The brightness value after remapping, This is an adjustable parameter used to control the magnitude of brightness remapping. Its values are as follows: , in, is the mean grayscale value of all pixels in the Y channel in the original non-uniform illumination color image, To take the absolute value operation.
6. The method for adaptive enhancement of non-uniform illumination images according to claim 1, characterized in that: In step 5, the reconstructed color image is represented as follows: , in, is the pixel in the original non-uniform illumination color image The grayscale value in the Y channel, Pixel The brightness value after remapping, Represents the pixels in the original non-uniform illumination color image exist The grayscale value of the channel, Represents pixels After reconstruction The grayscale value of the channel, ; It is an adjustable parameter used to reduce the distortion of color reconstruction caused by brightness changes. The details are as follows: , in, For control Parameters with value ranges, is a parameter used to control the effect of brightness changes on the color reconstruction of the output image. To take the absolute value operation.
7. The method for adaptive enhancement of non-uniform illumination images according to claim 1, characterized in that: In step 6, the local contrast of the reconstructed color image is enhanced using an exponential function, and the calculation formula is as follows: , in, Represents the reconstructed color image Medium Pixels After contrast enhancement, The grayscale value of the channel, Represents pixels After reconstruction The grayscale value of the channel, represents a Gaussian filter, specifically: , in, In pixels The neighborhood area centered on Represents the neighborhood area A pixel in Represents pixels After reconstruction The grayscale value of the channel, is the Gaussian filter weight, and the calculation formula is as follows: , in, Represents Gaussian variance, and its value is one twentieth of the diagonal length of the original non-uniform illumination color image.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor executes the computer program, the steps of the adaptive enhancement method for non-uniform illumination images according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the adaptive enhancement method for non-uniform illumination images according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for sharpening non-uniform illumination video
CN110992287A
Universal enhancement framework for foggy image under complex illumination condition
CN113112429A
Non-uniform illumination image enhancement method and system, storage medium and equipment
CN115526803A
Asynchronous CMOS pixel circuit with light adaptive threshold voltage adjustment mechanism
CN103607546A
Low-illumination color image enhancement method based on simulation exposure and multi-scale fusion
CN116563133A
Cited By
Image contrast enhancement method and device for non-uniform exposure
CN120807377A