A full-scene adaptive brightness correction fusion method
By employing a full-scene adaptive brightness correction fusion method, and utilizing image segmentation and brightness correction under different exposure conditions, the problem of brightness overflow and distribution distortion under camera hardware limitations is solved, thereby achieving image contrast enhancement and realistic brightness distribution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING HONGZHONG ELECTRONICS TECH
- Filing Date
- 2023-09-07
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, limited camera hardware conditions lead to brightness overflow in captured images, resulting in the loss of details in both bright and dark areas. Furthermore, multi-scale fusion methods are prone to causing brightness distribution distortion, affecting image contrast and realism.
A full-scene adaptive brightness correction and fusion method is adopted. By acquiring multiple source images under different exposure conditions, pixel-level region segmentation and brightness contrast calculation are performed. The contrast correction coefficient is adjusted, the weight scaling factor is calculated, a new weight map is formed and normalized, and finally the brightness correction and fusion of the image are achieved.
It effectively prevents brightness reversal, improves image contrast, ensures the authenticity of brightness distribution, solves the problem of brightness distribution distortion, and enhances the visual effect of the image.
Smart Images

Figure CN117135466B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a full-scene adaptive brightness correction fusion method. BACKGROUND
[0002] Generally, due to the limited camera hardware conditions, the capture of all brightness in the scene cannot be realized, resulting in the brightness overflow of the captured image, and the loss of details in the highlight area and the low-light area. The image fusion technology provides an effective technical means to solve the above-mentioned problems. In the image processing method based on image fusion, the multi-scale fusion method uses the pixel-level fusion of the exposure image sequence under different sizes to better restore the details of the highlight and low-light areas in the image, and ensure seamless transition in the presence of brightness difference after fusion. However, this method is easy to cause the brightness distribution distortion of the image, and the contrast between the originally brighter and darker areas is greatly weakened or even reversed, which is inconsistent with the real scene and the subjective impression of the image viewer. SUMMARY
[0003] This section aims to summarize some aspects of the embodiments of the present application and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of the specification to avoid obscuring the purpose of this section, abstract and title, and such simplifications or omissions cannot be used to limit the scope of the present application.
[0004] In view of the problems existing in the prior art, the present application is proposed.
[0005] To solve the above technical problems, the present application provides the following technical scheme: a full-scene adaptive brightness correction fusion method, comprising the following steps:
[0006] Obtaining 2N+1 source images to be fused collected under different exposure conditions
[0007] Obtaining the pixel-level normalized weight map of the image to be fused
[0008] Obtaining the brightness image corresponding to the source image
[0009] Segmenting the image based on the brightness difference or the spatial difference to obtain a segmented local region set Sp, The total number of segmented regions is S, after segmentation, all and The image blocks with consistent position, shape and size can be obtained through the region set , k=-N,…,-2,-1,0,1,2,…,N, The weights to be modified and optimized;
[0010] Calculate the brightness contrast of the segmented regions;
[0011] Adjust the contrast, and calculate the weight scaling factor based on the adjusted contrast. ;
[0012] Iterate through all the segmented regions and apply the scaling factor to each target region obtained from the solution. Weight of its region Correction is performed to obtain The final set of weights forms a new weight graph. The new weight graph is normalized to obtain the modified weight graph. and ;
[0013] Modify the obtained weights and Perform fusion at different sizes.
[0014] As a preferred embodiment of the full-scene adaptive brightness correction fusion method of the present invention, wherein: calculation
[0015] The specific steps for segmenting the brightness and contrast of the regions are as follows:
[0016] Get Luminance sub-images under each segmented region Sp Calculate the mean of each brightness sub-image. ;
[0017] By the mean of sub-images Calculate the brightness weights representing each region
[0018] (1);
[0019] in, ;
[0020] Calculate the fusion mean of each region
[0021] (2);
[0022] Calculate the overall average brightness of each region after merging. and the overall average brightness of a normally exposed image
[0023] (3);
[0024] Calculate brightness contrast
[0025] (4).
[0026] As a preferred scheme of the full-scene adaptive brightness correction fusion method, the specific step of adjusting the contrast is
[0027] The design of the contrast correction coefficient ;
[0028] The contrast adjustment formula is + (5);
[0029] Wherein, is the contrast of the Sp region after weight correction, and are the minimum and maximum values of the corrected contrast, is the contrast correction coefficient.
[0030] As a preferred scheme of the full-scene adaptive brightness correction fusion method, wherein: The calculation formula of is
[0031] If , ; otherwise, ;
[0032] Wherein, r∈(0,1] is a fixed constant.
[0033] As a preferred scheme of the full-scene adaptive brightness correction fusion method, wherein: the specific steps of calculating the weight scaling factor
[0034] The calculation of the optimized fusion mean value , (6);
[0035] The ratio of the optimized Sp region mean value to the overall fusion mean value before optimization is , that is (7);
[0036] The weight scaling factor is solved by formulas (5)-(7),
[0037] (8).
[0038] As a preferred scheme of the full-scene adaptive brightness correction fusion method, wherein: the process of forming a new weight map is
[0039] , =
[0040] As a preferred scheme of the full-scene adaptive brightness correction fusion method of the present application, wherein: the normalized processing is performed on the modified weight map and respectively to obtain the modified weight map and , and the process is as follows,
[0041]
[0042] .
[0043] The present application has the following beneficial effects: when the present application is used for image processing, the brightness inversion can be prevented and the image contrast can be improved, the authenticity of the brightness distribution is ensured, and the brightness distribution distortion problem in the prior art can be effectively solved. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. Among them:
[0045] Figure 1 is a flowchart of the present application.
[0046] Figure 2 is an ultra-low exposure original drawing in example 2 .
[0047] Figure 3 is a low exposure original drawing in example 2 .
[0048] Figure 4 is a normal exposure original drawing in example 2 .
[0049] Figure 5 is a high exposure original drawing in example 2 .
[0050] Figure 6 is an ultra-high exposure original drawing in example 2 .
[0051] Figure 7 is a multi-scale exposure fusion image in example 2.
[0052] Figure 8 is an exposure fusion image after using the present application in example 2. DETAILED DESCRIPTION
[0053] In order to make the above objectives, characteristics and advantages of the present application more obvious and comprehensible, the specific embodiments of the present application are described in detail below with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all the other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present application.
[0054] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. The present application, however, can be practiced in a variety of ways beyond the specific details set forth herein without departing from the scope of the present application. It can be appreciated by those skilled in the art that the present application can be practiced without such specific details.
[0055] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. The "in one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an embodiment that is independent of or selected from other embodiments.
[0056] The present application is described in detail in conjunction with the schematic drawings. In the detailed description of the embodiments of the present application, the sectional view of the device structure is locally enlarged without the general proportion for the convenience of description, and the schematic drawings are only examples, which should not limit the scope of protection of the present application. In addition, the three-dimensional spatial dimensions of length, width and depth should be included in actual manufacture.
[0057] Meanwhile, in the description of the present application, it should be noted that the terms "upper, lower, inner and outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first, second or third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0058] In the present application, unless otherwise explicitly specified and limited, the terms "mounting, connecting, connection" should be understood broadly, for example: it can be fixed connection, detachable connection or integral connection; it can also be mechanical connection, electrical connection or direct connection, it can also be indirectly connected through an intermediate medium, or it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0059] Example 1
[0060] Reference Figure 1For the first embodiment of the present application, the embodiment provides a full-scene adaptive brightness correction fusion method, using the method to synthesize panoramic roaming video, without association with IP address, can be directly downloaded, shared in video format, saving time and effort.
[0061] A full-scene adaptive brightness correction fusion method, comprising the following steps,
[0062] S1: obtaining the image to be fused and its weight, specifically,
[0063] S101 obtaining 2N+1 source images to be fused collected under different exposure conditions , k = -N, …, -2, -1, 0, 1, 2, …, N;
[0064] S102 setting rules from the brightness, color, and local details of the pixels (which are prior art, reference 1), obtaining the pixel-level normalized weight map of the image to be fused ;
[0065] S2: image region segmentation, specifically,
[0066] S201 calculating and obtaining the brightness image corresponding to the source image ;
[0067] S202 performing region segmentation based on brightness difference or spatial difference on the image , obtaining the segmented local region set Sp, , is the total number of segmented regions, after segmentation, all and can obtain images with consistent position, shape, and size through the region set (the segmentation method used in this step can be any of the existing methods, such as watershed segmentation, region growing segmentation, threshold segmentation, neural network segmentation, etc.), is the weight to be modified and optimized;
[0068] S3: calculating the brightness contrast of the segmented region, specifically,
[0069] S301 obtaining the brightness sub-image under each segmented region Sp, calculating the mean value of each brightness sub-image;
[0070] S302 calculating the brightness weight representing each region through the mean value
[0071] (1);
[0072] wherein, ;
[0073] S303 calculating the fusion mean value of each region
[0074] (2);
[0075] S304 calculating the overall brightness mean value of each region after fusion and the overall brightness mean value of the normal exposure image
[0076] (3);
[0077] S305 calculating the brightness contrast
[0078] (4).
[0079] S5: correcting the weight of the target region, specifically,
[0080] S501 designing a contrast correction coefficient , adjusting the contrast + (5), if , ; otherwise, ;
[0081] S502 calculating the weight scaling factor according to the adjusted contrast , first calculating the optimized fusion mean value , (6);
[0082] The ratio of the mean value of the Sp region after optimization to the overall fusion mean value before optimization is , that is (7);
[0083] The weight scaling factor is solved by formulas (5)-(7) ,
[0084] (8);
[0085] wherein, r∈(0,1], is the contrast of the Sp region after weight correction, and are the minimum and maximum values of the corrected contrast respectively;
[0086] S503 traversing all the block regions, according to the weight scaling factor of each target region solved weight of its region correction to obtain the final weight set formed by the weight of the region normalization of the new weight map to obtain the modified weight map and ;
[0087] form a new weight map The process is,
[0088] , = (9);
[0089] normalization of and to obtain the modified weight map and The process is,
[0090]
[0091] ;
[0092] S504 fuse the modified weight with in different sizes;
[0093] In this embodiment, the modified weight and are fused in different sizes using a multi-scale fusion method, which is a prior art, see reference 1.
[0094] When using the present application for image processing, it can prevent brightness reversal and improve image contrast, and ensure the authenticity of brightness distribution, which can effectively solve the brightness distribution distortion problem in the prior art.
[0095] Embodiment 2
[0096] The embodiment provides a full-scene adaptive brightness correction fusion method, which is different from embodiment 1 in that the embodiment uses scientific demonstration means to compare test results to verify the real effect of the method.
[0097] A full-scene adaptive brightness correction fusion method, comprising the following steps,
[0098] S1: obtaining the image to be fused and its weight, specifically,
[0099] S101 obtaining 5 source images to be fused collected under different exposure conditions , k =-2, -1, 0, 1, 2;
[0100] S102 Set rules from three aspects of brightness, color, and local details of pixels (which is prior art, reference 1), and obtain the pixel-level normalized weight map of the image to be fused ;
[0101] S2: Image region segmentation, specifically,
[0102] S201 Calculate and obtain the brightness image corresponding to the source image ;
[0103] S202 Perform region segmentation based on brightness difference or spatial difference on the image , and obtain the segmented local region set Sp, After segmentation, all and can obtain image blocks with consistent position, shape, and size through the region set ;
[0104] S3: Calculate the brightness contrast of the segmented region, specifically,
[0105] S301 Obtain the brightness sub-image under each segmented region Sp , and calculate the mean value of each brightness sub-image ;
[0106] S302 Calculate the brightness weight representing each region by the mean value
[0107] (1);
[0108] wherein, σ = 0.2;
[0109] S303 Perform weighted fusion according to the weight and the mean value , and calculate the fusion mean value of each region
[0110] (2);
[0111] S304 Calculate the overall brightness mean value of each region after fusion and the overall brightness mean value of the normally exposed image
[0112] (3);
[0113] S305 Calculate the brightness contrast
[0114] (4);
[0115] S5: correcting the weight of the target region, specifically,
[0116] S501: designing a contrast correction coefficient , adjusting the contrast + (5), if , , otherwise, ;
[0117] In this embodiment, r=0.8, the difference between the contrast coefficients The difference threshold Thd=0.2;
[0118] S502: calculating , so that the weight scaling factor of the S1 region is =12.08, and the weight scaling factor of the S2 region is =1;
[0119] S503: traversing all the block regions, correcting the weight of the region to obtain , and finally forming a new weight map , normalizing the new weight map to obtain the modified weight map and ;
[0120] S504: using a multi-scale fusion method to fuse the modified weight and in different sizes.
[0121] As shown in Figures 2-8 , it can be seen from the image that after using the method of the application, the brightness contrast of the sky part and the ground part in the image is more consistent with the original normal exposure image, and the brightness distribution of the real scene is restored more truly.
[0122] The document 1 in the present application specifically refers to:
[0123] Mertens T, Kautz J, Van Reeth F. Exposure Fusion[C] / / IEEE.IEEE, 2007. DOI:10.1109 / PG.2007.17.
[0124] It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced, without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A full-scene adaptive brightness correction and fusion method, characterized in that: include, Obtain 2N+1 source images acquired under different exposure conditions to be fused. ; Obtain pixel-level normalized weight map of the image to be fused ; Obtain the brightness image corresponding to the source image. ; For images Perform region segmentation based on brightness differences or spatial differences to obtain a set of segmented local regions Sp. , The total number of regions after partitioning. After partitioning, all and This region set is used to obtain image blocks with consistent location, shape, and size. , k=-N,…,-2,-1,0,1,2,…,N, The weights to be modified and optimized; Calculate the brightness contrast of the segmented regions; Adjust the contrast, and calculate the weight scaling factor based on the adjusted contrast. ; Iterate through all the segmented regions and apply the scaling factor to each target region obtained from the solution. Weight of its region Correction is performed to obtain The final set of weights forms a new weight graph. For the new weighted graph and After normalization, the modified weight graph is obtained. and The process is as follows: , ; Modify the obtained weights and Perform fusion at different sizes.
2. The full-scene adaptive brightness correction and fusion method as described in claim 1, characterized in that: calculate The specific steps for segmenting the brightness and contrast of the regions are as follows: Get Luminance sub-images under each segmented region Sp Calculate the mean of each brightness sub-image. ; By the mean of sub-images Calculate the brightness weights representing each region (1); in, ; Calculate the fusion mean of each region (2); Calculate the overall average brightness of each region after merging. and the overall average brightness of a normally exposed image (3); Calculate brightness contrast (4)。 3. The full-scene adaptive brightness correction and fusion method as described in claim 2, characterized in that: The specific steps for adjusting the contrast are as follows: Design contrast correction coefficient ; Contrast adjustment formula is + (5); in, The contrast after weight correction for the Sp region. and These represent the minimum and maximum contrast values after correction, respectively. This is the contrast correction factor.
4. The full-scene adaptive brightness correction and fusion method as described in claim 3, characterized in that: The calculation formula is as follows: like , ; otherwise, ; Where r∈(0,1] is a fixed constant.
5. The full-scene adaptive brightness correction and fusion method as described in claim 4, characterized in that: Calculate the weight scaling factor The specific steps are as follows Calculate the optimized fusion mean , (6); The ratio of the mean of the optimized Sp region to the overall fusion mean before optimization is: ,Right now (7); The weight scaling factor can be obtained by solving formulas (5) to (7). , (8)。 6. The full-scene adaptive brightness correction and fusion method as described in any one of claims 1 to 5, characterized in that: Form a new weighted graph The process is as follows: (9)。
Citation Information
Patent Citations
Wide dynamic image fusion method and device and computer readable storage medium
CN113902656A
Full-scene brightness adaptive image fusion method and device
CN114429437A