Image enhancement method combining backlight area segmentation and adaptive exposure correction

By combining the methods of backlight area segmentation and adaptive exposure correction, the problems of complex, time-consuming and inconsistent brightness of the backlight image enhancement algorithm in the prior art are solved, and efficient and accurate backlight image enhancement is achieved, and image quality is improved.

CN115082334BActive Publication Date: 2025-04-01XIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210599970.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-04-01
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

The existing backlight image enhancement algorithms have problems such as high algorithm complexity, excessive operation time, excessive local enhancement, and inconsistency in brightness between the restored backlight area and the normal background.

Method used

Combining the image enhancement method of backlight area segmentation and adaptive exposure correction, through multi-scale morphological gradient reconstruction, watershed-based superpixel segmentation, gamma transformation and Canny edge detection, the calculation of the detail recovery degree is used as the exposure adjustment parameter to adaptively correct the backlight area.

Benefits of technology

The segmentation accuracy of backlight images is improved, the algorithm efficiency is improved, and the problems such as contrast distortion, color information loss, edge artifacts and insufficient enhancement are avoided. The image information is restored relatively complete, which improves the image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082334B_ABST
    Figure CN115082334B_ABST
Patent Text Reader

Abstract

The present invention discloses an image enhancement method combining backlight region segmentation and adaptive exposure correction. First, the original backlight image is input, its morphological gradient map is calculated, and multi-scale morphological gradient reconstruction is performed to obtain a gradient reconstruction map that retains the effective contour information of the object; then a watershed-based superpixel segmentation method is performed to generate a superpixel image with precise boundaries, and its histogram valley point is used as a threshold to classify the backlight region; the backlight image is corrected using different gamma parameters to obtain an underexposed image and an overexposed image, and edge detection is performed on the source image and the two exposed images respectively to obtain their edge maps; finally, an intersection and union operation is performed to obtain the final enhanced image. The present invention solves the problems existing in the prior art, such as high algorithm complexity, long operation time, excessive local enhancement, and inconsistent brightness between the restored backlight region and the normal background.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of backlight image enhancement, and in particular relates to an image enhancement method combining backlight area segmentation and adaptive exposure correction. Background Art

[0002] In life, due to the influence of lighting environment, lighting angle or bad weather, poor quality images are often taken. This paper mainly studies the enhancement method of images obtained under backlight conditions. Backlight images often have low main body brightness, which forms a huge contrast with the surrounding environment, resulting in important areas in the image being difficult to be accepted by human visual senses, let alone being quickly recognized by machines. At present, there are few studies on backlight images, and there are many problems that need to be further analyzed and solved. For example, the existing enhancement algorithm does not fully consider the brightness difference between normal lighting areas and underexposed areas, which can easily lead to overexposure or insufficient enhancement of local areas; the backlight image algorithm based on regional segmentation depends on the accuracy of threshold calculation or the accuracy of classification and segmentation, and the process is often complicated and takes too long to run. Therefore, how to quickly detect and identify the backlight area and adaptively enhance it in coordination with the background brightness is of great research significance.

[0003] At present, the enhancement algorithms specifically for backlit images are roughly based on two perspectives: enhancement methods based on feature fusion and enhancement methods based on region segmentation. Feature fusion methods can fuse multi-scale features into a single feature through different tone mapping functions to restore information such as image brightness, contrast, detail contour and color. These inputs usually improve the contrast, detail information, contour information, etc. of the backlit image, and then introduce weight mapping to enhance the visibility of the image. However, if this type of method is directly used for backlit images with different loss degrees and angles, problems such as insufficient enhancement of local areas, color or contrast distortion will still occur. Algorithms based on segmentation usually divide the backlit foreground and other backgrounds in the backlit image, and then enhance them with different tone mapping functions and then combine them. Although this type of method takes into account the brightness differences in different regions, it relies on the accuracy of threshold calculation or the accuracy of classification and segmentation. Not only is the process complicated and time-consuming, but it also has certain limitations. Summary of the invention

[0004] The purpose of the present invention is to provide an image enhancement method combining backlight area segmentation and adaptive exposure correction, which solves the problems existing in the prior art such as high algorithm complexity, long running time, excessive local enhancement, and inconsistent brightness between the restored backlight area and the normal background.

[0005] The technical solution adopted by the present invention is an image enhancement method combining backlight area segmentation and adaptive exposure correction, which is specifically implemented according to the following steps:

[0006] Step 1: Input the original backlit image, calculate its morphological gradient map, and perform multi-scale morphological gradient reconstruction to obtain a gradient reconstruction map that retains the effective contour information of the object;

[0007] Step 2: Use the gradient map obtained in step 1 to perform a watershed-based superpixel segmentation method to generate a superpixel image with precise boundaries, and use its histogram valley point as a threshold to classify the backlit area;

[0008] Step 3: Correct the backlit image using different gamma parameters to obtain an underexposed image and an overexposed image, and perform edge detection on the source image and the two exposed images to obtain their edge maps;

[0009] Step 4: The three edge images obtained in step 3 are intersected and merged according to certain rules, and the detail recoverability is calculated as a parameter for exposure adjustment. The backlit area identified in step 2 is adaptively corrected to obtain the final enhanced image.

[0010] The present invention is also characterized in that:

[0011] Step 1 is as follows:

[0012] Input the original backlit image I, subtract the erosion result from the dilation result of the image, and generate a morphological gradient. For an image f(x, y), the gradient map g(x, y) is expressed by formula (1):

[0013]

[0014] Among them, s(x, y) is a disk-shaped structural element, and Represent the expansion operation and the erosion operation respectively;

[0015] The definition of morphological opening and closing reconstruction is expressed by formula (2) and formula (3) respectively:

[0016]

[0017] C S (g) = R f [(g·S)] (3)

[0018] In the formula, O represents the morphological open reconstruction result, C represents the morphological closed reconstruction result, S is the disk-shaped structure element, f and g represent the original image and gradient image respectively, and R represents the reconstruction operation. and · respectively represent the morphological opening operation and morphological closing operation. Both O and C can remove the regional minimum value in the gradient image to avoid over-segmentation. The hybrid operation of the two can better smooth the image and remove noise, which is expressed by formula (4):

[0019] COs (g) = C S [O S (g)] (4)

[0020] The multi-scale morphological gradient reconstruction algorithm MMGR is expressed by formula (5):

[0021]

[0022] In the formula, represents the result of multi-scale morphological gradient reconstruction of image f, represents the hybrid reconstruction result of image f, r1 and r2 represent the minimum radius and maximum radius of the disk-shaped structure element S, respectively, which are used to control the size of the minimum and maximum regions, r1≤r≤r2, r1, r2∈N+. g≤f, ∨ represents the pointwise maximum value of these hybrid reconstruction results, so as to obtain the multi-scale morphological gradient reconstruction map R of the input image.

[0023] Step 2 is as follows:

[0024] Step 2.1, using the reconstructed gradient map R obtained in step 1 to perform a watershed-based segmentation algorithm: by detecting the local minimum value of R and searching for neighboring pixels with a grayscale close to the minimum value, when the neighboring pixels corresponding to two adjacent minimum values ​​meet, the contour waterline of the local area can be determined, thereby accurately segmenting different areas and generating a superpixel image P with precise boundaries;

[0025] Step 2.2: First, calculate the average brightness of each region in the superpixel image P, and then use the trough of its grayscale histogram as the threshold to classify each region: the region with an average grayscale value less than the threshold can be classified as the backlight region I. B , the others are classified as normal exposure area I O ;

[0026] Step 3 is as follows:

[0027] Step 3.1: Convert the input backlit image I into a grayscale image G, and perform gamma transformations of γ = 2.2 and γ = 0.455 on it to obtain the underexposed image G. L and the overexposed image G H ;

[0028] Step 3.2: Compare the original grayscale image G obtained in step 3.1 with the two images G with different exposure levels. L , G HCanny edge detection is used respectively: first, the image is smoothed using Gaussian filtering and the edge width is increased; second, the gradient value and direction are calculated; then, non-maximum values ​​are suppressed and edge refinement is required to retain the sharp parts of the gradient change; finally, double thresholds are used to detect edges and possible non-edge points are removed. After using the Canny detection operator, the original edge image E and the edge image E of the underexposed image are obtained. γ and the edge image E of the overexposed image γ-1 .

[0029] Step 4 is as follows:

[0030] The original edge image E obtained in step 3 and the edge image E of the underexposed image are used. γ and the edge image E of the overexposed image γ-1 Calculate the dark area edge pixel image E respectively L and edge pixel image E of the bright area H , respectively expressed as:

[0031] E L =E γ-1 -E γ ∩E γ-1 (6)

[0032] E H =E γ -E γ ∩E γ-1 (7)

[0033] Detail visibility in dark areasξ L and detail visibility in bright areasξ H Respectively expressed as:

[0034] ξ L =|E L | / |E all |,ξ H =|E H | / |E all | (8)

[0035] where |·| represents the number of pixels, E all E, E γ , The union of;

[0036] The backlight area I in the threshold classification image obtained in step 2 B Perform exposure correction. The definition of the backlit area after correction is as follows:

[0037]

[0038] Indicates the enhanced backlit area, while the normal exposure area IO remains unchanged, thereby obtaining the final enhanced image.

[0039] The beneficial effect of the present invention is that a method for image enhancement that combines backlight region segmentation with adaptive exposure correction is provided. By reconstructing the backlight image using multi-scale morphological gradients, the effective contour information of the object is retained to the greatest extent, thereby improving the accuracy of segmentation. Secondly, the peaks and valleys of the histogram of the superpixel image are used as thresholds for backlight region classification, thereby greatly improving the efficiency of the algorithm. Finally, edge detection is performed on images with different exposure levels, and the detail recoverability is calculated, and a new exposure adjustment parameter is proposed to adaptively correct the backlight region. Not only does it avoid problems such as contrast distortion, color information loss, edge artifacts, and insufficient enhancement, but the information in the image is also restored more completely, thereby improving the image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] FIG. 1( a ) is a flow chart of an image enhancement method combining backlight area segmentation and adaptive exposure correction according to the present invention;

[0041] FIG. 1( b ) is an algorithm framework diagram of an image enhancement method combining backlight area segmentation and adaptive exposure correction according to the present invention;

[0042] Figure 2 is the original backlit image input in the embodiment of the present invention;

[0043] Figure 3 is a morphological gradient map corresponding to the original backlit image according to an embodiment of the present invention;

[0044] Figure 4 is a multi-scale gradient reconstruction image in an embodiment of the present invention;

[0045] Figure 5 is a superpixel segmentation image based on watershed in an embodiment of the present invention;

[0046] Figure 6 is a histogram and a threshold setting diagram of a superpixel image in an embodiment of the present invention;

[0047] Figure 7 is an underexposed image obtained by performing gamma transformation on the backlit image using a value of γ=2.2 in the embodiment of the present invention;

[0048] Figure 8 is an overexposed image obtained by performing gamma transformation on the backlit image using a value of γ=0.455 in an embodiment of the present invention;

[0049] Fig. 9 is a schematic diagram of the result of performing Canny edge detection on an input backlit image in an embodiment of the present invention;

[0050] Fig.10is a schematic diagram of the result of performing Canny edge detection on an underexposed image in an embodiment of the present invention;

[0051] Fig.11 is a schematic diagram of the result of performing Canny edge detection on an overexposed image in an embodiment of the present invention;

[0052] Fig.12 is a dark area edge pixel image in an embodiment of the present invention;

[0053] Fig.13 is a bright area edge pixel image in an embodiment of the present invention;

[0054] Fig.14 It is a schematic diagram of the result of enhancing the backlit area using the correction parameters calculated by the detail recoverability according to an embodiment of the present invention.

[0055] Fig.15 It is a schematic diagram of the result of enhancing the backlit image using the contrast-limited adaptive histogram equalization enhancement algorithm;

[0056] Fig.16 This is a schematic diagram of the results of enhancing the backlit image using the multi-scale Retinex algorithm with color restoration.

[0057] Fig.17 This is a schematic diagram of the results of enhancing the backlit image using a weighted variational model that simultaneously estimates reflectance and illumination.

[0058] Fig.18 This is a schematic diagram of the result of enhancing the backlit image using the learning-based backlit image restoration algorithm. DETAILED DESCRIPTION

[0059] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0060] The present invention combines the image enhancement method of backlight area segmentation and adaptive exposure correction, the flow chart is shown in FIG1(a), and FIG1(b) is the algorithm framework diagram of the present invention. The first part is to use the reconstructed gradient map to assist the watershed method to perform image segmentation, obtain a super-pixel image with precise boundaries, and then use the valley point of its histogram as the threshold input image to divide it into the backlight area and other areas; the second part is to use different gamma values ​​to perform grayscale transformation to obtain under-exposed images and over-exposed images, use the Canny detection operator to perform edge detection on the image, obtain the detail recoverability of the backlight area and the background area, and further calculate the exposure adjustment parameters, and perform adaptive correction on the backlight area to make the overall visual effect of the restored image more natural;

[0061] The present invention combines the image enhancement method of backlight area segmentation and adaptive exposure correction, which is specifically implemented according to the following steps:

[0062] Step 1: Input the original backlit image, such as Figure 2 As shown, the morphological gradient map is calculated, and multi-scale morphological gradient reconstruction is performed to obtain a gradient reconstruction map that retains the effective contour information of the object;

[0063] Step 1 is as follows:

[0064] Input the original backlit image I, subtract the erosion result from the dilation result of the image, and generate a morphological gradient, such as Figure 3 As shown. The morphological gradient operation is nonlinear and can enhance the image contrast while maintaining the smoother areas in the image. For an image f(x, y), the gradient map g(x, y) is expressed by formula (1):

[0065]

[0066] Among them, s(x, y) is a disk-shaped structural element, and Represent the expansion operation and the erosion operation respectively;

[0067] However, there are still noise details in the morphological gradient image, so morphological opening and closing operations are used to perform gradient reconstruction to better perform image denoising and feature extraction. Opening and closing operations can eliminate peaks (too bright points) or valleys (too dark points) in the image. If an image is opened with a structure element (erode first and then expand), similar noise (too bright points) smaller than the structure element can be removed while keeping the main bright area features unchanged. Similarly, using a closing operation (expand first and then erode) can remove too dark structures, and small gaps in the image are filled. Morphological open reconstruction is to perform an opening operation first and then reconstruct to remove excess noise of the target in the image and then restore its shape; morphological closed reconstruction is to perform a closing operation first and then reconstruct to supplement the missing details of the target and then erode the excess points. The definitions of morphological opening and closing reconstruction are expressed by formula (2) and formula (3) respectively:

[0068]

[0069] C S (g) = R f [(g·S)] (3)

[0070] In the formula, O represents the morphological open reconstruction result, C represents the morphological closed reconstruction result, S is the disk-shaped structure element, f and g represent the original image and gradient image respectively, and R represents the reconstruction operation. and · respectively represent the morphological opening operation and morphological closing operation. Both O and C can remove the regional minimum value in the gradient image to avoid over-segmentation. The hybrid operation of the two can better smooth the image and remove noise, which is expressed by formula (4):

[0071] CO s (g) = C S [O s (g)] (4)

[0072] The morphological opening and closing reconstruction operation can completely remove or retain the details of areas smaller than the current scale during image smoothing. A smaller structure element radius can more accurately locate the region contour. When the structure element becomes larger, the local extreme value in the image will disappear and no new extreme value will be generated, thereby avoiding over-segmentation. However, since the degree of smoothness depends on the size of the structure element, when S is large, it is easy to cause over-segmentation, while when the S value is too small, it will lead to insufficient segmentation. Therefore, it is difficult to obtain a super-pixel image with fewer areas and accurate contours by directly using the morphological gradient reconstruction algorithm. In order to balance the problem of the number of image areas and contour accuracy, different structure elements are used to reconstruct gradient images and these gradient images are fused to remove the dependency of the segmentation results on the gradient image caused by structure elements of different sizes. This method is called the multi-scale morphological gradient reconstruction algorithm MMGR, which is expressed by formula (5):

[0073]

[0074] In the formula, represents the result of multi-scale morphological gradient reconstruction of image f, represents the mixed reconstruction result of image f, r1 and r2 represent the minimum radius and maximum radius of the disk-shaped structure element S, respectively, which are used to control the size of the minimum and maximum areas, r1≤r≤r2, r1, r2∈N+, g≤f, ∨ represents the pointwise maximum value of these mixed reconstruction results, so as to obtain the multi-scale morphological gradient reconstruction map R of the input image, as shown in Figure 4 shown.

[0075] Step 2: Use the gradient map obtained in step 1 to perform a watershed-based superpixel segmentation method to generate a superpixel image with precise boundaries, and use its histogram valley point as a threshold to classify the backlit area;

[0076] Step 2 is as follows:

[0077] Step 2.1, use the reconstructed gradient map R obtained in step 1 to perform a watershed-based segmentation algorithm. The watershed algorithm is a multi-threshold segmentation algorithm. When there are two adjacent valleys (local minima), the water level of the two basins is a threshold. An increase in the threshold means a rise in the water level. When the threshold rises to the watershed, the water in the two basins will merge into one. Simply put, it is to detect the local minimum of R and search for neighboring pixels with a grayscale close to the minimum. When the neighboring pixels corresponding to two adjacent minima meet, the contour waterline of the local area can be determined, thereby segmenting different areas more accurately and generating a superpixel image P with precise boundaries, such as Figure 5 As shown;

[0078] Step 2.2: Since the grayscale range of the backlit image I is wide and most of the pixels are concentrated in the dark and bright areas, it can be detected and divided into two categories. The number of regions in the superpixel image P obtained in step 2.1 is small, which greatly reduces the number of pixels with grayscale value differences in the image, so the speed of regional classification can be further accelerated. First, the average brightness of each region in the superpixel image P is calculated, and then the trough of its grayscale histogram is used as the threshold to classify each region: the region with an average grayscale value less than the threshold can be classified as the backlit region I. B , the others are classified as normal exposure area I O .like Figure 6 shown.

[0079] Step 3: Correct the backlit image using different gamma parameters to obtain an underexposed image and an overexposed image, and perform edge detection on the source image and the two exposed images to obtain their edge maps;

[0080] Step 3 is as follows:

[0081] Step 3.1: Convert the input backlit image I into a grayscale image G, and perform gamma transformations of γ = 2.2 and γ = 0.455 on it to obtain the underexposed image G. L and the overexposed image G H ,like Figure 7 and Figure 8 As shown in Figure 2. Since the edge information of an image is usually concentrated in the high-frequency part, edge detection is essentially a high-frequency wave.

[0082] Step 3.2: Compare the original grayscale image G obtained in step 3.1 with the two images G with different exposure levels. L , G HCanny edge detection is used respectively: first, the image is smoothed using Gaussian filtering and the edge width is increased; second, the gradient value and direction are calculated; then, non-maximum values ​​are suppressed. Since the obtained gradient edge is wide, edge refinement is required to retain the sharp part of the gradient change; finally, double thresholds are used to detect edges and possible non-edge points are removed. After using the Canny detection operator, the original edge image E and the edge image E of the underexposed image are obtained. γ and the edge image E of the overexposed image γ-1 ,like Figure 9-11 shown.

[0083] Step 4: The three edge images obtained in step 3 are intersected and merged according to certain rules, and the detail recoverability is calculated as a parameter for exposure adjustment. The backlit area identified in step 2 is adaptively corrected to obtain the final enhanced image.

[0084] Step 4 is as follows:

[0085] The original edge image E obtained in step 3 and the edge image E of the underexposed image are used. γ and the edge image E of the overexposed image γ-1 Calculate the dark area edge pixel image E respectively L and edge pixel image E of the bright area H , respectively expressed as:

[0086] E L =E γ-1 -E γ ∩E γ-1 (6)

[0087] E H =E γ -E γ ∩E γ-1 (7)

[0088] Fig.12 and Fig.13 The above two edge pixel images are shown respectively. Detail visibility of dark area ξ L and detail visibility in bright areasξ H Respectively expressed as:

[0089] ξ L =|E L | / |E all |,ξ H =|E H | / |E all | (8)

[0090] where |·| represents the number of pixels, E all E, E γ , The union of;

[0091] The backlight area I in the threshold classification image obtained in step 2 B Perform exposure correction. The definition of the backlit area after correction is as follows:

[0092]

[0093] Indicates the enhanced backlit area, while the normal exposure area I O remains unchanged, thereby obtaining the final enhanced image.

[0094] The results of this paper are compared with some existing image enhancement methods. Usually, the contrast-limited adaptive histogram equalization (CLAHE) method will distort the contrast of the output image and cause color halos to appear in the background area, such as Fig.15 The MSRCR method adds a color restoration factor to the multi-scale Retinex to avoid color distortion of the image, but it still cannot completely retain the color information in the image, and the overall enhanced image is grayish white, as shown in Fig.16 The SRIE method can suppress noise to a certain extent and effectively preserve image details, but when applied to backlit images, it often cannot effectively enhance the dark areas in the image, such as Fig.17 As shown in Figure 2, the LBR method is easily affected by the segmentation accuracy and can lead to distortion of the regional connection boundaries, such as Fig.18 shown.

[0095] and Figure 15-18 In comparison, the processing results of the present invention are as follows Fig.14 As shown in the figure, it not only effectively segments the backlit area, but also effectively restores the details and color information of the image by improving the brightness, avoids the edge artifacts, and makes the overall visual effect of the image more natural.

[0096] Through the above-mentioned method, the present invention combines the image enhancement method of backlight area segmentation and adaptive exposure correction, uses superpixel segmentation based on morphological gradient reconstruction for backlight images, performs fast threshold classification, and calculates adaptive exposure adjustment parameters to enhance the backlight area. Compared with the existing backlight image enhancement method, it avoids the problems of contrast distortion, color information loss, edge artifacts and insufficient enhancement, and effectively restores the image detail information, improving the image quality.

Claims

1. An image enhancement method combining backlight area segmentation and adaptive exposure correction, characterized in that: Follow the steps below to implement it: Step 1: Input the original backlit image, calculate its morphological gradient map, and perform multi-scale morphological gradient reconstruction to obtain a gradient reconstruction map that retains the effective contour information of the object; The step 1 is specifically as follows: Input the original backlit image I, subtract the erosion result from the dilation result of the image, and generate a morphological gradient. For an image f(x, y), the gradient map g(x, y) is expressed by formula (1): Among them, s(x,y) is a disk-shaped structural element, and Represent the expansion operation and the erosion operation respectively; The definition of morphological opening and closing reconstruction is expressed by formula (2) and formula (3) respectively: C S (g)=R f [(g·S)] (3) In the formula, O represents the morphological open reconstruction result, C represents the morphological closed reconstruction result, S is the disk-shaped structure element, f and g represent the original image and gradient image respectively, and R f represents the reconstruction operation, and represent the morphological opening operation and morphological closing operation respectively. Both O and C can remove the regional minimum value in the gradient image to avoid over-segmentation. The hybrid operation of the two can smooth the image and remove noise, which is expressed by formula (4): CO S (g)=C S [O S (g)] (4) The multi-scale morphological gradient reconstruction algorithm MMGR is expressed by formula (5): In the formula, represents the result of multi-scale morphological gradient reconstruction of image f, represents the mixed reconstruction result of image f, r1 and r2 represent the minimum radius and maximum radius of the disk-shaped structure element S, respectively, which are used to control the size of the minimum and maximum areas, r1≤r≤r2, r1, r2∈N+, g≤f, ∨ represents the pointwise maximum value of these mixed reconstruction results, so as to obtain the multi-scale morphological gradient reconstruction map R of the input image; Step 2: Use the gradient map obtained in step 1 to perform a watershed-based superpixel segmentation method to generate a superpixel image with precise boundaries, and use its histogram valley point as a threshold to classify the backlit area; The step 2 is specifically as follows: Step 2.1, using the reconstructed gradient map R obtained in step 1 to perform a watershed-based segmentation algorithm: by detecting the local minimum of R and searching for neighboring pixels with a grayscale close to the minimum, when the neighboring pixels corresponding to two adjacent minimum values ​​meet, the contour waterline of the local area can be determined, thereby accurately segmenting different areas and generating a superpixel image P with precise boundaries; Step 2.2: First, calculate the average brightness of each region in the superpixel image P, and then use the trough of its grayscale histogram as the threshold to classify each region: the region with an average grayscale value less than the threshold can be classified as the backlight region I. B , the others are classified as normal exposure area I O ; Step 3: Correct the backlit image using different gamma parameters to obtain an underexposed image and an overexposed image, and perform edge detection on the source image and the two exposed images to obtain their edge maps; The step 3 is as follows: Step 3.1: Convert the input backlit image I into a grayscale image G, and perform gamma transformations of γ = 2.2 and γ = 0.455 on it to obtain the underexposed image G. L and the overexposed image G H ; Step 3.2: Compare the original grayscale image G obtained in step 3.1 with the two images G with different exposure levels. L , G H Canny edge detection is used respectively: first, the image is smoothed using Gaussian filtering and the edge width is increased; second, the gradient value and direction are calculated; then, non-maximum values ​​are suppressed and edge refinement is required to retain the sharp parts of the gradient change; finally, double thresholds are used to detect edges and possible non-edge points are removed. After using the Canny detection operator, the original edge image E and the edge image E of the underexposed image are obtained. γ and the edge image of the overexposed image Step 4: perform intersection and union operations on the three edge images obtained in step 3 according to certain rules, calculate the detail recoverability as a parameter for exposure adjustment, and perform adaptive correction on the backlit area identified in step 2 to obtain the final enhanced image; The step 4 is specifically as follows: The original edge image E obtained in step 3 and the edge image E of the underexposed image are used. γ and the edge image of the overexposed image Calculate the dark area edge pixel image E respectively L and edge pixel image E of the bright area H , respectively expressed as: Detail visibility in dark areasξ L and detail visibility in bright areasξ H Respectively expressed as: ξ L =|And L | / |And all |,ξ H =|And H | / |And all | (8) where |·| represents the number of pixels, E all For E, E γ , The union of; The backlight area I in the threshold classification image obtained in step 2 B Perform exposure correction. The definition of the backlit area after correction is as follows: Indicates the enhanced backlit area, while the normal exposure area I O remains unchanged, thereby obtaining the final enhanced image.

Citation Information

Patent Citations

  • Backlight image enhancement method based on depth matting

    CN113191956A