A digital image enhancement processing method

CN118840304BActive Publication Date: 2026-10-23JIANGSU UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410859233.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2026-10-23
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

[0003]本发明为了解决现有技术中存在的直方图均衡化中导致的过增强、伪影和亮度偏差过大的问题,提供一种数字图像增强处理方法

Benefits of technology

[0027]本发明方法以数字灰度图像直方图为基础,根据分割阈值将输入图像的直方图分割为三个子直方图,并对中间子直方图进行幂函数压缩与剪切,再将剪切的直方图按比例分配到三个子直方图中,最后对三个子直方图分别做均衡计算得到增强后图像;该方法可以有效提高图像对比度的同时大大降低过增强引起的画面发白现象,也可有效减少伪影,使得增强后图像变得自然清晰。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118840304B_ABST
    Figure CN118840304B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of digital image enhancement processing method, which is based on digital gray image histogram, according to the histogram of input image is divided into three sub-histograms according to segmentation threshold, and the middle sub-histogram is compressed and sheared by power function, then the sheared histogram is proportionally distributed to three sub-histograms, and finally the three sub-histograms are balanced respectively to obtain the enhanced image;This method can effectively improve the image contrast while greatly reducing the white phenomenon caused by over-enhancement, and can also effectively reduce artifacts, so that the enhanced image becomes natural and clear.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an adaptive digital image enhancement processing method, belonging to the field of digital image preprocessing technology. Background Technology

[0002] Histogram equalization is one of the most important techniques for enhancing the contrast of digital images. Although histogram equalization has many advantages such as fast processing speed and obvious enhancement effect, it still has some technical problems such as over-enhancement (overly bright image), unnatural artifacts, and excessive brightness deviation. For example, for an image in the gray range of [0 255], after enhancement by the histogram equalization algorithm, the image will exhibit over-enhancement, that is, bright pixels will become brighter after enhancement, and dark pixels will become darker. The basic characteristics of the image, such as the excessive deviation in average brightness, affect the visual effect of the enhanced image, thus limiting the application range of the histogram algorithm. Summary of the Invention

[0003] To address the problems of over-enhancement, artifacts, and excessive brightness deviation caused by histogram equalization in existing technologies, this invention provides a digital image enhancement processing method.

[0004] To achieve the above objectives, the technical solution proposed by this invention is: a digital image enhancement processing method, characterized by comprising the following steps:

[0005] Step 1: Construct a grayscale histogram array h(i) of the grayscale input digital image I, where h is the array name and i is the grayscale value;

[0006] Step 2: Sort the arrays in the grayscale histogram array where h(i)>0 according to the grayscale value i in ascending order and place them in array H(n), where n is the position value of array H(n);

[0007] Step 3: Calculate the first value A=H(1), the last value C=H(end), and the maximum value B=max(H(n)) in the array H(n); then find the gray level values ​​X0, Xd, and Xm corresponding to the values ​​A, B, and C in the gray level histogram array h(i);

[0008] Step 4: Calculate the length of array H(n), construct array N(n) = 1, 2, 3, ..., LH; calculate the mean H_mean and standard deviation H_sd of array H(n);

[0009] Step 5: Calculate the absolute value of the difference between array H(n) and standard deviation H_sd and put it into a new array H1(n). Find the index Yd of the maximum value B in the H(n) array.

[0010] Step 6: Find the minimum value YL and YU of array H(n) in the index position interval [1,Yd] and [Yd+1,LH]; Based on YL and YU, find the segmentation thresholds XL and XU in the gray level value interval [X0,Xd] and [Xd+1,Xm] corresponding to h(i);

[0011] Step 7: Calculate the transformation exponent r using XL and XU, and construct a grayscale histogram array using r.

[0012] ;

[0013] Step 8: Construct a new grayscale histogram array Hs(i) and assign the value of Hm(i) to Hs(i); calculate the total histogram value that has been clipped. Then, calculate the histogram values ​​NL, NM, and NR that Hs(i) needs to be assigned in the three gray level value intervals [X0,XL], [XL+1,XU], and [XU+1,Xm].

[0014] Step 9: Add NL, NM and NR to the histogram array of Hs(i) in the three gray level value intervals [X0,XL], [XL+1,XU] and [XU+1,Xm] respectively, and adjust the histogram.

[0015] Step 10: Perform histogram equalization on the Hs(i) histogram in the three gray level value intervals [X0,XL], [XL+1,XU] and [XU+1,Xm] respectively to obtain the new gray level value F(i) of the output image.

[0016] In step 4, the formula for calculating the mean of array H(n) is: .

[0017] In step 4, the formula for calculating the standard deviation of the array H(n) is as follows:

[0018] .

[0019] In step 7, the formula for calculating the transformation index is: .

[0020] In step 8, the formulas for calculating the histogram values ​​NL, NM, and NR are as follows:

[0021] .

[0022] In step 9, the formula for adjusting the histogram is:

[0023] .

[0024] In step 10, histogram equalization is performed, and the formula for obtaining the new grayscale values ​​of the output image is as follows:

[0025] .

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

[0027] This invention uses a digital grayscale image histogram as a basis. Based on a segmentation threshold, the histogram of the input image is divided into three sub-histograms. The middle sub-histogram is then compressed and clipped using a power function. The clipped histogram is then proportionally distributed among the three sub-histograms. Finally, equalization calculations are performed on each of the three sub-histograms to obtain the enhanced image. This method effectively improves image contrast while significantly reducing the whitening effect caused by over-enhancement. It also effectively reduces artifacts, resulting in a more natural and clear enhanced image. Attached Figure Description

[0028] Figure 1 This is a flowchart of the present invention;

[0029] Figure 2 A comparison image showing the processing of low-light images using the method of this invention;

[0030] Figure 3 A comparison image of a highlighted image processed using the method of the present invention;

[0031] Figure 4 This is a comparison image of a normal image processed using the method of the present invention. Detailed Implementation

[0032] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0033] Example

[0034] This embodiment combines the MATLAB programming language to implement an adaptive digital image enhancement processing method. The specific steps are as follows: Figure 1 As shown:

[0035] (1) Calculate the gray level histogram array h(i) of the gray level input image I, where h is the array name and i is the gray level value, 255≥i≥0.

[0036] (2) Sort the array of gray level histogram arrays with h(i)>0 in ascending order of gray level value i and put them into array H(n). Mathematical expression: H(n)=h(i), h(i)>0; where H is the array name, H(n) is the array of non-zero frequency values, n is the position value of array H(n), 1≤n≤256.

[0037] (3) Calculate the first value A=H(1), the last value C=H(end), and the maximum value B=max(H(n)) in the array H(n); then find the gray level values ​​X0, Xd, and Xm corresponding to A, B, and C in the gray level histogram array h(i). The MATLAB program language search description is: X0=find(h==A), Xd=find(h==B), Xm=find(h==C), where max() and find() are the maximum value calculation function and the search function in the MATLAB language, respectively.

[0038] (4) Calculate the length of array H(n) LH=length(H(n)), construct array N(n)=1,2,3,┅,LH; calculate the mean H_mean of array H(n), mathematical expression Calculate the standard deviation H_sd of the array H(n), using the mathematical expression. ,length is the MATLAB function for finding the length of an array, H′(n) is the transpose of array H(n), and N′(n) is the transpose of array N(n).

[0039] (5) Calculate the absolute value of the difference between array H(n) and standard deviation H_sd, and store it in a new array H1(n). Mathematical expression

[0040] At the same time, find the index position Yd of the maximum value B in the H(n) array, Yd=find(H==B).

[0041] (6) Find the minimum values ​​YL and YU in the array H(n) within the index position interval [1,Yd] and [Yd+1,LH]. The search program language description is YL=find(H1==min(H1(1:Yd))) and YU=find(H1==min(H1(Yd+1:LH))). Then, find the segmentation thresholds XL and XU in the gray level value interval [X0,Xd] and [Xd+1,Xm] corresponding to h(i). The search program language description is XL=find(h==H(YL)) and XU=find(h==H(YU)).

[0042] (7) Calculate the transformation exponent r, the expression is: Construct a grayscale histogram array Hm(i) using the following formula:

[0043] (8) Construct a new grayscale histogram array Hs(i) and assign the value of Hm(i) to Hs(i) (Hs(i) = Hm(i)); calculate the total histogram value h_total to be clipped, with the expression: Then, calculate the histogram values ​​NL, NM, and NR that Hs(i) needs to be assigned in the three gray-level value intervals [X0, XL], [XL+1, XU], and [XU+1, Xm]. The expression is:

[0044] ;

[0045] (9) Add NL, NM, and NR to the histogram array of Hs(i) in the three gray-level value intervals [X0, XL], [XL+1, XU], and [XU+1, Xm] respectively. The mathematical formula for histogram adjustment is:

[0046] ;

[0047] (10) Perform histogram equalization enhancement processing on the Hs(i) histogram in the three gray-level numerical intervals [X0,XL], [XL+1,XU], and [XU+1,Xm] respectively. The mathematical formula for the enhancement processing is:

[0048] ;

[0049] In the formula, F(i) is the new gray level value of the output image, which is the result of the final enhancement process in this embodiment.

[0050] like Figure 2 The image shown is a comparison of the effects of using the adaptive digital image enhancement processing method of this embodiment to enhance low-light images. The left side of the image is the original image, and the right side is the enhanced image. It can be clearly seen from the image that the details in the dark areas are effectively improved and the image is clearer, while avoiding the problem of brightness whitening.

[0051] like Figure 3 The image shown is a comparison of the effects of image enhancement processing on a bright image using the method of this embodiment. The left side of the image is the original image, and the right side is the enhanced image. It can be clearly seen from the image that the originally blurry and white areas of the bright image have become clearer and the contrast is sharper.

[0052] like Figure 4 The image shown is a comparison of the effects of image enhancement processing on a normal image using the method of this embodiment. The left side of the image is the original image, and the right side is the enhanced image. It can be clearly seen from the image that the contrast between light and dark is more obvious after enhancement, and the image is clearer.

[0053] The technical solutions of the present invention are not limited to the above embodiments. All technical solutions obtained by equivalent substitution fall within the scope of protection claimed by the present invention.

Claims

1. A digital image enhancement processing method, characterized in that: Includes the following steps: Step 1: Construct a grayscale histogram array h(i) of the grayscale input digital image I, where h is the array name and i is the grayscale value; Step 2: Sort the arrays in the grayscale histogram array where h(i)>0 according to the grayscale value i in ascending order and place them in array H(n), where n is the position value of array H(n); Step 3: Calculate the first value A=H(1), the last value C=H(end), and the maximum value B=max(H(n)) in the array H(n); then find the gray level values ​​X0, Xd, and Xm corresponding to the values ​​A, B, and C in the gray level histogram array h(i); Step 4: Calculate the length of array H(n), construct array N(n) = 1, 2, 3, ..., LH; calculate the mean H_mean and standard deviation H_sd of array H(n); Step 5: Calculate the absolute value of the difference between array H(n) and standard deviation H_sd and put it into a new array H1(n). Find the index Yd of the maximum value B in the H(n) array. Step 6: Find the minimum value YL and YU of array H(n) in the index position interval [1,Yd] and [Yd+1,LH]; Based on YL and YU, find the segmentation thresholds XL and XU in the gray level value interval [X0,Xd] and [Xd+1,Xm] corresponding to h(i); Step 7: Calculate the transformation exponent r using XL and XU. The formula for the transformation exponent is: And use r to construct a grayscale histogram array. ; Step 8: Construct a new grayscale histogram array Hs(i) and assign the value of Hm(i) to Hs(i); calculate the total histogram value that has been clipped. Then, calculate the histogram values ​​NL, NM, and NR that Hs(i) needs to be allocated in the three gray-level value intervals [X0, XL], [XL+1, XU], and [XU+1, Xm]. The formulas for calculating the histogram values ​​NL, NM, and NR are as follows: ; Step 9: Add NL, NM, and NR to the histogram arrays of Hs(i) in the three gray-level value intervals [X0, XL], [XL+1, XU], and [XU+1, Xm] respectively, and adjust the histograms using the following formula: ; Step 10: Perform histogram equalization on the Hs(i) histogram in the three gray-level value intervals [X0,XL], [XL+1,XU], and [XU+1,Xm] respectively to obtain the new gray-level values ​​F(i) of the output image. The equalization formula is: 。 2. The digital image enhancement processing method according to claim 1, characterized in that: In step 4, the formula for calculating the mean of array H(n) is: .

3. The digital image enhancement processing method according to claim 2, characterized in that: In step 4, the formula for calculating the standard deviation of the array H(n) is as follows: .

Citation Information

Patent Citations

  • Image enhancement method implemented through histogram equalization

    CN102930517A

  • Histogram local image contrast enhancing method and histogram local image contrast enhancing device

    CN104299204A