A Low-Light Image Contrast Enhancement Method Based on the Mixture of MSR and Input Image Brightness

Through the method of mixing MSR with input image brightness, the problems of uneven brightness and loss of details in low-illumination image contrast enhancement are solved, and high-fidelity image enhancement effect is achieved, which is suitable for computer vision systems.

CN117036186BActive Publication Date: 2025-07-29安徽朗盛煜达科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310867224.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2025-07-29
Estimated Expiration
2043-07-14

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the contrast of low-illumination images while maintaining the naturalness of the image, resulting in loss of image details and uneven brightness problems.

Method used

Using the method of mixing MSR and input image brightness, the image is converted from RGB color space to HSV color space, the V channel value is adjusted and enhanced. After weight fusion, the objective function is optimized through base mapping, and finally returned to the RGB color space to obtain a high-fidelity output image.

Benefits of technology

The contrast of dark areas of low-illumination images is improved, the details and nature of the image are maintained, the contrast is avoided excessive enhancement, and the visual effect of the image and the performance of the computer vision system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117036186B_ABST
    Figure CN117036186B_ABST
Patent Text Reader

Abstract

A low-light image contrast enhancement method based on the mixture of MSR and input image brightness. Taking a low-light image as the input image, converting it from the RGB color space to the HSV color space, adjusting the value of the V channel, enhancing the V component, preprocessing the input image using MSR to obtain an output image with details in bright areas; fusing the output image and the input image with w<subgt;1 / (1 - w<subgt;1) as the brightness weight to obtain a fused image, using the fused image as the target image, optimizing the objective function through the base mapping method, and through weight adjustment, and finally converting back to the RGB color space to obtain a high-fidelity final output image. The present invention improves the contrast of the dark areas of the low-light image while maintaining the details and properties of the image. It can enhance the details of the input image, avoid excessive enhancement of the contrast, and well maintain the naturalness of the input image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of artificial intelligence, and relates to the enhancement of the contrast of a single low-illumination image, and particularly relates to a method for enhancing the contrast of a low-illumination image based on the mixture of MSR and the brightness of an input image. Background Art

[0002] Low-light images are a very common phenomenon when taking pictures at night. Insufficient lighting will greatly reduce the visual quality of the image. The loss of details and low contrast will not only lead to an annoying subjective feeling, but also affect the performance of many computer vision systems. There are many reasons for low-light images, such as low-light environments, low-end shooting devices, and unreasonable configurations of shooting devices. Low-illumination images have more dark areas and lower overall brightness. Since the gray values of adjacent pixel points are similar, the image appears overall dull in visual perception, the objects in the image are not easily recognizable, and the color expression is insufficient. The main purpose of low-illumination image enhancement is to improve the brightness and contrast of the image. However, usually increasing the brightness and contrast will cause the image to lose details. Therefore, it is also a key point in the research to pay attention to the naturalness of the image while changing the brightness and contrast, and to ensure that the color image is within a normal color range.

[0003] High-visibility images can reflect more details in the real scene. The information in high-visibility images is an important factor required in the processing of computer vision technology. However, in real life, most of the images we use are mainly obtained through devices such as mobile terminals and cameras. Therefore, the defects of low light intensity and uneven light distribution in the obtained images are inevitable. Due to the influence of environmental factors during the acquisition process, the light entering the acquisition device is insufficient, resulting in a low quality of the acquired image. For example, the image brightness and contrast are low, and the loss of detail information is serious. Such images not only have a poor visual experience, but also their utilization value will be greatly reduced. The shadow parts that appear after an object is blocked and the dark areas of the surrounding environment are all caused by insufficient light, so the low-brightness areas are not sufficiently exposed during imaging, and the objects in the image are covered by darkness. These external environmental influences make it difficult for us to further analyze and utilize the image.

[0004] In this context, researchers have proposed various types of contrast enhancement algorithms from multiple perspectives through research in the field of digital image processing. These algorithms have not only improved the subjective visual effect of low-illumination images, but also improved the objective quality of low-illumination images to a certain extent, thus having more application value.

[0005] For low-light images, they can be studied from two aspects. One aspect is to consider from the hardware perspective. Although there are some high-performance cameras on the market that are specifically designed for shooting in low-light environments, these cameras are expensive, and sensitive photosensitive devices and delicate camera lenses cannot be widely applied in people's lives. Another aspect is to conduct research from the software aspect. Currently, there are many classic low-light image enhancement algorithms for processing images. However, due to the influence of environmental diversity during image acquisition, existing algorithms still cannot meet various requirements and have not reached a mature stage. Therefore, enhancing the contrast of low-light images remains a relatively popular research direction in current digital image processing, such as in computer vision-related fields like road traffic, medical images, and surveillance videos. Although low-light image enhancement methods vary, their purpose is to improve the visual effect of the image, enrich the detailed information of the image, protect the color information of the image, so that people can extract more effective information from low-light images. Therefore, enhancing the contrast of low-light images has important research significance. Summary of the Invention

[0006] In order to overcome the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a low-light image contrast enhancement method based on the mixture of MSR and the brightness of the input image. This method can process low-light images generated under some conditions and produce high-quality results, maintaining the illuminance of the detailed images in bright and dark areas and solving the problem of brightness difference.

[0007] In order to achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0008] A low-light image contrast enhancement method based on the mixture of MSR and the brightness of the input image, comprising the following steps:

[0009] Step 1, taking the low-light image as the input image, converting it from the RGB color space to the HSV color space, adjusting the value of the V channel, enhancing the V component, and preprocessing the input image using MSR to obtain an output image with detailed information in bright areas.

[0010] Step 2, fusing the output image and the input image with w1 / (1 - w1) as the brightness weight to obtain a fused image, where w1 is the weight for adjusting the pixel ratio.

[0011] Step 3, taking the fused image as the target image, optimizing the objective function through base mapping, and through weight adjustment, and finally converting it back to the RGB color space to obtain a final output image with high fidelity.

[0012] Compared with the prior art, the present invention improves the contrast of the dark areas of low-illumination images by fusing MSR with the input image with a set weight, optimizes the objective function in combination with the base mapping method, and at the same time preserves the details and properties of the image. It can enhance the details of the input image, avoid excessive enhancement of the contrast, and well preserve the naturalness of the input image. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a diagrammatic illustration of the method for enhancing the contrast of low-illumination images based on the mixture of MSR and the brightness of the input image according to the present invention.

[0014] Figure 2 It is a diagrammatic illustration of MSR based on the enhancement of the contrast of low-illumination images according to the present invention.

[0015] Figure 3 It is a diagrammatic illustration of the result comparison between the algorithm used in the method for enhancing the contrast of low-illumination images according to the present invention and other algorithms. Among them, (a) is the original image, (b) is the result of MSR, (c) is the result of the combination of the original image and MSR, and (d) is the result after base mapping. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0016] The following will describe in detail the embodiments of the present invention in conjunction with the drawings and embodiments.

[0017] The present invention is a method for enhancing the contrast of low-illumination images based on the mixture of MSR and the brightness of the input image. Taking the low-illumination image as the input image, it combines and fuses it with the image processed by MSR according to a certain weight, and under certain base mapping conditions, completes the optimization of the objective function, and finally obtains an output image with high fidelity.

[0018] As Figure 1 shown, the present invention is divided into three parts. The first part processes the input image in MSR and adopts a suitable Gaussian amplitude range to obtain the details of the bright areas, but there are problems such as the brightness difference at the edges of the large bright areas and the overall darkening of the middle part. The second part is to solve this problem by fusing the result of MSR and the input image with w1 / (1 - w1) as the brightness weight, which not only maintains the illuminance of the detailed images in the bright and dark areas but also solves the problem of brightness difference. The third part is to complete the optimization of the objective function in the form of base mapping for the effect of the whole block appearing in some flat images, and finally obtain an output image with high fidelity through weight adjustment.

[0019] The algorithm flow of the method of the present invention is as Figure 1 and Figure 2 shown, and it is specifically implemented according to the following main steps:

[0020] (1) MSR (Multi Scale Retinex)

[0021] In this step, the low - illumination image is used as the input image, which is converted from the RGB color space to the HSV color space. The value of the V channel is adjusted to enhance the V component, and MSR is used to pre - process the input image to obtain an output image with details in bright areas.

[0022] In the embodiment of the present invention, when using MSR to pre - process the low - illumination image, the Gaussian amplitude range can be 5, 10, 50, and an output image with details in bright areas is obtained. The advantage of MSR is that it can effectively remove the noise in the image and enhance the details of the image while maintaining the natural feeling of the image. The output r(x, y) obtained by pre - processing with MSR, that is, the initial objective function, is defined as follows:

[0023]

[0024] where V(x, y) represents the V value of the pixel with coordinates (x, y) in the HSV color space, m represents the total number of MSRs, and m is set to 3 in the embodiment of the present invention. G i (x, y) represents the output of the i - th Gaussian filter, which is expressed as:

[0025]

[0026] where σ i represents the standard deviation of the Gaussian function, and K i represents the coefficient of the Gaussian filter.

[0027] (2) Combining MSR with the input image

[0028] In this step, the output image obtained in step 1 and the initial input image are fused with w1 / (1 - w1) as the brightness weight to obtain the fused image. The advantage of MSR is that it can effectively remove the noise in the image and enhance the details of the image while maintaining the natural feeling of the image. The disadvantage is that MSR requires a long calculation time when processing large images and may cause over - enhancement or distortion of the image. The image obtained by combining MSR and the original input image with the weight w1 / (1 - w1) in this step can maintain the advantages of MSR and avoid its disadvantages. Then, the image with the optimal contrast is determined according to the parameters, so that the low - illumination image is more natural and high - fidelity. The fused image, that is, the objective function of the combined image, is defined as follows:

[0029]

[0030] where w1(x, y) is the weight of the pixel with coordinates (x, y), which is expressed as:

[0031]

[0032] where α is the parameter value that controls the weight w1(x, y) and is a real number. The larger the value of α, the closer it is to V(x, y); the smaller the value of α, the closer it is to r(x, y). In the embodiments of the present invention, α = 0.5 is taken.

[0033] The function of the weight w1 is to maintain the original illuminance of the well-lit areas in the input image while enhancing the contrast of the poorly lit areas. The weights w1(x, y) of all pixels constitute w1. In the embodiments of the present invention, it is set that 0.1 ≤ w1 ≤ 0.9.

[0034] (3) Mapping based on the base

[0035] In this step, the fused image is used as the target image, and the optimization of the objective function is completed through base mapping. Through weight adjustment, and finally converted back to the RGB color space to obtain the final output image with high fidelity.

[0036] For the effect of the whole block that appears in some flat images, the result after fusing the result of MSR and the input image is used as the target image, and the optimal solution of the objective function, that is, the objective function, is obtained by using base mapping and is defined as follows:

[0037]

[0038] where V′ (x,y) represents the V-channel brightness value of the final output image after base mapping, n represents the values of the three RGB channels, and i = 1, 2, 3, respectively representing the three channels.

[0039] represents the V-channel brightness value of the set target base, which is expressed as:

[0040]

[0041] where, represents the base of the R channel of the pixel with coordinates (x, y), represents the coefficient of this base; represents the base of the G channel of the pixel with coordinates (x, y), represents the coefficient of this base; represents the base of the B channel of the pixel with coordinates (x, y), represents the coefficient of this base; z is an element in the set P, and the set P is {0.5, 1, 2}.

[0042] w2(x,y) is the correlation coefficient after comparing the original input image and the fused image, expressed as:

[0043]

[0044] σ ρ;x,y represents the set of pixels with a chessboard distance of ρ from the pixel at coordinates (x,y); represents the color difference between the pixels at coordinates (x,y) in the input image and the pixels at coordinates (x′,y′); represents the color difference between the pixels at coordinates (x,y) in the output image and the pixels at coordinates (x′,y′), which can be expressed as

[0045] Specifically:

[0046]

[0047]

[0048] and respectively represent the brightness of the i-th pixel and the j-th pixel in the input image in the CIE L*a*b* color space; and respectively represent the values on the a-axis of the i-th pixel and the j-th pixel in the input image in the CIE L*a*b* color space; and respectively represent the values on the b-axis of the i-th pixel and the j-th pixel in the input image in the CIE L*a*b* color space;

[0049] and respectively represent the brightness of the i-th pixel and the j-th pixel in the output image in the CIE L*a*b* color space; and respectively represent the values on the a-axis of the i-th pixel and the j-th pixel in the output image in the CIE L*a*b* color space; and respectively represent the values on the b-axis of the i-th pixel and the j-th pixel in the output image in the CIE L*a*b* color space;

[0050] E in represents the color difference between two pixels in the input image, <E in > represents the average color difference between two pixels in the input image, E C represents the color difference between two pixels in the fused image, <E C > represents the average color difference between two pixels in the fused image;

[0051] The minimization problem is defined as:

[0052]

[0053] After minimizing the objective function, weight adjustment is performed.

[0054] To verify its effectiveness, low-illumination images were selected for simulation. In the method of the present invention, based on MSR, it can effectively remove noise in the image and enhance image details while maintaining the natural feeling of the image. Otherwise, it may cause over-enhancement or distortion of the image. The image obtained by combining the output image of MSR and the original input image through w1 / (1 - w1) can not only maintain the illuminance of bright and dark regions but also well solve the problem of brightness difference.

[0055] Subsequently, for the block effect that appears in the partially flat image of the above result, we use the result after fusing the MSR result and the input image as the target image, complete the optimization of the objective function in the way of base mapping, and finally obtain the output image with high fidelity through weight adjustment.

[0056] The comparison results are as Figure 3 shown in (d) below. In MSR, the overall brightness of the image has increased, but there is an easy appearance of brightness difference at the edges of bright regions, as Figure 3 shown in (b) below; the image after fusion has improved the problem of brightness difference, but there is a block distortion effect, for example, Figure 3 the part of the pine tree branches and leaves in (c) below; for this problem, base mapping is introduced to improve it, and the result is as Figure 3 shown in (d) below, achieving a better contrast enhancement effect and retaining the detail features of the image.

[0057] It can be seen that the present invention has successfully improved the contrast of the image, enhanced the details of the image, prevented over-enhancement, and maintained the naturalness of the image.

Claims

1. A low-light image contrast enhancement method based on the mixture of MSR and input image brightness, characterized in that Including the following steps: Step 1: Taking the low-illumination image as the input image, converting it from the RGB color space to the HSV color space, adjusting the value of the V channel, enhancing the V component, and preprocessing the input image using MSR to obtain the output image r(x, y) with bright area details, which is defined as follows: Among them, V(x, y) represents the V value of the pixel with coordinates (x, y) in the HSV color space, m represents the total number of MSRs, and G i (x, y) represents the output of the i-th Gaussian filter, expressed as: σ i represents the standard variance of the Gaussian function, and K i represents the coefficient of the Gaussian filter; Step 2: Fusing the output image and the input image with w1 / (1 - w1) as the brightness weight to obtain the fused image, which is defined as follows: where w1(x, y) is the weight of the pixel at coordinates (x, y), expressed as: α is the parameter value controlling the weight w1(x, y), which is a real number. The weights w1(x, y) of all pixels constitute w1, and w1 is the weight for adjusting the pixel ratio; Step 3: Taking the fused image as the target image, optimizing the objective function through the base mapping method, and through weight adjustment, and finally converting it back to the RGB color space to obtain the final output image with high fidelity. The objective function is defined as follows: Among them, V' (x,y) represents the V-channel brightness value of the final output image after base mapping. n represents the values of the three RGB channels, and i = 1, 2, 3, respectively representing the three channels; represents the V-channel brightness value of the set target base, expressed as: Among them, represents the base of the R channel of the pixel with coordinates (x, y), represents the coefficient of this base; represents the base of the G channel of the pixel with coordinates (x, y), represents the coefficient of this base; represents the base of the B channel of the pixel with coordinates (x, y), represents the coefficient of this base; z is an element in the set P, and the set P is {0.5, 1, 2}; w2(x, y) is the correlation coefficient after comparing the original input image and the fused image, expressed as: σ ρ;x,y represents the set of pixels with a chessboard distance of ρ from the pixel with distance coordinates (x, y). represents the color difference between the pixel with coordinates (x, y) and the pixel with coordinates (x′, y′) in the input image and the fused image. represents the color difference between the pixel with coordinates (x, y) and the pixel with coordinates (x′, y′) in the output image and the fused image, expressed as: and respectively represent the brightness of the i-th pixel and the j-th pixel of the input image in the CIE L*a*b* color space; and respectively represent the values of the i-th pixel and the j-th pixel of the input image on the a-axis in the CIE L*a*b* color space; and respectively represent the values of the i-th pixel and the j-th pixel of the input image on the b-axis in the CIE L*a*b* color space; and respectively represent the brightness of the i-th pixel and the j-th pixel of the output image in the CIE L*a*b* color space; and respectively represent the values of the i-th pixel and the j-th pixel of the output image on the a-axis in the CIE L*a*b* color space; and respectively represent the values of the i-th pixel and the j-th pixel of the output image on the b-axis in the CIE L*a*b* color space; E in represents the color difference between two pixels in the input image, <E in > represents the average color difference between two pixels in the input image, E C represents the color difference between two pixels in the fused image, <E C > represents the average color difference between two pixels in the fused image; After minimizing the objective function, weight adjustment is performed.

2. The low-light image contrast enhancement method based on the mixture of MSR and input image brightness according to claim 1, wherein, In Step 1, the Gaussian amplitude ranges used for MSR preprocessing are 5, 10, and 50.

3. The low-light image contrast enhancement method based on the mixture of MSR and input image brightness according to claim 1, characterized in that, The larger the α value, the closer it is to V(x, y); the smaller the α value, the closer it is to r(x, y).

4. The low-light image contrast enhancement method based on the mixture of MSR and the input image brightness according to claim 1, characterized in that, α=0.5,0.1≤w1≤0.9。

Citation Information

Patent Citations

  • Low illumination color image enhancement method based on improved Retinex

    CN106530250A

  • Weak light enhancement method based on multi-image fusion Retinex

    CN111127377A