Image enhancement method based on multi-level contrast and dark detail optimization

Through an image enhancement method based on multi-level contrast and dark detail optimization, the problems of low contrast, high noise and unclear details in infrared images are solved, and the details and contrast of the image are significantly improved, and noise amplification is suppressed.

CN120219268APending Publication Date: 2025-06-27NANJING UNIV OF SCI & TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510281848.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

Infrared images are prone to problems such as low contrast, high noise and unclear details during the acquisition process. Especially in long-distance detection or low-temperature differences, it is difficult to clearly distinguish the target and the background.

Method used

Using an image enhancement method based on multi-level contrast and dark detail optimization, images are collected and segmented into sub-blocks by infrared cameras, grayscale histograms are counted and reassigned, and grayscale mapping function is calculated to adjust grayscale values. The base layer and detail layer are then combined to generate enhanced images by dynamically adjusting the gamma values ​​and using guide filtering and L0 norm smoothing techniques through nonlinear adjustment and multi-scale convolution operations.

Benefits of technology

It significantly improves the distinction between the target and the background and visual hierarchy, enhances the edge characteristics of the image, and effectively suppresses image noise and improves the details and contrast of infrared images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219268A_ABST
    Figure CN120219268A_ABST
Patent Text Reader

Abstract

The invention discloses an image enhancement method based on multi-level contrast and dark detail optimization. The method comprises the following steps: carrying out local gray level distribution adjustment on an infrared image; afterwards, dark part details are enhanced through a nonlinear adjustment function, and Gaussian kernels of different scales are adopted to perform multi-scale convolution operation, so that the brightness and detail performance of a dark part region are improved; calculating the global brightness distribution characteristic of the image, and dynamically adjusting the gamma value to change the gray value distribution curve of the image, thereby achieving the comprehensive optimization of the brightness and contrast of the image. And finally, guiding filtering and L0 detail filtering technologies are combined, so that the noise influence is effectively reduced, and meanwhile, the edge features are enhanced. According to the method, noise reduction and edge feature enhancement are carried out on the image based on block histogram equalization, dark region enhancement, adaptive gamma correction, guide filtering and L0 detail filtering, the definition and texture expression of the image are improved, and more reliable visual information support is provided for subsequent infrared target detection and recognition tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of infrared image processing, and particularly relates to an image enhancement method based on multi-level contrast and dark part detail optimization. Background Art

[0002] Infrared imaging systems image based on the infrared radiation of objects themselves. Due to factors such as the intensity distribution and wavelength range of infrared radiation, the acquired images often have problems such as low contrast, high noise, and unclear details. For example, in long-distance detection or low-temperature difference scenarios, the infrared radiation difference between the target and the background is small, resulting in the target in the image being difficult to clearly distinguish.

[0003] When infrared signals are transmitted in the atmosphere, they are affected by effects such as atmospheric scattering and absorption. Especially in bad weather conditions such as fog, rain, and snow, the quality of infrared images will significantly decline, which requires image enhancement algorithms to compensate for the information loss caused by atmospheric transmission. Summary of the Invention

[0004] The purpose of the present invention is to provide an image enhancement method based on multi-level contrast and dark part detail optimization, which has good imaging effects in both uniform target scenarios and complex scenarios with many details. It not only effectively improves the distinguishability and visual hierarchy between the target and the background, enhances the image edge features, but also can effectively suppress image noise.

[0005] The technical solution to achieve the purpose of the present invention is: an image enhancement method based on multi-level contrast and dark part detail optimization, and the specific steps are as follows:

[0006] S1. Collect images through an infrared camera, divide the above images into equal-sized sub-blocks, statistically calculate the gray-level histograms of each sub-block and re-distribute them, calculate the gray-level mapping function to adjust the gray-level values; perform weighted averaging on the pixels in the boundary area to obtain the first-processed image I1.

[0007] S2. Normalize the first-processed image I1 to the [0,1] interval, and enhance the dark part details through non-linear adjustment; perform multi-scale convolution operations using Gaussian kernels of different scales, and fuse the multi-scale results of the image to obtain the second-processed image I2.

[0008] S3. Calculate the global brightness distribution characteristics of the second-processed image I2, dynamically adjust the gamma value to achieve non-linear mapping of the gray-level values, change the gray-level value distribution curve of the image, so as to achieve the comprehensive optimization of the image brightness and contrast, and obtain the third-processed image I3.

[0009] S4. Decompose the triple-processed image I3 into a base layer q(x) and a detail layer detail. Extract the base layer using guided filtering. The detail layer is adaptively enhanced to increase the contrast of image textures and details. The L0 norm smoothing method is used to effectively suppress the amplification of noise, obtaining an enhanced detail layer S. Combine the base layer q(x) and the enhanced detail layer S to form the output image I'.

[0010] Compared with the prior art, the present invention has the following remarkable advantages:

[0011] (1) For the pixels in the sub-block boundary region, the mapping results of adjacent sub-blocks are used for weighted averaging to ensure natural transitions of dark details at the boundaries, better avoiding blocking effects and enhancing the visual effect. By comprehensively applying various technologies to optimize the image from local to global, the details and contrast of the infrared image are significantly improved, and it has stronger applicability than a single algorithm.

[0012] (2) In the enhancement of the dark region of the image, by balancing the adjustment of the bright region, the loss of bright details is avoided. While enhancing the dark details, combined with guided filtering and L0 norm smoothing technologies, the problem of noise amplification commonly found in traditional enhancement methods is effectively suppressed while enhancing the details. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a block diagram for implementing an image enhancement method based on multi-level contrast and dark detail optimization according to the present invention.

[0014] Figure 2 It is a comparison diagram of processed images of the infrared camera shooting scene in Embodiment 1 of the present invention, where (a) is the original image captured by the camera, (b) is the processing effect diagram of contrast-limited adaptive histogram equalization (CLAHE), and (c) is the processing effect diagram of the algorithm of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0015] The present invention will be further described in detail below with reference to the drawings.

[0016] Combined with Figure 1 , an image enhancement method based on multi-level contrast and dark detail optimization, the steps are as follows:

[0017] S1. Collect an image through an infrared camera, divide the above image into equal-sized sub-blocks, statistically calculate the gray histogram for each sub-block and redistribute it, calculate the gray mapping function to adjust the gray value; perform weighted averaging on the pixels in the boundary region to obtain a once-processed image I1, specifically as follows:

[0018] S1.1. Divide the image into blocks. First, determine whether the input image can be divided into sub-blocks of equal size. If it can, directly divide it and then go to S1.2; if it cannot be divided into integer blocks of equal size, first fill the image to a size that can be evenly cut, and then go to S1.2.

[0019] S1.2. Statistically calculate the gray-level histogram for each sub-block, that is, calculate the frequency of occurrence of pixel gray-level values in each sub-block. The formula is as follows:

[0020]

[0021] Among them, n k (x, y) is the number of pixels with gray level k in the (x, y) sub-block; N represents the total number of pixels in each sub-image block; H k (x, y) is the frequency of occurrence of pixels with gray level k; the gray level range of k is [0, L]; L represents the maximum gray level for processing the image I1 at one time; go to S1.3.

[0022] S1.3. Re-distribute the sub-block gray-level histogram. To avoid over-enhancement of the local scene by the histogram equalization algorithm, when statistically calculating the histogram of each sub-block, a platform threshold truncation will be performed to cut the gray-level frequencies that are too high in the histogram, preventing the noise from being overly highlighted when the contrast is overly amplified. Then go to S1.4.

[0023] S1.4. Calculate the gray-level value mapping function according to the clipped histogram, and map the input gray-level value to a new range. The gray-level mapping function for each sub-block is as follows:

[0024]

[0025] Among them, G represents the maximum gray level of the output image after histogram equalization; F k (x, y) is the mapping function for gray level k in the (x, y) sub-image block, and then go to S1.5.

[0026] S1.5. To prevent the generation of block effects, perform weighted averaging on the mapping results of adjacent sub-blocks to obtain the image I1 processed at one time, ensuring that the image I1 processed at one time has a smooth transition, and then go to S2.

[0027] S2. Normalize the image I1 processed at one time to the interval [0, 1], and enhance the dark details through non-linear adjustment; perform multi-scale convolution operations using Gaussian kernels of different scales, and fuse the multi-scale results of the image to obtain the image I2 processed at the second time, specifically as follows:

[0028] In S2, normalize the image I1 processed at one time to the interval [0, 1], and enhance the dark details through non-linear adjustment. The formula is as follows:

[0029]

[0030] Among them, I n represents the image after the adjustment of the dark pixels; is used to enhance the dark details, and (1 - I1)·0.5 is used to adjust the balance of the bright area, which is used to increase the overall brightness; the weighted average in the formula ensures that the brightness distribution of the adjusted image is more natural.

[0031] In S2, to enhance the local contrast of the image, multi-scale convolution operations are performed using Gaussian kernels of different scales. The specific steps are as follows:

[0032] 1) Calculate the Gaussian kernel. The formula is as follows:

[0033]

[0034] where σ is the standard deviation, which is used to control the scale size of the Gaussian kernel; G i represents Gaussian kernels of different scales.

[0035] 2) Calculate Gaussian kernels of different scale sizes; convolve the image I1 with Gaussian kernels of different standard deviations σ respectively to enhance the brightness and detail performance of the dark area:

[0036] Guass i = I1 * G i

[0037] where * represents the convolution operation, and Guass i represents the result obtained after Gaussian convolution; the scale serial number i = 1, 2, 3.

[0038] 3) According to the Gaussian convolution result, calculate the local enhancement factor for each scale:

[0039]

[0040] where r i represents the local enhancement factor of different scales.

[0041] 4) Combine the local enhancement factor r i , and perform multi-scale enhancement on the adjusted image I n to obtain enhanced images R i of different scales:

[0042]

[0043] In S2, perform weighted average on the enhancement results R1, R2, and R3 of different scales to obtain the final fusion result, that is, the secondary processed image I2, as follows:

[0044]

[0045] Among them, R1 represents the enhanced image corresponding to σ = 5; R2 represents the enhanced image corresponding to σ = 20; R3 represents the enhanced image corresponding to σ = 240, and proceed to S3.

[0046] S3. Calculate the global brightness distribution characteristics of the secondary processed image I2, dynamically adjust the gamma value to achieve non-linear mapping of gray values, change the gray value distribution curve of the image, so as to realize the comprehensive optimization of image brightness and contrast, and obtain the tertiary processed image I3, specifically as follows:

[0047] Calculate the global brightness distribution characteristics of the secondary processed image I2. The formula for the tertiary processed image I3 is as follows:

[0048]

[0049] Among them, the γ value represents the parameter for adjusting the brightness distribution; when γ > 1, the dark details are stretched; when γ < 1, the bright area is compressed; change the gray value distribution curve of the image to achieve non-linear adjustment of brightness, and proceed to S4.

[0050] S4. Decompose the tertiary processed image I3 into a base layer q(x) and a detail layer detail. Use guided filtering to extract the base layer. The detail layer is adaptively enhanced to improve the contrast of image texture and details, and use the L0 norm smoothing method to effectively suppress the problem of noise amplification, while enhancing the edge features, and obtain the enhanced detail layer S; merge the base layer q(x) and the enhanced detail layer S into the output image I', specifically as follows:

[0051] In S4, decompose the tertiary processed image I3 into a base layer q(x) and a detail layer detail. Guided filtering uses a local linear model to filter the image, extract the image base layer, and retain edge information while smoothing the image:

[0052] q(x) = a(x)·I3 + b(x)

[0053] Among them, q(x) represents the image base layer; both a(x) and b(x) are local linear coefficients.

[0054] In S4, the detail layer is obtained by the difference between the original image and the base layer, and contains the high-frequency information of the image, that is, texture and edges. The specific formula is as follows:

[0055] detail = I3 - q(x)

[0056] Among them, detail represents the detail layer of the tertiary processed image I3.

[0057] In S4, the adaptive enhancement of the detail layer enhances the details by a multiplication factor, amplifying the detail contrast of the image to make the texture more prominent. The expression is as follows:

[0058] detail' = K · detail

[0059] where detail' represents the enhanced detail layer; K represents the multiplication factor, which is a constant;

[0060] To suppress the regions with small gradient magnitudes, avoid the noise amplification caused by detail enhancement, and achieve edge preservation and smoothing optimization, the L0 norm smoothing technique is used:

[0061]

[0062] where represents the L0 norm of the gradient, ensuring sharp edges; λ controls the smoothing degree, and S represents the smoothed detail layer; represents the square of the L2 norm.

[0063] In S4, the processed detail layer is merged with the base layer to obtain the final processed output image I'. The formula is as follows:

[0064] I′ = q(x) + S

[0065] Example 1

[0066] The infrared image is taken in the morning by an in-vehicle infrared camera. The street and road are photographed from inside the vehicle. Its size is 640×512. The image is input into this algorithm module for processing. Figure 2 (a) in [reference] is the original image, whose background and detail contrast is not high. The output images obtained by using CLAHE and this algorithm are as shown in Figure 2 (b) in [reference] and Figure 2 (c) in [reference]. The detail restoration effects of key regions such as trees, background, and traffic lights are all quite significant. However, CLAHE is prone to introducing artifacts caused by texture enhancement. This algorithm has greater advantages, with higher contrast and more uniform overall image brightness, ensuring the uniformity of the output image.

Claims

1. An image enhancement method based on multi-level contrast and dark detail optimization, characterized in that: The steps are as follows: S1, collect images through infrared cameras, divide the above images into sub-blocks of equal size, count the grayscale histogram of each sub-block and redistribute them, calculate the grayscale mapping function to adjust the grayscale value; perform weighted averaging on the pixels in the boundary area to obtain a processed image I1; S2, normalize the first processed image I1 to the interval [0,1], and enhance the dark details through nonlinear adjustment; use Gaussian kernels of different scales to perform multi-scale convolution operations, and fuse the multi-scale results of the image to obtain the second processed image I2; S3, calculating the global brightness distribution characteristics of the secondary processed image I2, dynamically adjusting the gamma value to achieve nonlinear mapping of gray values, changing the image gray value distribution curve, thereby achieving comprehensive optimization of image brightness and contrast, and obtaining a tertiary processed image I3; S4, decompose the three-time processed image I3 into a base layer q(x) and a detail layer detail, extract the base layer by guided filtering, and enhance the detail layer by adaptively improving the contrast of image texture and details. Use the L0 norm smoothing method to effectively suppress the noise amplification problem, and obtain the enhanced detail layer S; merge the base layer q(x) and the enhanced detail layer S into the output image I'.

2. The image enhancement method based on multi-level contrast and dark detail optimization according to claim 1, characterized in that: In S1, an infrared camera is used to collect images, and the above images are divided into sub-blocks of equal size. The grayscale histogram of each sub-block is counted and redistributed, and the grayscale mapping function is calculated to adjust the grayscale value; the pixels in the boundary area are weighted averaged to obtain a processed image I1, as follows: S1.1, divide the image into blocks. First, determine whether the input image can be divided into equal-sized sub-blocks. If so, directly divide it and then proceed to S1.

2. If it cannot be divided into equal-sized integer blocks, first fill the image to a size that can be evenly divided, and then proceed to S1.

2. S1.

2. Count the grayscale histogram of each sub-block, that is, count the frequency of occurrence of the pixel grayscale value in each sub-block. The formula is as follows: Among them, n k (x, y) is the number of pixels with gray level k in the (x, y)th sub-block; N is the total number of pixels in each sub-block; H k (x, y) is the frequency of occurrence of pixels with gray level k; the gray level range of k is [0, L]; L represents the maximum gray level of the image I1 processed at one time; go to S1.3; S1.3, redistribute the grayscale histogram of the sub-blocks. In order to prevent the histogram equalization algorithm from being over-enhanced in the local scene, the platform threshold is truncated when the histogram of each sub-block is counted, and the grayscale frequency with too high frequency in the histogram is cut off and transferred to S1.4; S1.

4. Calculate the grayscale value mapping function based on the clipped histogram to map the input grayscale value to a new range. The grayscale mapping function of each sub-block is as follows: Where G represents the maximum grayscale level of the output image after histogram equalization; F k (x, y) is the mapping function of the gray level k in the (x, y)th sub-block, transferred to S1.5; S1.

5. In order to prevent the occurrence of blocking effects, the mapping results of adjacent sub-blocks are weighted averaged to obtain a processed image I1.

3. The image enhancement method based on multi-level contrast and dark detail optimization according to claim 1, characterized in that: In S2, the processed image I1 is normalized to the interval [0,1], and the dark details are enhanced through nonlinear adjustment. The formula is as follows: Among them, I n Indicates the image after dark pixels are adjusted; It is used to enhance the dark details, (1-I1)·0.5 is used to adjust the balance of the bright area, Used to increase the overall brightness; the weighted average in the formula ensures that the brightness distribution of the adjusted image is more natural.

4. The image enhancement method based on multi-level contrast and dark detail optimization according to claim 1, characterized in that: In S2, in order to enhance the local contrast of the image, Gaussian kernels of different scales are used to perform multi-scale convolution operations. The specific steps are as follows: 1) Calculate the Gaussian kernel, the formula is as follows: Where σ is the standard deviation, which is used to control the scale of the Gaussian kernel; G i represents Gaussian kernels of different scales; 2) Calculate Gaussian kernels of different scales; use Gaussian kernels with different standard deviations σ to perform convolution operations on image I1: Guass i =I1*G i Where * represents convolution operation, Guass i Represents the result obtained after Gaussian convolution; scale number i = 1, 2, 3; 3) According to the Gaussian convolution results, calculate the local enhancement factor of each scale: where r i Represents local enhancement factors at different scales; 4) Combined with the local enhancement factor r i , for the adjusted image I n Perform multi-scale enhancement to obtain enhanced images R of different scales i :

5. The image enhancement method based on multi-level contrast and dark detail optimization according to claim 1, characterized in that: In S2, the weighted average of the enhancement results R1, R2, and R3 of different scales is performed to obtain the final fusion result, that is, the secondary processed image I2: Among them, R1 represents the enhanced image corresponding to σ=5; R2 represents the enhanced image corresponding to σ=20; R3 represents the enhanced image corresponding to σ=240.

6. The image enhancement method based on multi-level contrast and dark detail optimization according to claim 1, characterized in that: In S3, the global brightness distribution characteristics of the secondary processed image I2 are calculated, the gamma value is dynamically adjusted to achieve nonlinear mapping of gray values, and the image gray value distribution curve is changed, thereby achieving comprehensive optimization of image brightness and contrast, and obtaining the tertiary processed image I3, as follows: The global brightness distribution characteristics of the secondary processed image I2 and the tertiary processed image I3 are calculated as follows: Among them, the γ value represents the parameter for adjusting the brightness distribution; when γ>1, the dark details are stretched; when γ<1, the bright area is compressed; changing the image gray value distribution curve can achieve nonlinear adjustment of brightness.

7. The image enhancement method based on multi-level contrast and dark detail optimization according to claim 1, characterized in that: In S4, the three-time processed image I3 is decomposed into a base layer q(x) and a detail layer detail. The guided filter uses a local linear model to filter the image, extract the image base layer, and smooth the image while retaining the edge information: q(x)=a(x)·I3+b(x) Where q(x) represents the image base layer; a(x) and b(x) are local linear coefficients.

8. The image enhancement method based on multi-level contrast and dark detail optimization according to claim 1, characterized in that: In S4, the detail layer is obtained by the difference between the original image and the base layer, which contains the high-frequency information of the image, namely texture and edge. The specific formula is as follows: detail=I3-q(x) Where detail represents the detail layer of the three-time processed image I3.

9. The image enhancement method based on multi-level contrast and dark detail optimization according to claim 1, characterized in that: In S4, the adaptive enhancement of the detail layer is to enhance the details by a multiplication factor, amplify the image detail contrast, and make the texture more prominent. The expression is as follows: detail'=K·detail Where detail' represents the enhanced detail layer; K represents the multiplication factor, which is a constant; In order to avoid noise amplification caused by detail enhancement and achieve edge preservation and smoothing optimization, the L0 norm smoothing technology is used: in represents the L0 norm of the gradient to ensure sharp edges; λ controls the degree of smoothness, and S represents the smoothed detail layer; Represents the square of the L2 norm.

10. The image enhancement method based on multi-level contrast and dark detail optimization according to claim 1, characterized in that: In S4, the processed detail layer is merged with the base layer to obtain the processed final output image, and the formula is as follows: I'=q(x)+S Wherein, I' represents the final output image after enhancement.

Citation Information

Cited By

  • Image brightness adjusting method based on specified histogram and electronic equipment

    CN120725940A

  • An image brightness adjustment method and electronic device based on a defined histogram

    CN120725940B

  • Scene filtering enhancement method and device under sky background based on thermal imaging and medium

    CN121563782A