An Adaptive Remote Sensing Image Enhancement Method Based on Gray Gradient Histogram Equalization
Through the adaptive grayscale gradient histogram equalization processing method, considering the gradient information in different directions of the remote sensing image, the problem of insufficient contrast and brightness improvement of the medium and medium grayscale areas in the prior art is solved, and the global contrast improvement and local details of the remote sensing image are achieved.
Patent Information
- Application Number
- CN202111355703.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-16
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2041-11-16
AI Technical Summary
The prior art is difficult to effectively improve the contrast and brightness of low and medium grayscale areas in remote sensing image enhancement, and there are limitations, only the gradient information in the horizontal and vertical directions is considered, resulting in the loss of local details.
Through the adaptive grayscale gradient histogram equalization processing method, considering the gradient information in different directions of the remote sensing image, including gradient information in 0°, 90°, 45° and 135°, a grayscale gradient histogram is constructed and equalized to ensure that local details are not lost.
The global contrast improvement of remote sensing images and rich local details are achieved, the parameters are manually set, and the image reconstruction can be adaptively completed, with significant enhancement effect.
Smart Images

Figure CN114049283B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image enhancement, and particularly to a method for enhancing remote sensing images through grayscale gradient histogram equalization processing. Background Art
[0002] Image enhancement is to improve the contrast between the target and the background in the image and the image clarity through various mathematical methods and transformation algorithms, so as to highlight the parts that are of interest to people or other receiving systems. Remote sensing image enhancement is to improve the contrast and clarity of a certain grayscale area, thereby increasing the information content displayed in the image and making the image more conducive to human eye resolution.
[0003] The methods of image enhancement are mainly divided into two categories: spatial domain method and frequency domain method. The spatial domain method mainly processes the grayscale coefficients of the image directly in the spatial domain. The frequency domain method is to correct the transform coefficient values of the image in a certain transform domain of the image, and then obtain the enhanced image through inverse transform. The histogram equalization method belongs to the histogram correction method of single-point enhancement in the spatial domain.
[0004] The literature "Adaptive Inverse Histogram Enhancement Technology for Infrared Images" proposes to enhance the image through reverse statistics, adaptive threshold selection, and segmented mapping. The contrast and brightness of the high grayscale area are effectively improved, but the contrast and brightness of the low and medium grayscale areas are not improved. The literature "An Image Detail Enhancement Method Based on Histogram Equalization Interpolation" proposes to insert a certain grayscale at the position where the adjacent grayscale interval values of the histogram in the traditional histogram equalization decrease from large to small to form a new histogram, which retains the image details but has poor contrast improvement.
[0005] The patent document "A Remote Sensing Image Enhancement Method Combining Gradient and Grayscale Information" with publication number CN109345491A proposes to achieve the adaptive enhancement of remote sensing images through gradient grayscale joint histogram transformation and gradient detail compensation, but only considers the gradient information in the horizontal and vertical directions, which has certain limitations. The patent document "An Image Gradient Field Bivariate Equalization Algorithm Based on Histogram Probability Correction" with publication number CN111311525A proposes to divide the gradient histogram into the edge and non-edge parts of the image, and then equalize the two parts respectively, which may have misclassification of the edge and non-edge parts of the gradient histogram. The patent document "An Infrared Image Enhancement Method Based on Texture-Weighted Histogram Equalization" with publication number CN110827229A proposes to perform non-linear transformation on the histogram of the statistical region where the pixel points with local extreme value differences greater than or equal to the preset difference threshold are located, and then perform equalization processing on the transformed histogram, which is not applicable to remote sensing images. Summary of the Invention
[0006] An adaptive gray-scale gradient histogram equalization remote sensing image enhancement method provided by the present invention takes into account the gradient information in different directions of the remote sensing image, avoids the loss of local details, enhances the richness of image details, does not require manual parameter setting, and can adaptively complete the entire image reconstruction process.
[0007] To achieve the above object, the present invention provides an adaptive gray-scale gradient histogram equalization remote sensing image enhancement method, which includes the following steps:
[0008] S1, convert the input remote sensing image into a grayscale image G;
[0009] S2, calculate the average grayscale image G within the 8-neighborhood range aver :
[0010]
[0011] wherein, G aver (x, y) represents the average grayscale value of the pixel point (x, y) within the 8-neighborhood range;
[0012] S3, calculate the gradient of the pixel point G(x, y) in the 0° and 90° directions and the gradient in the 45° and 135° directions
[0013]
[0014]
[0015] wherein, G x (x, y) represents the gradient value of the pixel point (x, y) in the 0° direction, G y (x, y) represents the gradient value of the pixel point (x, y) in the 90° direction, G u (x, y) represents the gradient value of the pixel point (x, y) in the 45° direction, G v (x, y) represents the gradient value of the pixel point (x, y) in the 135° direction;
[0016] S4, establish a histogram H according to the gray level of the grayscale image G and the gray-scale gradients in the 0° and 90° directions : xy :
[0017]
[0018]
[0019] wherein, the number of gray levels of the grayscale image G is L, and φ(m, n) when the gray value G(x, y) is the same and the gray-scale gradient It is a binary function that is 1 when they are the same and 0 in other cases;
[0020] S5. Based on the gray level of the grayscale image G and the gray gradients in the 45° and 135° directions Establish a histogram H uv :
[0021]
[0022]
[0023] Among them, the number of gray levels of the grayscale image G is L, and φ(m, n) is 1 when the gray values G(x, y) are the same and the gray gradients are the same, and 0 in other cases. It is a binary function;
[0024] S6. Normalize the gray gradient histograms H xy 、H uv :
[0025]
[0026]
[0027] Among them, S is the size of the image, and H xy (m, n) is the frequency of occurrence when the gray value G(x, y) = m and the gradients in the 0° and 90° directions are the same, and H uv (m, n) is the frequency of occurrence when the gray value G(x, y) = m and the gradients in the 45° and 135° directions are the same;
[0028] S7. Perform equalization processing on the normalized gray gradient histogram:
[0029]
[0030]
[0031] Among them, P xy (m, n) and P uv (m, n) are the normalization functions of the gray gradient histograms H xy 、H uv respectively. G1 is the enhanced image obtained after histogram equalization processing based on the histogram containing gray information and 0° and 90° gradient information, and G2 is the enhanced image obtained after histogram equalization processing based on the histogram containing gray information and 45° and 135° gradient information;
[0032] S8. Compare the enhanced images G1, G2 with G aver :
[0033] λ(x, y) = G1(x, y) - G2(x, y)
[0034] λ1(x, y) = G1(x, y) - G aver (x, y)
[0035] λ2(x, y) = G2(x, y) - G aver (x, y)
[0036] where λ(x, y), λ1(x, y), and λ2(x, y) respectively represent the data differences between G1 and G2, G1 and G aver , G2 and G aver ;
[0037] S9. Calculate the coefficient of variation of λ(x, y), λ1(x, y), and λ2(x, y):
[0038]
[0039]
[0040]
[0041] where μ(x, y), μ1(x, y), and μ2(x, y) represent the means of λ(x, y), λ1(x, y), and λ2(x, y) within the 8-neighborhood range, and σ(x, y), σ1(x, y), and σ2(x, y) represent the standard deviations of λ(x, y), λ1(x, y), and λ2(x, y) within the 8-neighborhood range;
[0042] S10. According to the coefficient of variation c.v(x, y), mark the pixel positions with large data differences between the two enhanced images G1 and G2:
[0043]
[0044] where, when c.v(x, y) ≤ 15%, the data of G1 and G2 are close and the change is small;
[0045] S11. According to the coefficients of variation c.v1(x, y) and c.v2(x, y), mark the pixel positions with the largest data differences between the two enhanced images G1 and G2 and the relative average gray-level image G aver ;
[0046]
[0047] where, when Z(x, y) = 1, the gradient difference of the pixel point (x, y) in the 0° and 90° directions is greater than that in the 45° and 135° directions, and vice versa;
[0048] S12, obtain the finally enhanced image:
[0049]
[0050] Among them, by judging the change trend of the gradients in different directions of each pixel point, the finally enhanced image is obtained.
[0051] Compared with the prior art, the present invention has the following advantages:
[0052] On the basis of enhancing the global contrast of the remote sensing image, the present invention combines the gray level and the gradient information in four directions of 0°, 90°, 45°, and 135°, ensuring that local details are not lost, making the local details of the remote sensing image rich and the enhancement effect obvious. At the same time, all the parameters involved in the implementation process of the present invention are calculated according to the characteristics of the image itself, without the need for manual parameter setting, and the entire image reconstruction process can be completed adaptively. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 is a flowchart of the adaptive gray-gradient histogram equalization remote sensing image enhancement method according to the present invention;
[0054] Figure 2 is the grayscale image of the original remote sensing image;
[0055] Figure 3 are the gray-gradient histograms in the directions of 0° and 90°;
[0056] Figure 4 are the gray-gradient histograms in the directions of 45° and 135°;
[0057] Figure 5 is the enhanced remote sensing image. DETAILED DESCRIPTION OF THE INVENTION
[0058] According to Figures 1 to 5 , the preferred embodiments of the present invention will be specifically described.
[0059] As Figure 1 shown, the present invention provides an adaptive gray-gradient histogram equalization remote sensing image enhancement method, including:
[0060] Step S1, convert the input remote sensing image into a grayscale image G, as Figure 2 shown;
[0061] Step S2, calculate the average grayscale image G aver within the 8-neighborhood range, as shown in the following formula:
[0062]
[0063] Among them, i = -1, 0, 1 and j = -1, 0, 1 represent 8 pixel points within the neighborhood range of the selected pixel point (x, y), and G aver (x, y) represents the average gray value of the pixel point (x, y) within the 8-neighborhood range;
[0064] Step S3, calculate the gradients of the pixel point G(x, y) in the 0° and 90° directions and the gradients in the 45° and 135° directions
[0065]
[0066]
[0067] Among them, G x (x, y) represents the gradient value of the pixel point (x, y) in the 0° direction, and G y (x, y) represents the gradient value of the pixel point (x, y) in the 90° direction, and G u (x, y) represents the gradient value of the pixel point (x, y) in the 45° direction, and G v (x, y) represents the gradient value of the pixel point (x, y) in the 135° direction;
[0068] Step S4, establish a histogram H according to the gray level of the gray image G and the gray gradients in the 0° and 90° directions xy , as Figure 3 shown:
[0069]
[0070]
[0071] Among them, the number of gray levels of the gray image G is L, and φ(m, n) is a binary function. When the gray value G(x, y) is the same and the gray gradient is the same, φ(m, n) is 1, and in other cases φ(m, n) is 0;
[0072] Establish a histogram H according to the gray level of the gray image G and the gray gradients in the 45° and 135° directions uv , as Figure 4 shown:
[0073]
[0074]
[0075] Among them, the number of gray levels of the grayscale image G is L, and φ(m,n) is a binary function. When the gray values G(x,y) are the same and the gray gradients are the same, φ(m,n) is 1; otherwise, φ(m,n) is 0.
[0076] Step S5: Normalize the gray gradient histograms H xy and H uv as shown in the following formula:
[0077]
[0078]
[0079] where S is the size of the image, and H xy (m,n) is the frequency of occurrence when the gray value G(x,y) = m and the gradients in the 0° and 90° directions appear, and H uv (m,n) is the frequency of occurrence when the gray value G(x,y) = m and the gradients in the 45° and 135° directions appear;
[0080] Step S6: Perform equalization processing on the normalized gray gradient histograms:
[0081]
[0082]
[0083] where P xy (m,n) and P uv (m,n) are the normalization functions of the gray gradient histograms H xy and H uv respectively. G1 is the enhanced image obtained after histogram equalization processing based on the histogram containing gray information and 0° and 90° gradient information, and G2 is the enhanced image obtained after histogram equalization processing based on the histogram containing gray information and 45° and 135° gradient information;
[0084] Step S7: Compare the enhanced images G1 and G2 with G aver :
[0085] λ(x,y) = G1(x,y) - G2(x,y)
[0086] λ1(x,y) = G1(x,y) - G aver (x,y)
[0087] λ2(x,y) = G2(x,y) - G aver (x,y)
[0088] where λ(x, y), λ1(x, y), and λ2(x, y) respectively represent the data differences between G1 and G2, G1 and G aver , G2 and G aver ;
[0089] Step S8, calculate the coefficient of variation of λ(x, y), λ1(x, y), and λ2(x, y):
[0090]
[0091]
[0092]
[0093] where μ(x, y), μ1(x, y), and μ2(x, y) represent the means of λ(x, y), λ1(x, y), and λ2(x, y) within the 8-neighborhood range, and σ(x, y), σ1(x, y), and σ2(x, y) represent the standard deviations of λ(x, y), λ1(x, y), and λ2(x, y) within the 8-neighborhood range;
[0094] Step S9, according to the coefficient of variation c.v(x, y), mark the pixel positions with large data differences between the two enhanced images G1 and G2:
[0095]
[0096] where, when c.v(x, y) ≤ 15%, the data of G1 and G2 are close and the change is small;
[0097] Step S10, according to the coefficients of variation c.v1(x, y) and c.v2(x, y), mark the pixel positions with the largest data differences between the two enhanced images G1 and G2 and the relative average gray-level image G aver ;
[0098]
[0099] where, when Z(x, y) = 1, the gradient difference of the pixel point (x, y) in the 0° and 90° directions is greater than that in the 45° and 135° directions, and vice versa;
[0100] Step S11, obtain the final enhanced image, as Figure 5 shown:
[0101]
[0102] where, by judging the change trend of the gradients of each pixel point in different directions, the final enhanced image is obtained.
[0103] In summary, in view of the characteristics of low contrast and unclear detail texture in remote sensing images, on the basis of enhancing the contrast of the entire remote sensing image, this invention combines the gray level of the image and the gradient information in four directions of 0°, 90°, 45°, and 135° to construct a gray gradient histogram, and uses the histogram equalization method to complete image enhancement; further, by comparing the average gray image, the enhanced images of the 0° and 90° gray gradient histograms, and the enhanced images of the 45° and 135° gray gradient histograms, the direction with greater detail changes is discriminated to obtain the final enhanced image. The final enhanced image retains the gradient information in four directions of 0°, 90°, 45°, and 135° at the same time, avoiding over-enhancement and under-enhancement of information in a certain direction.
[0104] Although the content of this invention has been introduced in detail through the above preferred embodiments, it should be recognized that the above description should not be considered as a limitation of this invention. After those skilled in the art have read the above content, various modifications and substitutions to this invention will be obvious. Therefore, the protection scope of this invention should be defined by the appended claims.
Claims
1. An adaptive gray-scale gradient histogram equalization remote sensing image enhancement method, characterized in that It includes the following steps: Step S1, convert the input remote sensing image into a grayscale image G; Step S2, calculate the average grayscale image G within the 8-neighborhood range aver ; Step S3, calculate the gradient values of the grayscale image G in the directions of 0°, 90°, 45°, and 135°, and obtain the gray-level gradient joint histogram H according to the gray level and the gradient values xy and H uv ; Step S4, establish a grayscale mapping relationship, and through histogram equalization processing, obtain the enhanced images G1 and G2; Step S5, calculate the coefficient of variation between the enhanced images G1, G2 and the average grayscale image G aver and obtain the final enhanced image G based on the variation difference of the pixel point gradients s ; Calculating the coefficient of variation between the enhanced images G1, G2 and the average grayscale image G in step S5, and obtaining the final enhanced image G according to the change trend of the pixel point gradient aver further includes: s Step S5.1, compare the contrast-enhanced images G1, G2 with G aver : λ(x,y) = G1(x,y) - G2(x,y) λ1(x,y) = G1(x,y) - G aver (x,y) λ2(x,y) = G2(x,y) - G aver (x,y) where λ(x,y), λ1(x,y), and λ2(x,y) respectively represent the data differences between G1 and G2, G1 and G aver , G2 and G aver . Step S5.2, calculate the coefficient of variation of λ(x,y), λ1(x,y), and λ2(x,y): where μ(x,y), μ1(x,y), and μ2(x,y) represent the means of λ(x,y), λ1(x,y), and λ2(x,y) within the 8-neighborhood range, and σ(x,y), σ1(x,y), and σ2(x,y) represent the standard deviations of λ(x,y), λ1(x,y), and λ2(x,y) within the 8-neighborhood range; Step S5.3, according to the coefficient of variation c.v(x,y), mark the pixel positions where the data differences between the two groups of enhanced images G1 and G2 are large: where, when c.v(x,y) ≤ 15%, the data of G1 and G2 are close and the change is small; Step S5.4, based on the coefficient of variation c.v1(x,y) and c.v2(x,y), mark the pixel positions with the largest data difference between the two enhanced images G1 and G2 relative to the average gray-scale image G aver Positions of pixels with the largest data difference: where, when Z(x,y) = 1, the gradient difference of the pixel point (x,y) in the 0° and 90° directions is greater than that in the 45° and 135° directions, and vice versa; Step S5.5, obtain the final enhanced image: where, judge the change trend of the gradients in different directions of each pixel point to obtain the finally enhanced image.
2. An adaptive gray-scale gradient histogram equalization remote sensing image enhancement method as claimed in claim 1, characterized in that The calculation of the average grayscale image within the 8-neighborhood range in step S2 further includes: Among them, G aver (x, y) represents the average gray value of the pixel point (x, y) within the 8-neighborhood range.
3. The adaptive gray-scale gradient histogram equalization remote sensing image enhancement method according to claim 1, wherein, In the step S3, calculate the gradient values of the image in the directions of 0°, 90°, 45°, and 135°, and obtain the gray-level gradient joint histogram H according to the gray level and the gradient value xy and H uv , further including: Step S3.1, calculate the gradients of pixel point G(x, y) in the 0° and 90° directions and in the 45° and 135° directions Among them, G x (x,y) represents the gradient value of the pixel point (x,y) in the 0° direction, and G y (x,y) represents the gradient value of the pixel point (x,y) in the 90° direction, and G u (x,y) represents the gradient value of the pixel point (x,y) in the 45° direction, and G v (x,y) represents the gradient value of the pixel point (x,y) in the 135° direction; Step S3.2, establish a histogram H according to the gray level of the grayscale image G and the gray gradients in the 0° and 90° directions xy : Among them, the number of gray levels of the grayscale image G is L, and φ(m,n) is a binary function that is 1 when the gray values G(x,y) are the same and the gray gradients are the same, and 0 in other cases; Step S3.3, establish a histogram H according to the gray level of the grayscale image G and the gray gradients in the 45° and 135° directions Establish a histogram H uv : Among them, the number of gray levels of the grayscale image G is L, and φ(m,n) is 1 when the gray values G(x,y) are the same and the gray gradients are the same, and 0 in other cases, which is a binary function.
4. An adaptive gray gradient histogram equalization remote sensing image enhancement method according to claim 1, characterized in that, The establishment of the grayscale mapping relationship in step S4, and the reconstruction of the original input remote sensing image through histogram equalization processing to obtain the enhanced images G1 and G2 further includes: Step S4.1, normalize the grayscale gradient histograms H xy and H uv : where S is the size of the image, H xy (m,n) is the frequency at which the gray value G(x,y)=m appears simultaneously with the gradients in the 0° and 90° directions and H uv (m,n) is the frequency at which the gray value G(x,y)=m appears simultaneously with the gradients in the 45° and 135° directions ; Step S4.2, perform equalization processing on the normalized grayscale gradient histogram: Among them, P xy (m,n) and P uv (m,n) are respectively the normalization functions of the grayscale gradient histograms H xy and H uv . G1 is the enhanced image obtained by histogram equalization processing based on the histogram containing grayscale information and 0° and 90° gradient information, and G2 is the enhanced image obtained by histogram equalization processing based on the histogram containing grayscale information and 45° and 135° gradient information.
Citation Information
Patent Citations
A remote sensing image enhancement method based on fusion of gradient and gray information
CN109345491A
Infrared image enhancement method based on texture weighted histogram equalization
CN110827229A
Image gradient field double-interval equalization algorithm based on histogram probability correction
CN111311525A
Underwater target detection image enhancement method with contrast limited adaptive histogram equalization
CN107833189A
Improved image edge detection method
CN108470343A