Low-illumination image enhancement method based on brightness partitioning and tone mapping
By using the method based on brightness partitioning and tone mapping, the low-illumination image is enhanced, which solves the problems of insufficient brightness and blurred details, and achieves the effects of brightness improvement, contrast increase and detail retention, which significantly improves the visual effect of the image.
Patent Information
- Application Number
- CN202510051753.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-13
AI Technical Summary
When low-illumination images are not in poor lighting conditions, there are problems such as insufficient local contrast, low overall brightness, blurred details and lack of visual information, which affects the intuitive effect and practical application value of the image.
The low-illumination image enhancement method based on brightness partitioning and tone mapping is adopted, and the image brightness information is partitioned through the particle swarm algorithm. The brightness and detail information are processed using the improved tone mapping method and parameter physicochemical desharpening mask algorithm, and multi-scale weighted fusion is performed through the Gaussian and Laplace pyramid methods, and the image is finally converted to RGB space.
Effectively improve image brightness, increase image contrast, while retaining detailed information, significantly improving visual effects, and avoiding image color distortion.
Smart Images

Figure CN119991505A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image enhancement, and in particular relates to a low-illumination image enhancement method based on brightness partitioning and tone mapping. Background Art
[0002] Images are one of the main ways for people to obtain information and are closely related to daily life. However, images collected under poor lighting conditions often have problems such as insufficient local contrast, low overall brightness, blurred details, and missing visual information. These problems make it difficult for images to clearly present key information during observation and analysis, thus affecting the intuitive effect and practical application value of the image. In order to solve these problems, low-light image enhancement technology came into being. Through a series of processing steps, such as improving local contrast, adjusting overall brightness, enhancing color, sharpening details, and improving the clarity of visual information, low-light image enhancement technology is committed to improving image quality. With the continuous development of image enhancement technology, the visual effect of images has been significantly improved. At the same time, the performance of computer vision systems under complex lighting conditions has also made significant progress. Therefore, the research and application of low-light image enhancement technology is not only crucial to improving image quality, but also plays a key role in meeting the needs of computer vision systems for high-quality images. Summary of the invention
[0003] The purpose of the present invention is to enhance low-illuminance images, requiring the enhanced images to have appropriate brightness, rich details and high contrast.
[0004] In order to achieve the above object, the present invention adopts the following technical solution: a low-light image enhancement method based on brightness partitioning and tone mapping, comprising the following steps:
[0005] Step 1: Convert the RGB image to HSV space and extract the brightness information ImageV, chroma information ImageH and saturation information ImageS respectively.
[0006] Step 2: Use the particle swarm algorithm to perform brightness partitioning on the extracted image brightness information ImageV to obtain multiple sub-images with different brightness in different regions.
[0007] Step 3: Use the improved tone mapping method to enhance the brightness information of the separated image according to the average brightness of each sub-image obtained by solving the problem, and then obtain ImageV i .
[0008] Step 4: Use a parametric rationalized unsharp masking algorithm to process the extracted image brightness information ImageV, enhance the image detail texture information, and obtain ImagePRUM.
[0009] Step 5: Take the multiple enhanced sub-images ImageV obtained in step 3 i , Gaussian and Laplace pyramid methods are used for multi-scale weighted fusion to obtain ImageV c .
[0010] Step 6: ImageV c ImagePRUM is combined with the Gaussian and Laplace pyramid methods to obtain ImageV e Finally, the image ImageV e The chromaticity information ImageH and saturation information ImageS of the original image are converted into RGB space to obtain an image with appropriate brightness and rich details.
[0011] The effect brought by the present invention is that the proposed low-light image enhancement method can effectively improve image brightness, increase image contrast, and effectively restore image detail information. By converting the RGB image into the HSV space, the correlation between the three types of information, namely brightness, chroma and saturation, is reduced, thereby avoiding the influence of changing the brightness information on the color information, and effectively preventing the occurrence of image color distortion. The separated brightness information is processed so that the low-light image can retain detail information while the overall brightness is enhanced, which significantly improves the visual effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is the algorithm principle diagram in the embodiment of the present invention
[0013] Figure 2 This is a schematic diagram of brightness partitioning and tone mapping in an embodiment of the present invention.
[0014] Figure 3 Schematic diagram of the parameter rationalized unsharp masking algorithm in the embodiment of the present invention
[0015] Figure 4 is a block diagram of a multi-scale weighted fusion algorithm in an embodiment of the present invention
[0016] Figure 5 This is a block diagram of the algorithm principle in the embodiment of the present invention.
[0017] Figure 6 This is a low-light image enhancement effect diagram in an embodiment of the present invention.
[0018] like Figure 1As shown, a low-illumination image enhancement method provided by the present invention mainly divides the brightness information into sub-images of different regions through a particle swarm algorithm, and adopts a tone mapping method to enhance the brightness information. At the same time, a parameter rationalized unsharp masking algorithm is used to enhance the detail texture. Then, a multi-scale weighted fusion method is used to weightedly fuse the enhanced brightness information with the detail information, and convert it back to the RGB space, so as to finally obtain a brightness-enhanced picture. DETAILED DESCRIPTION
[0019] Specifically, in step one:
[0020] Since the scene brightness information in the RGB color space is highly correlated with the color saturation, the color information will be affected when the brightness information is enhanced. However, the correlation between the color information and the brightness information in the HSV color space is very small, which avoids the color distortion problem caused by the enhancement of the brightness information. Therefore, the image is converted to the HSV space to prepare for the subsequent enhancement processing. The specific formulas for converting the RGB space to the HSV space are shown in (1), (2), and (3).
[0021] V=max(R,G,B) (1)
[0022]
[0023]
[0024] Specifically, in step 2:
[0025] In order to obtain sub-images with different brightness, the brightness values of the image ImageV are first classified in the image region block, and each gray level is [0,1,2,...,L-1], and L=256 in an 8-bit image. If the total number of pixels is MN, and the number of pixels with gray level i is n, then the probability of gray level i appearing in the image is approximately p i = n / MN, and then traverse all gray levels i in the image in turn to obtain the probability of each gray level appearing, and the corresponding probability is [p0, p1, p2, ..., p L-1 Then, the particle swarm algorithm is used to search for the optimal separation threshold corresponding to the probability. In the search process, the appropriate function designed based on the maximum entropy idea is used to search for the optimal separation threshold T0, T1, T2, ..., T in the brightness information of imageV. L-1 , the image can be divided into L categories at most, where the fitness function expression is given by formula (4).
[0026]
[0027] Among them, H i (T) corresponds to the separation threshold T iThe entropy value of is given by formula (5).
[0028]
[0029] where p i is the probability of the pixel with gray value i appearing.
[0030] The multi-threshold value is expressed as T1 = (μ0 + μ1) / 2, T2 = (μ1 + μ2) / 2, ..., T L-1 =(μ L-2 +μ L-1 ) / 2, each category is represented by R0={0,1,2,...,T0},...,R k ={T k +1,...,T k+1},...,R L-1 ={T L-1 +1,...,L-1}, the mean of each category is denoted by μ0,μ1,μ2,...,μ L-1 , the probability of each type appearing is recorded as [P0,P1,P2,...,P L-1 ], the specific formula is expressed as
[0031]
[0032]
[0033] Where k = 0, 1, 2, ..., L-1, and the average grayscale value of the image is expressed as
[0034]
[0035] Specifically, in step three:
[0036] Firstly, the low-light image is segmented by threshold according to the particle swarm algorithm to obtain sub-images of different brightness areas, and then the brightness mean of the sub-images is calculated according to formula (11).
[0037]
[0038] Where M i is the number of pixels of a specific sub-image. According to this formula, the average brightness of different divided areas can be calculated.
[0039] Then, the image is adaptively stretched in brightness according to the following mapping method, which is the improved tone mapping method mentioned in the present invention. The following formula is designed
[0040]
[0041]
[0042] In formula (12), is the output of global tone mapping, L dmax is the brightness level of the displayed medium, and L is selected in this paper. dmax =256, L w (x, y) is the brightness information of the image V channel, L wmax and L wmin are the maximum and minimum brightness values in the image, respectively. and The brightness mean, maximum brightness and minimum brightness of each sub-image after the original image is segmented are obtained. i .
[0043] Finally, in order to remove the color temperature deviation, maintain the scene color, and ensure that the white in the image appears pure white after the brightness is stretched, the white balance method is used to correct and optimize the color temperature deviation and improve the color expression of the image. The white balance expression is
[0044]
[0045] In formula (14), f(x) is the white balance correction output, x is the specific image pixel value that needs to be corrected, V max With V min are the maximum and minimum pixel values of the image to be corrected, respectively. max and min are the specified pure white and pure black pixel values, respectively. Here max = 255, min = 0.
[0046] Specifically, in step 4:
[0047] The process of the parameterized rationalized unsharp masking algorithm is to transform the original image L w After (x, y) is converted to the frequency domain, nonlinear filtering is performed to extract the high-frequency component Z(x, y) in the original image. The definition of the nonlinear filter is shown in formula (15).
[0048] Z(x,y)=μ x F x (x,y)C x (x,y)+μ y F y (x,y)C y (x,y) (13)
[0049] In formula (15), μ x and μ y are the gradient adjustment factors in the horizontal and vertical directions respectively, and the other calculation items are given by formula (16).
[0050]
[0051] In formula (16), L w (x, y) is the pixel value at the (x, y) position in the original image, and δ is a very small parameter to prevent singularity in the gradient operator in the horizontal and vertical directions.
[0052] Then the high-frequency component Z(x,y) is subjected to a specific mapping process to obtain Z c (x,y). Then the processed high-frequency component Z c (x,y) and the original image L w (x, y) are fused, and finally a brightness image ImagePRUM that highlights texture details is obtained. The fusion process is shown in formula (17).
[0053]
[0054] In formula (17), L e (x, y) is the output image after filtering by the parameterized rationalized unsharp masking algorithm, Z c (x, y) is the output result after algorithm mapping, L wmax is the maximum value of pixels in the original image Lw(x,y).
[0055] Specifically, in step five:
[0056] The multiple enhanced sub-images ImageV obtained in step 3 i , Gaussian and Laplace pyramid methods are used for multi-scale weighted fusion to obtain ImageV c The multi-scale fusion process is shown in equations (18), (19), and (20).
[0057]
[0058]
[0059]
[0060] In formula (18), l represents the number of pyramid layers, I l (x, y) is the output result of the Gaussian and Laplacian pyramids that fuse the information of each sub-image, that is, the multi-scale fusion result, D k (x,y) represents the kth subgraph, Represents the normalized weight map of the Gaussian pyramid. The standard deviation of the Gaussian filter in the algorithm is σ=0.33.
[0061] Specifically, in step six:
[0062] ImageV cImagePRUM is combined with the Gaussian and Laplace pyramid methods to obtain ImageV e Finally, the image ImageV e The chromaticity information ImageH and saturation information ImageS of the original image are converted to RGB space to obtain an image with appropriate brightness and rich details. The HSV to RGB space method is shown in equations (21) and (22):
[0063]
[0064] (R, G, B) = ((R'+m) × 255, (G'+m) × 255, (B'+m) × 255) (20) where P = V × S,
[0065] Finally, it should be noted that the above contents are only preferred embodiments of the present invention and are not intended to limit the scope of the present invention. The above embodiments have been described in detail for the present invention, but for technicians working in related fields, it is still possible to make appropriate adjustments to the technical solutions therein, or even to perform equivalent substitutions on certain technical features. As long as these adjustments, equivalent substitutions or further improvements still comply with the basic spirit and principles of the present invention, they should be included in the protection scope of the present invention.
Claims
1. A low-light image enhancement method based on brightness partitioning and tone mapping, characterized in that: include: Step 1: Convert the RGB image to HSV space and extract the brightness information ImageV, chroma information ImageH and saturation information ImageS respectively. Step 2: Use the particle swarm algorithm to segment the extracted image brightness information ImageV to obtain multiple sub-images with different brightness in different regions. Step 3: Use the improved tone mapping method to enhance the brightness information of the separated image according to the average brightness of each sub-image obtained by solving the problem, and then obtain ImageV i . Step 4: Use a parametric rationalized unsharp masking algorithm to process the extracted image brightness information ImageV, enhance the image detail texture information, and obtain ImagePRUM. Step 5: Take the multiple enhanced sub-images ImageV obtained in step 3 i , Gaussian and Laplace pyramid methods are used for multi-scale weighted fusion to obtain ImageV c . Step 6: ImageV c ImagePRUM is combined with the Gaussian and Laplace pyramid methods to obtain ImageV e Finally, the image ImageV e The chromaticity information ImageH and saturation information ImageS of the original image are converted to RGB space to obtain an image with appropriate brightness and rich details.
2. According to the low-illumination image enhancement method based on brightness partitioning and tone mapping described in claim 1, its main feature is that: in step 1, the RGB image is converted to the HSV space, and the brightness information ImageV, the chromaticity information ImageH and the saturation information ImageS are extracted respectively, so that the correlation between the three is reduced.
3. According to the low-light image enhancement method based on brightness partitioning and tone mapping described in claim 1, its main feature is that: in step 2, the particle swarm algorithm is used to search for the optimal segmentation threshold, and the moderate function designed based on the maximum entropy concept is used during the search. Then, the extracted image brightness information ImageV is subjected to multi-threshold image segmentation according to the optimal segmentation threshold obtained by the search. Finally, multiple sub-images with different brightness in different regions are obtained.
4. According to the low-light image enhancement method based on brightness partitioning and tone mapping of claim 1, the main feature is that: in step 3, an improved tone mapping method is used to enhance the brightness information of the separated image according to the brightness average value of each sub-image obtained by solving, and then ImageV is obtained. i .
5. According to the low-illumination image enhancement method based on brightness partitioning and tone mapping described in claim 1, its main feature is that: in step 4, a parameter rationalized unsharp masking algorithm is used to process the extracted image brightness information ImageV to enhance the detail texture information of the image and obtain ImagePRUM.
6. The low-light image enhancement method based on brightness partitioning and tone mapping according to claim 1, wherein: in step 5, the plurality of enhanced sub-images ImageV obtained in step 3 are i , Gaussian and Laplace pyramid methods are used for multi-scale weighted fusion to obtain ImageV c .
7. The low-light image enhancement method based on brightness partitioning and tone mapping according to claim 1 is mainly characterized in that: in step 6, the image ImageV obtained in step 5 is converted into c The image ImagePRUM obtained in step 4 is fused with multi-scale weighted fusion using Gaussian and Laplace pyramid methods to obtain ImageV e Finally, the image ImageV e The chromaticity information ImageH and saturation information ImageS of the original image are converted to RGB space to obtain an image with appropriate brightness and rich details.
Citation Information
Cited By
Method for identifying maintenance tools in shelter based on machine vision
CN120725946A