Self-adaptive infrared image equalization method

Through the adaptive infrared image equalization method, contrast equalization of infrared images is performed through segmentation processing and adaptive crop threshold limiting, solving the problem of contrast adjustment in the prior art when processing field scenes, and achieving better image equalization effect.

CN119540066AActive Publication Date: 2025-02-28JING LIN CHENGDU SCI & TECH
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
CN202510103975.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-02-28
Estimated Expiration
2045-01-23

AI Technical Summary

Technical Problem

When handling field observation scenes, especially when the background ratio is high, it is difficult to effectively adjust the global and local contrast of infrared images, which can easily lead to overexposure or over-lighting of the target.

Method used

An adaptive infrared image equalization method is proposed. By counting the total histogram of the original infrared data and performing segmentation processing, the image is divided into low-temperature segments, conventional segments and high-temperature segments, the histograms of each sub-block are subjected to the contrast histograms with adaptive crop threshold limits, and an improved bilinear interpolation mapping method is adopted.

Benefits of technology

This method improves the adaptability of the algorithm, and does not need to adjust the data segmentation points and crop thresholds according to the scene switching, effectively improving the block effect of infrared images and improving the contrast equalization effect of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540066A_ABST
    Figure CN119540066A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive infrared image equalization method, and the method comprises the steps: S1, carrying out the statistics of a total histogram HIST of original infrared data DA, and carrying out the segmentation processing of the histogram; s2, dividing the original infrared data DA into i sub-blocks, and counting a histogram Hi of the data DAI of each sub-block; s3, performing segmented adaptive cutting threshold limit contrast histogram equalization processing on each sub-block histogram Hi; and S4, carrying out improved bilinear interpolation mapping on the equalization result of each sub-block. The algorithm provided by the invention is high in adaptive degree, data segmentation points and cutting threshold values do not need to be switched and adjusted according to scenes, and meanwhile, the improved interpolation method is adopted to effectively improve the blocking effect of the infrared image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of infrared image processing, and in particular to an adaptive infrared image equalization method. Background Art

[0002] The infrared imaging system obtains 14-bit infrared image data through thermal imaging technology. Most of the infrared images obtained by simple linear stretching and other methods are low in contrast and the target appears blurred, which is not conducive to the use of subsequent application functions. It is necessary to use an excellent equalization method to adjust the global and local contrast of the infrared image. The histogram equalization method is the most commonly used and best performing infrared data processing method. It adjusts the intervals between gray levels with a high proportion according to the cumulative histogram of the data, and merges the intervals between gray levels with a low proportion to achieve a balanced effect. However, infrared equipment is often used for field observations. The dynamic range of the scene varies greatly, and the background often accounts for a high proportion. Histogram equalization and various improved processing methods do not handle such scenes well, resulting in overexposure or overbrightness of the target. Summary of the invention

[0003] Based on the above technical problems, the present invention proposes an adaptive infrared image equalization method, and the specific technical solution is as follows.

[0004] An adaptive infrared image equalization method comprises the following steps: Step S1: Count the total histogram HIST of the original infrared data DA and perform segment processing on the histogram; Step S2: Divide the original infrared data DA into i sub-blocks, and calculate the histogram Hi of each sub-block data DAI; Step S3: each sub-block histogram Hi is subjected to segmented adaptive clipping threshold limiting contrast histogram equalization processing; Step S4: Perform improved bilinear interpolation mapping on the equalization results of each sub-block.

[0005] Specifically, step S1 includes the following sub-steps: Step S11: traverse all the pixels of the original infrared data DA, establish a total histogram HIST, and calculate the total number of pixels NUM. During the traversal process: ; ;in, , represents the pixel value at the (x, y) coordinate of the original infrared data DA; Step S12: traverse the total histogram HIST and find the median MED calculation formula: , MED is equal to the k value that satisfies the MED calculation formula for finding the median; Step S13: Find all flat areas AllPi in the total histogram HIST; Step S14: traverse all flat areas AllPi and retain their lengths Greater than The flat area is Mpi. If i is greater than 2, that is, the number of Mpi is greater than 2, the two flat areas with longer lengths are retained as the segmented flat areas Pi, which can be expressed as: ; ; in, represents the i+1th flat area, and the subscript LP represents the left endpoint of the flat area; represents the i-th flat area, and the subscript RP represents the right end point of the flat area; Step S15: Divide the total histogram HIST into a low temperature segment LD, a normal segment ND and a high temperature segment HD according to the segmented flat area Pi; wherein the low temperature segment LD is from the left end point IL of the image to the right end point of the first longer flat area The regular segment ND is the right end point of the first longer flat area. To the left end point of the second longer flat area The high temperature segment HD is the left end point of the second longer flat area. The data segment from the right endpoint IR of the image to the right endpoint IR of the image.

[0006] Specifically, the judgment conditions of the flat area AllPi include: ; ; Where i represents the number of sub-blocks of the original infrared data DA, , represents the threshold of the whole image; NUM is the total number of pixels of the original infrared data DA; ; The flat area represents the data segment where the difference in histogram height between adjacent pixels on the histogram is small.

[0007] Specifically, step S2 includes the following sub-steps: Step S21: Divide the image into i sub-blocks DAI according to the width and height of the original infrared data DA; Step S22: traverse all pixels in each sub-block and establish a sub-block histogram Hi: ; in, , represents the pixel value at the (x, y) coordinate of each sub-block data DAI; Step S23: traverse the sub-block histogram Hi and find the sub-block median MEDI: ; Among them, MEDI represents the value, NUM represents the total number of pixels, and i represents the number of divided sub-blocks.

[0008] Specifically, step S3 includes the following sub-steps: Step S31: traverse the low temperature segment of the sub-block histogram Hi and perform adaptive clipping threshold limiting contrast histogram equalization processing; Step S32: traverse the normal temperature section of the sub-block histogram Hi and perform adaptive clipping threshold limiting contrast histogram equalization processing; Step S33: traverse the high temperature segment of the sub-block histogram Hi and perform adaptive clipping threshold limiting contrast histogram equalization processing.

[0009] Specifically, the step S31 further includes the following sub-steps: Step S311: Count the number of valid pixels nullowD and the number of invalid pixels nullowP in the low temperature segment in the sub-block histogram Hi, as well as the total value of valid pixels sumLowD and the total value of invalid pixels sumLowP, and the calculation formulas are: ; ; ; ; in, represents the pixel value in the histogram, , from the left end point IL of the image to the right end point of the first relatively long flat area The data segment between Step S312: Calculate the adaptive clipping threshold clipTupLow of the low temperature segment: ; Step S313: Count the total value of pixels sumUpLow exceeding the adaptive clipping threshold clipTupLow in the low temperature segment of the sub-block histogram Hi, and calculate the filling height clipMeanLow. The calculation formula is: , ; ; Step S314: Count the total value of pixels sumDownLow in the low temperature segment of the sub-block histogram Hi that is less than or equal to the full image threshold T, and calculate the redistribution height downMeanLow, which is calculated as follows: , ; ; Step S315: Perform histogram equalization on the low temperature segment of the sub-block histogram Hi to obtain an equalized histogram Ehi, which is calculated as follows: ; in, represents the pixel value in the histogram, , from the left end point IL of the image to the right end point of the first relatively long flat area The data segment between.

[0010] Specifically, the step S32 further includes the following sub-steps: Step S321: Count the number of valid pixels numNorD and the number of invalid pixels numNorP in the normal temperature section in the sub-block histogram Hi, as well as the total value of valid pixels sumNorD and the total value of invalid pixels sumNorP, and the calculation formula is: , ; , ; , ; , ; in, represents the pixel value in the histogram, , is the right end point of the first long flat area To the left end point of the second longer flat area The data segment between Step S322: Calculate the adaptive clipping threshold clipTupNor of the normal temperature section, the calculation formula is: ; Step S323: Count the total value of pixels sumUpNor exceeding the adaptive clipping threshold clipTupNor in the normal temperature section of the sub-block histogram Hi, and calculate the filling height clipMeanNor. The calculation formula is: , ; ; Step S324: Count the total value of pixels sumDownNor that are less than or equal to the full image threshold T in the normal temperature segment of the sub-block histogram Hi, and calculate the redistribution height downMeanNor, and the calculation formula is: , ; ; Step S325: Perform histogram equalization on the normal temperature section of the sub-block histogram Hi to obtain an equalized histogram Ehi, which is calculated as follows: ; in, represents the pixel value in the histogram, , is the right end point of the first long flat area To the left end point of the second longer flat area The data segment between.

[0011] Specifically, the step S33 further includes the following sub-steps: Step S331: Count the number of valid pixels numHighD and the number of invalid pixels numHighP in the high temperature section of the sub-block histogram Hi, as well as the total value of valid pixels sumHighD and the total value of invalid pixels sumHighP. The specific calculation formula is: , ; , ; , ; , ; in, represents the pixel value in the histogram, , is the left end point of the second longer flat area The data segment from the right endpoint IR of the image; Step S332: Calculate the adaptive clipping threshold clipTupHigh of the high temperature segment, the calculation formula is: ; Step S333: Count the total value of pixels sumUpHigh exceeding the adaptive clipping threshold clipTupHigh in the high temperature segment of the sub-block histogram Hi, and calculate the filling height clipMeanHigh. The specific calculation formula is: , ; ; Step S334: Count the total value of pixels sumDownHigh that are less than or equal to the full image threshold T in the high temperature segment of the sub-block histogram Hi, and calculate the redistribution height downMeanHigh. The specific calculation formula is: , ; ; Step S335: Perform histogram equalization on the high temperature segment of the sub-block histogram Hi to obtain an equalized histogram Ehi. The specific calculation formula is: ; in, represents the pixel value in the histogram, , is the left end point of the second longer flat area The data segment from the right endpoint IR of the image to the right endpoint IR of the image.

[0012] Specifically, step S4 includes the following sub-steps: Step S41: traverse the redistribution histograms Ehi of i sub-blocks and establish the cumulative histogram cdfi of each sub-block. The calculation formula is: ; Step S42: Calculate the mapping values ​​medD and medDi of the median MED and the median MEDI of each sub-block in the cumulative histogram of each sub-block. The specific calculation formula is: ; ; Step S43: According to the median mapping value calculated in step S42, the compensation value diffI of each sub-block interpolation result is obtained and expressed as: ; Step S44: traverse the original infrared image data DA, and according to the pixel value pi at (x, y) and the equalization results in the i cumulative histograms , , , , and obtain the bilinear interpolation mapping result of the pixel value. The specific calculation formula is: ; Wherein, (x, y) represents pixel coordinates, w represents the width of infrared image data, h represents the height of infrared image data, LU represents the upper left block, RU represents the upper right block, LD represents the lower left block, and RD represents the lower right block.

[0013] Beneficial effects of the invention: The invention proposes an adaptive infrared image equalization method, the algorithm has a high degree of adaptability, and the data segmentation points and the cropping threshold do not need to be adjusted according to the scene switching. At the same time, an improved interpolation method is used to effectively improve the block effect of the infrared image. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a schematic diagram of image segmentation in an embodiment of the present invention; Figure 2 is an overall flow chart of the adaptive infrared image equalization method in an embodiment of the present invention; Figure 31 is a flow chart of step S1 of the adaptive infrared image equalization method in an embodiment of the present invention; Figure 4 1 is a flow chart of step S2 of the adaptive infrared image equalization method in an embodiment of the present invention; Figure 5 1 is a flow chart of step S3 of the adaptive infrared image equalization method in an embodiment of the present invention; Figure 6 1 is a flow chart of step S4 of the adaptive infrared image equalization method in an embodiment of the present invention. DETAILED DESCRIPTION

[0015] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described with reference to the accompanying drawings.

[0016] The present invention proposes an adaptive infrared image equalization method, such as Figure 2 As shown, the following steps are included: Step S1: Count the total histogram HIST of the original infrared data DA and perform segment processing on the histogram; Step S2: Divide the original infrared data DA into i sub-blocks, and calculate the histogram Hi of each sub-block data DAI; Step S3: Each sub-block histogram Hi is subjected to segmented adaptive clipping threshold-limited contrast histogram equalization processing, such as Figure 1 As shown; Step S4: Perform improved bilinear interpolation mapping on the equalization results of each sub-block.

[0017] In a preferred embodiment, step S1 is as follows Figure 3 As shown, it includes the following sub-steps: Step S11: traverse all the pixels of the original infrared data DA, establish a total histogram HIST, and calculate the total number of pixels NUM. During the traversal process: ; ;in, , represents the pixel value at the (x, y) coordinate of the original infrared data DA; Step S12: traverse the total histogram HIST and find the median MED: , MED represents the k value when this formula is satisfied; Step S13: Find all flat areas AllPi in the total histogram HIST; Step S14: traverse all flat areas AllPi and retain their lengths Greater than The flat area is Mpi. If i is greater than 2, that is, the number of Mpi is greater than 2, the two flat areas with longer lengths are retained as the segmented flat areas Pi, which can be expressed as: ; ; in, represents the i+1th flat area, and the subscript LP represents the left endpoint of the flat area; represents the i-th flat area, and the subscript RP represents the right end point of the flat area; Step S15: Divide the total histogram HIST into a low temperature segment LD, a normal segment ND and a high temperature segment HD according to the segmented flat area Pi; wherein the low temperature segment LD is from the left end point IL of the image to the right end point of the first longer flat area The regular segment ND is the right end point of the first longer flat area. To the left end point of the second longer flat area The high temperature segment HD is the left end point of the second longer flat area. The data segment from the right endpoint IR of the image to the right endpoint IR of the image.

[0018] In a preferred embodiment, the determination conditions of the flat area AllPi include: ; ; in, , represents the threshold of the whole image; NUM is the total number of pixels of the original infrared data DA; ; The flat area represents the data segment where the difference in histogram height between adjacent pixels on the histogram is small.

[0019] In a preferred embodiment, step S2 is as follows Figure 4 As shown, it includes the following sub-steps: Step S21: Divide the image into i sub-blocks DAI according to the width and height of the original infrared data DA; Step S22: traverse all pixels in each sub-block and establish a sub-block histogram Hi: ; in, , represents the pixel value at the (x, y) coordinate of each sub-block data DAI; Step S23: traverse the sub-block histogram Hi and find the sub-block median MEDI: ; Among them, MEDI represents the value, NUM represents the total number of pixels, and i represents the number of divided sub-blocks.

[0020] In a preferred embodiment, step S3 is as follows Figure 5As shown, it includes the following sub-steps: Step S31: traverse the low temperature segment of the sub-block histogram Hi and perform adaptive clipping threshold limiting contrast histogram equalization processing; Step S32: traverse the normal temperature section of the sub-block histogram Hi and perform adaptive clipping threshold limiting contrast histogram equalization processing; Step S33: traverse the high temperature segment of the sub-block histogram Hi and perform adaptive clipping threshold limiting contrast histogram equalization processing.

[0021] In a preferred embodiment, step S31 further includes the following sub-steps: Step S311: Count the number of valid pixels nullowD and the number of invalid pixels nullowP in the low temperature segment in the sub-block histogram Hi, as well as the total value of valid pixels sumLowD and the total value of invalid pixels sumLowP, and the calculation formulas are: ; ; ; ; in, represents the pixel value in the histogram, , from the left end point IL of the image to the right end point of the first relatively long flat area The data segment between Step S312: Calculate the adaptive clipping threshold clipTupLow of the low temperature segment: ; Step S313: Count the total value of pixels sumUpLow exceeding the adaptive clipping threshold clipTupLow in the low temperature segment of the sub-block histogram Hi, and calculate the filling height clipMeanLow. The calculation formula is: , ; ; Step S314: Count the total value of pixels sumDownLow in the low temperature segment of the sub-block histogram Hi that is less than or equal to the full image threshold T, and calculate the redistribution height downMeanLow, which is calculated as follows: , ; ; Step S315: Perform histogram equalization on the low temperature segment of the sub-block histogram Hi to obtain an equalized histogram Ehi, which is calculated as follows: ; in, represents the pixel value in the histogram, , from the left end point IL of the image to the right end point of the first relatively long flat area The data segment between.

[0022] In a preferred embodiment, step S32 further includes the following sub-steps: Step S321: Count the number of valid pixels numNorD and the number of invalid pixels numNorP in the normal temperature section in the sub-block histogram Hi, as well as the total value of valid pixels sumNorD and the total value of invalid pixels sumNorP, and the calculation formula is: , ; , ; , ; , ; in, represents the pixel value in the histogram, , is the right end point of the first long flat area To the left end point of the second longer flat area The data segment between Step S322: Calculate the adaptive clipping threshold clipTupNor of the normal temperature section, the calculation formula is: ; Step S323: Count the total value of pixels sumUpNor exceeding the adaptive clipping threshold clipTupNor in the normal temperature section of the sub-block histogram Hi, and calculate the filling height clipMeanNor. The calculation formula is: , ; ; Step S324: Count the total value of pixels sumDownNor that are less than or equal to the full image threshold T in the normal temperature segment of the sub-block histogram Hi, and calculate the redistribution height downMeanNor, and the calculation formula is: , ; ; Step S325: Perform histogram equalization on the normal temperature section of the sub-block histogram Hi to obtain an equalized histogram Ehi, which is calculated as follows: ; in, represents the pixel value in the histogram, , is the right end point of the first long flat area To the left end point of the second longer flat area The data between.

[0023] In a preferred embodiment, step S33 further includes the following sub-steps: Step S331: Count the number of valid pixels numHighD and the number of invalid pixels numHighP in the high temperature section of the sub-block histogram Hi, as well as the total value of valid pixels sumHighD and the total value of invalid pixels sumHighP. The specific calculation formula is: , ; , ; , ; , ; in, represents the pixel value in the histogram, , is the left end point of the second longer flat area The data segment from the right endpoint IR of the image; Step S332: Calculate the adaptive clipping threshold clipTupHigh of the high temperature segment, the calculation formula is: ; Step S333: Count the total value of pixels sumUpHigh exceeding the adaptive clipping threshold clipTupHigh in the high temperature segment of the sub-block histogram Hi, and calculate the filling height clipMeanHigh. The specific calculation formula is: , ; ; Step S334: Count the total value of pixels sumDownHigh that are less than or equal to the full image threshold T in the high temperature segment of the sub-block histogram Hi, and calculate the redistribution height downMeanHigh. The specific calculation formula is: , ; ; Step S335: Perform histogram equalization on the high temperature segment of the sub-block histogram Hi to obtain an equalized histogram Ehi. The specific calculation formula is: ; in, represents the pixel value in the histogram, , is the left end point of the second longer flat area Data between the right endpoint IR of the image.

[0024] In a preferred embodiment, step S4 is as follows Figure 6 As shown, it includes the following sub-steps: Step S41: traverse the redistribution histograms Ehi of i sub-blocks and establish the cumulative histogram cdfi of each sub-block. The calculation formula is: ; Step S42: Calculate the mapping values ​​medD and medDi of the median MED and the median MEDI of each sub-block in the cumulative histogram of each sub-block. The specific calculation formula is: ; ; Step S43: According to the median mapping value calculated in step S42, the compensation value diffI of each sub-block interpolation result is obtained and expressed as: ; Step S44: traverse the original infrared image data DA, and according to the pixel value pi at (x, y) and the equalization results in the i cumulative histograms , , , , and obtain the bilinear interpolation mapping result of the pixel value. The specific calculation formula is: ; Wherein, (x, y) represents pixel coordinates, w represents the width of infrared image data, h represents the height of infrared image data, LU represents the upper left block, RU represents the upper right block, LD represents the lower left block, and RD represents the lower right block.

[0025] The present invention has shown and described the basic principles and main features of the present invention and the advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. An adaptive infrared image equalization method, characterized in that: The following steps are involved: Step S1: Count the total histogram HIST of the original infrared data DA and perform segment processing on the histogram; Step S2: Divide the original infrared data DA into i sub-blocks, and calculate the histogram Hi of each sub-block data DAI; Step S3: each sub-block histogram Hi is subjected to segmented adaptive clipping threshold limiting contrast histogram equalization processing; Step S4: Perform improved bilinear interpolation mapping on the equalization results of each sub-block.

2. The adaptive infrared image equalization method according to claim 1, characterized in that: The step S1 comprises the following sub-steps: Step S11: traverse all the pixels of the original infrared data DA, establish a total histogram HIST, and calculate the total number of pixels NUM. During the traversal process: ; ;in, , represents the pixel value at the (x, y) coordinate of the original infrared data DA; Step S12: traverse the total histogram HIST and find the median MED calculation formula: , MED is equal to the k value that satisfies the MED calculation formula for finding the median; Step S13: Find all flat areas AllPi in the total histogram HIST; Step S14: traverse all flat areas AllPi and retain their lengths Greater than The flat area is Mpi. If i is greater than 2, that is, the number of Mpi is greater than 2, the two flat areas with longer lengths are retained as the segmented flat areas Pi, which can be expressed as: ; ; in, represents the i+1th flat area, and the subscript LP represents the left endpoint of the flat area; represents the i-th flat area, and the subscript RP represents the right end point of the flat area; Step S15: Divide the total histogram HIST into a low temperature segment LD, a normal segment ND and a high temperature segment HD according to the segmented flat area Pi; wherein the low temperature segment LD is from the left end point IL of the image to the right end point of the first longer flat area The regular segment ND is the right end point of the first longer flat area. To the left end point of the second longer flat area The high temperature segment HD is the left end point of the second longer flat area. The data segment from the right endpoint IR of the image to the right endpoint IR of the image.

3. The adaptive infrared image equalization method according to claim 2, characterized in that: The judgment conditions of the flat area AllPi include: ; ; Where i represents the number of sub-blocks of the original infrared data DA, , represents the threshold of the whole image; NUM is the total number of pixels of the original infrared data DA; ; The flat area represents the data segment where the difference in histogram height between adjacent pixels on the histogram is small.

4. The adaptive infrared image equalization method according to claim 3, characterized in that: The step S2 comprises the following sub-steps: Step S21: Divide the image into i sub-blocks DAI according to the width and height of the original infrared data DA; Step S22: traverse all pixels in each sub-block and establish a sub-block histogram Hi: ; in, , represents the pixel value at the (x, y) coordinate of each sub-block data DAI; Step S23: traverse the sub-block histogram Hi and find the sub-block median MEDI: ; Among them, MEDI represents the value, NUM represents the total number of pixels, and i represents the number of divided sub-blocks.

5. The adaptive infrared image equalization method according to claim 4, characterized in that: The step S3 comprises the following sub-steps: Step S31: traverse the low temperature segment of the sub-block histogram Hi and perform adaptive clipping threshold limiting contrast histogram equalization processing; Step S32: traverse the normal temperature section of the sub-block histogram Hi and perform adaptive clipping threshold limiting contrast histogram equalization processing; Step S33: traverse the high temperature segment of the sub-block histogram Hi and perform adaptive clipping threshold limiting contrast histogram equalization processing.

6. The adaptive infrared image equalization method according to claim 5, characterized in that: The step S31 further includes the following sub-steps: Step S311: Count the number of valid pixels nullowD and the number of invalid pixels nullowP in the low temperature segment in the sub-block histogram Hi, as well as the total value of valid pixels sumLowD and the total value of invalid pixels sumLowP, and the calculation formulas are: ; ; ; ; in, represents the pixel value in the histogram, , from the left end point IL of the image to the right end point of the first relatively long flat area The data segment between Step S312: Calculate the adaptive clipping threshold clipTupLow of the low temperature segment: ; Step S313: Count the total value of pixels sumUpLow exceeding the adaptive clipping threshold clipTupLow in the low temperature segment of the sub-block histogram Hi, and calculate the filling height clipMeanLow. The calculation formula is: , ; ; Step S314: Count the total value of pixels sumDownLow in the low temperature segment of the sub-block histogram Hi that is less than or equal to the full image threshold T, and calculate the redistribution height downMeanLow, which is calculated as follows: , ; ; Step S315: Perform histogram equalization on the low temperature segment of the sub-block histogram Hi to obtain an equalized histogram Ehi, which is calculated as follows: ; in, represents the pixel value in the histogram, , from the left end point IL of the image to the right end point of the first relatively long flat area The data segment between.

7. The adaptive infrared image equalization method according to claim 5, characterized in that: The step S32 further includes the following sub-steps: Step S321: Count the number of valid pixels numNorD and the number of invalid pixels numNorP in the normal temperature section in the sub-block histogram Hi, as well as the total value of valid pixels sumNorD and the total value of invalid pixels sumNorP, and the calculation formula is: , ; , ; , ; , ; in, represents the pixel value in the histogram, , is the right end point of the first long flat area To the left end point of the second longer flat area The data segment between Step S322: Calculate the adaptive clipping threshold clipTupNor of the normal temperature section, the calculation formula is: ; Step S323: Count the total value of pixels sumUpNor exceeding the adaptive clipping threshold clipTupNor in the normal temperature section of the sub-block histogram Hi, and calculate the filling height clipMeanNor. The calculation formula is: , ; ; Step S324: Count the total value of pixels sumDownNor that are less than or equal to the full image threshold T in the normal temperature segment of the sub-block histogram Hi, and calculate the redistribution height downMeanNor, and the calculation formula is: , ; ; Step S325: Perform histogram equalization on the normal temperature section of the sub-block histogram Hi to obtain an equalized histogram Ehi, which is calculated as follows: ; in, represents the pixel value in the histogram, , is the right end point of the first long flat area To the left end point of the second longer flat area The data segment between.

8. The adaptive infrared image equalization method according to claim 5, characterized in that: The step S33 also includes the following sub-steps: Step S331: Count the number of valid pixels numHighD and the number of invalid pixels numHighP in the high temperature section in the sub-block histogram Hi, as well as the total value of valid pixels sumHighD and the total value of invalid pixels sumHighP. The specific calculation formula is: , ; , ; , ; , ; in, represents the pixel value in the histogram, , is the left end point of the second longer flat area The data segment from the right endpoint IR of the image; Step S332: Calculate the adaptive clipping threshold clipTupHigh of the high temperature segment, the calculation formula is: ; Step S333: Count the total value of pixels sumUpHigh exceeding the adaptive clipping threshold clipTupHigh in the high temperature segment of the sub-block histogram Hi, and calculate the filling height clipMeanHigh. The specific calculation formula is: , ; ; Step S334: Count the total value of pixels sumDownHigh that are less than or equal to the full image threshold T in the high temperature segment of the sub-block histogram Hi, and calculate the redistribution height downMeanHigh. The specific calculation formula is: , ; ; Step S335: Perform histogram equalization on the high temperature segment of the sub-block histogram Hi to obtain an equalized histogram Ehi. The specific calculation formula is: ; in, represents the pixel value in the histogram, , is the left end point of the second longer flat area The data segment from the right endpoint IR of the image to the right endpoint IR of the image.

9. The adaptive infrared image equalization method according to claim 1, characterized in that: The step S4 comprises the following sub-steps: Step S41: traverse the redistribution histograms Ehi of i sub-blocks and establish the cumulative histogram cdfi of each sub-block. The calculation formula is: ; Step S42: Calculate the mapping values ​​medD and medDi of the median MED and the median MEDI of each sub-block in the cumulative histogram of each sub-block. The specific calculation formula is: ; ; Step S43: According to the median mapping value calculated in step S42, the compensation value diffI of each sub-block interpolation result is obtained and expressed as: ; Step S44: traverse the original infrared image data DA, and according to the pixel value pi at (x, y) and the equalization results in the i cumulative histograms , , , , and obtain the bilinear interpolation mapping result of the pixel value. The specific calculation formula is: ; Wherein, (x, y) represents pixel coordinates, w represents the width of infrared image data, h represents the height of infrared image data, LU represents the upper left block, RU represents the upper right block, LD represents the lower left block, and RD represents the lower right block.

Citation Information

Patent Citations

  • Contrast enhancement method based on wavelet transform image decomposition

    CN106296600A

  • Infrared image enhancement method

    CN107784637A

  • Regularized parameter adaptive sparse representation image reconstruction method

    CN109064406A

  • Infrared image denoising enhancement method, device and system based on local adaptive CLAHE, and computer readable storage medium

    CN112365424A

  • Infrared enhancement method based on gradient histogram

    CN113592750A