Infrared segmentation double-platform histogram enhancement method based on redistribution

By adopting the infrared segmented dual-platform histogram enhancement method based on redistribution in infrared image processing, the platform value is adaptively calculated and the histogram is redistributed, which solves the problem of poor robustness in infrared scenes, and achieves contrast Effectively improve and adaptability enhancement.

CN119228656AActive Publication Date: 2024-12-31JING LIN CHENGDU SCI & TECH

Patent Information

Application Number
CN202411755290.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2024-12-31
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

The traditional infrared image dual-platform histogram enhancement method is poorly robust in infrared scenes that change at all times, cannot effectively improve the contrast of the target, and requires manual setting of the platform value, making it difficult to adapt to different scenarios.

Method used

Using the infrared segmented dual-platform histogram enhancement method based on redistribution, the total histogram of the original infrared data is processed by statistics and segmentation, and the upper and lower platform values ​​are adaptively calculated, redistributed histograms and performed balanced processing, avoiding manual settings. platform value requirement.

Benefits of technology

The adaptive contrast improvement in infrared scenes that change at all times is achieved, the local and global contrast effect is improved, and the processing robustness is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228656A_ABST
    Figure CN119228656A_ABST
Patent Text Reader

Abstract

The invention discloses an infrared segmentation double-platform histogram enhancement method based on redistribution, and the method comprises the following steps: S1, carrying out the statistics of a total histogram HIST of original infrared data DA, and carrying out the segmentation processing of the total histogram HIST; s2, carrying out redistribution on the total histogram HIST to obtain a redistributed histogram Dh; and S3, carrying out histogram equalization on the redistributed histogram Dh to obtain an equalization result DB. According to the method, specific upper and lower platform values do not need to be set, all self-adaptive calculation is achieved, the requirement for an infrared scene changing at any time can be met, and robustness is good.
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 infrared segmented dual-platform histogram enhancement method based on redistribution. Background Art

[0002] Infrared imaging is the process of obtaining image information by receiving infrared thermal radiation from the scene through an infrared detector. Unlike visible light imaging, it has extremely unique imaging characteristics and belongs to passive imaging. In nature, the temperature difference between the environment and the target is constantly changing. When the temperature difference is small, the target in the infrared image is easily submerged in the environment; when the temperature difference is large, the contrast of the target in the infrared image is very low. In order to improve the quality of infrared images and enhance the image contrast, a histogram-based method is often used to process the original image data. Although the traditional histogram equalization algorithm can effectively stretch the grayscale range, it is indeed easy to cause excessive background enhancement and the problem of unclear target contrast enhancement. The dual-platform histogram equalization algorithm overcomes excessive background enhancement by setting the upper platform value and improves the target contrast by setting the lower platform value, but the selection of the two platform values ​​is crucial. At present, the general platform value adopts a fixed method, with the upper platform value using about 20% of the total pixels and the lower platform value using about 5% of the total pixels. Therefore, it cannot meet the infrared scene that changes all the time and has poor robustness. Summary of the invention

[0003] In order to overcome the shortcomings of the above-mentioned infrared image dual-platform histogram enhancement, the present invention provides an infrared segmented dual-platform histogram enhancement method based on redistribution.

[0004] The object of the present invention is to adopt the following technical solution to achieve: a redistribution-based infrared segmented dual-platform histogram enhancement method, comprising the following steps: S1: Count the total histogram HIST of the original infrared data DA, and perform segment processing on the total histogram HIST; S2: Redistribute the total histogram HIST to obtain a redistributed histogram Dh; S3: Perform histogram equalization on the redistributed histogram Dh to obtain a balanced result DB.

[0005] Furthermore, step S1 includes the following sub-steps: S11: traverse all pixel points of the original infrared data DA and establish a total histogram HIST; S12: Find all flat areas AllPi in the total histogram HIST; S13: traverse all flat areas AllPi, and retain the two longest flat areas as segmented flat areas Pi; S14: 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.

[0006] Further, step S13 is specifically as follows: traverse all flat areas AllPi, retain the flat areas whose length lengthPi is greater than lengthT as Mpi, if i is greater than 2, that is, the number of Mpi is greater than 2, then retain the two longest flat areas as segmented flat areas Pi: ; ; in, represents the i+1th flat area, and LP represents the left endpoint of the flat area; represents the i-th flat area, and RP represents the right endpoint of the flat area.

[0007] Furthermore, the low temperature segment LD is the total histogram HIST from the left end point IL to P1 RP The data segment between Conventional segment ND is P1 RP From P2 LP The data segment between High temperature section HD is P2 LP The data segment between the right endpoint IR of the total histogram HIST.

[0008] Furthermore, step S2 includes the following sub-steps: S21: traverse the total histogram HIST and redistribute the low temperature segment of the total histogram; S22: traverse the total histogram HIST and redistribute the normal temperature segment of the total histogram; S23: traverse the total histogram HIST and redistribute the high temperature segment of the total histogram.

[0009] Furthermore, step S21 includes the following sub-steps: S211: Count the number of valid pixels numLowD and the number of invalid pixels numLowP in the low temperature segment in the total histogram HIST: S212: Calculate the upper platform value TupLow and the lower platform threshold TdownLow of the low temperature segment: ; ; Among them, dstDataLow=DL*T8, dstPlatLow=PL*T8, DL and PL are configurable parameters, T8 represents the number of histograms at each pixel level when all pixels are evenly distributed to an 8-bit histogram; S213: Low temperature segment of redistribution total histogram HIST: ; Where T is the preset value; k represents the pixel value in the histogram, which is the total histogram HIST from the left endpoint IL to P1 RP The data segment between.

[0010] Further, step S22 includes the following sub-steps: S221: Count the number of valid pixels numNorD and the number of invalid pixels numNorP in the normal temperature section in the total histogram HIST: S222: Calculate the upper platform value TupNor and the lower platform threshold TdownNor of the normal temperature section: ; ; Among them, dstDataNor=DN*T8, dstPlatNor=PN*T8; DN and PN are configurable parameters, and T8 represents the number of histograms at each pixel level when all pixels are evenly distributed to an 8-bit histogram; S223: Normal temperature section of the redistribution total histogram HIST: ; Among them, T is the preset value; k represents the pixel value in the histogram, which is P1 RP From P2 LP The data segment between.

[0011] Further, step S23 includes the following sub-steps: S231: Count the number of valid pixels numHighD and the number of invalid pixels numHighP in the high temperature segment in the total histogram HIST: S232: Calculate the upper platform value TupHigh and the lower platform value TdownHigh of the high temperature section: ; ; Among them, dstDataHigh=DH*T8, dstPlatHigh=PH*T8; DH and PH are configurable parameters, and T8 represents the number of histograms at each pixel level when all pixels are evenly distributed to an 8-bit histogram; S233: High temperature section of the redistribution total histogram HIST: ; Where T is the preset value; k represents the pixel value in the histogram, which is P2 LP The data segment to the right endpoint IR of the total histogram HIST.

[0012] Furthermore, step S3 includes the following sub-steps: S31: Calculate the cumulative histogram cdf: ; S32: traverse the original infrared image data DA, and obtain the histogram equalization result DB according to the pixel value Pi at (x, y): DB(x,y)=cdf(Pi+1)*255 / cdf(16384); Among them, (x, y) represents the pixel coordinates, and Pi represents the pixel value at (x, y).

[0013] The beneficial effects of the present invention are: 1. The present invention does not need to set specific upper and lower platform values, and all adaptive calculations can meet the infrared scenes that change all the time, and has good robustness; 2. The present invention has better local contrast and global contrast in different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0015] Figure 1 It is a flow chart of the present invention; Figure 2 is a flowchart of step S1; Figure 3 is a flow chart of step S2; Figure 4 This is a flowchart of step S3. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0017] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0018] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0019] See also Figure 1 , an infrared segmented dual-platform histogram enhancement method based on redistribution, comprising the following steps: S1: Count the total histogram HIST of the original infrared data DA and perform segment processing on the histogram; S2: Redistribute the total histogram HIST to obtain the redistributed histogram Dh; S3: Perform histogram equalization on the redistributed histogram Dh.

[0020] See also Figure 2 Step S1 counts the total histogram HIST of the original infrared data DA and performs segment processing on the histogram, specifically including: S11: traverse all pixel points of the original infrared data DA and establish a total histogram HIST; ; in, , pi represents the pixel value at the (x, y) coordinate of the original infrared data DA.

[0021] S12: Find all flat areas AllPi in the total histogram HIST. The flat areas meet the following two conditions: ; ; in, , is the total number of pixels of the original infrared data DA, NUM=327680; ; The flat area represents the data segment where the difference in histogram height between adjacent pixels on the histogram is small.

[0022] S13: traverse all flat areas AllPi and retain their length 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 longest flat areas are retained as segmented flat areas Pi: ; ; 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, the subscript RP represents the right end point of the flat area, and in this embodiment, lengthT=256.

[0023] S14: dividing 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; Among them, the low temperature segment LD is from the left end point IL to P1 of the image RP The data segment between the regular segment ND is P1 RP To P2 LP The data segment between the high temperature segment HD is P2 LP The data segment from the right endpoint IR of the image to the right endpoint IR of the image.

[0024] See also Figure 3 , step S2 redistributes the total histogram HIST to obtain a redistributed histogram Dhi, which specifically includes: S21: traverse the total histogram HIST and redistribute the low temperature segment of the total histogram; S22: traverse the total histogram HIST and redistribute the normal temperature segment of the total histogram; S23: traverse the total histogram HIST and redistribute the high temperature segment of the total histogram.

[0025] Specifically, in step S21, the low temperature segment of the total histogram is redistributed, specifically including: S211: Count the number of valid pixels nullowD and the number of invalid pixels nullowP in the low temperature segment in the total histogram HIST; in this embodiment, nullowD=350, nullowP=73; ; ; Among them, k represents the pixel value in the histogram, k∈[IL,P1 RP ], from the left end point of the image IL to P1 RP The data segment between.

[0026] S212: Calculate the upper platform value TupLow and the lower platform threshold TdownLow of the low temperature segment; ; ; Among them, dstDataLow=DL*T8=25600, dstPlatLow=PL*T8=5120;=1280 DL=20 and PL=4 are configurable parameters. T8 represents the number of histograms at each pixel level when all pixels of the image are evenly distributed into an 8-bit histogram. In this example, TupLow=73 and TdownLow=70.

[0027] S213: redistribute the low temperature segment of the total histogram HIST; ; Among them, k is the same as above.

[0028] Specifically, in step S22, redistributing the normal temperature section of the total histogram specifically includes: S221: Counting the number of valid pixels numNorD and the number of invalid pixels numNorP in the normal temperature section in the total histogram; ; ; Among them, k represents the pixel value in the histogram, k∈[P1 RP , P2 LP ], for P1 RP To P2 LP In the data segment between the two, in this embodiment, numNorD=837, numNorP=14.

[0029] S222: Calculate the upper platform value TupNor and the lower platform threshold TdownNor of the normal segment; ; ; Among them, dstDataNor=DN*T8=263680, dstPlatNor=PN*T8=2560; DN=206 and PN=2 are configurable parameters, T8 is the same as above, in this example, numNorD=837, numNorP=14; in this example, TupNor=315, TdownNor=182.

[0030] S223: Redistribute the regular segments of the total histogram HIST; ; Among them, k is the same as above.

[0031] Specifically, in S23, the high temperature section of the redistribution total histogram specifically includes: S231: Count the number of valid pixels numHighD and the number of invalid pixels numHighP in the high temperature section in the total histogram. In this example, numHighD=58, numHighP=835; ; ; Among them, k represents the pixel value in the histogram, k∈[P2 LP ,IR], for P2 LP Data segment to the right endpoint IR of the image.

[0032] S232: Calculate the upper platform value TupHigh and the lower platform threshold TdownHigh of the high temperature section; ; .

[0033] Among them, dstDataHigh=DH*T8=20480, dstPlatHigh=PH*T8=10240; DH=16 and PH=8 are configurable parameters, T8 is the same as above. In this example, TupHigh=353, TdownHigh=12.

[0034] S233: redistribute the high temperature section of the total histogram HIST; ; Among them, k is the same as above.

[0035] See also Figure 4 In step S3, the redistributed histogram Dh is subjected to histogram equalization, which specifically includes: S31: Calculate the cumulative histogram cdf; ; S32: traverse the original infrared image data DA, and obtain the histogram equalization result DB according to the pixel value pi at (x, y); ; Among them, (x, y) represents the pixel coordinates, and pi represents the pixel value at (x, y).

[0036] Based on the above embodiments, the present invention has at least the following technical effects: The present invention does not need to set specific upper and lower platform values, and all adaptive calculations are performed, which can meet the needs of infrared scenes that change all the time and has good robustness. The present invention has better local contrast and global contrast in different scenes.

[0037] It should be noted that, for the above embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification belong to preferred embodiments, and the actions involved are not necessarily required by the present application.

[0038] The above embodiments describe 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 by the above embodiments, and 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 changes and modifications made by those skilled in the art shall be within the scope of protection of the appended claims of the present invention without departing from the spirit and scope of the present invention.

Claims

1. A redistribution-based infrared segmented dual-platform histogram enhancement method, characterized in that: The steps include: S1: Count the total histogram HIST of the original infrared data DA, and perform segment processing on the total histogram HIST; S2: Redistribute the total histogram HIST to obtain a redistributed histogram Dh; S3: Perform histogram equalization on the redistributed histogram Dh to obtain a balanced result DB.

2. The infrared segmented dual-platform histogram enhancement method based on redistribution according to claim 1, characterized in that: Step S1 includes the following sub-steps: S11: traverse all pixel points of the original infrared data DA and establish a total histogram HIST; S12: Find all flat areas AllPi in the total histogram HIST; S13: traverse all flat areas AllPi, and retain the two longest flat areas as segmented flat areas Pi; S14: 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.

3. The infrared segmented dual-platform histogram enhancement method based on redistribution according to claim 2, characterized in that: Step S13 is specifically as follows: traverse all flat areas AllPi, retain the flat areas whose length lengthPi is greater than lengthT as Mpi, if i is greater than 2, that is, the number of Mpi is greater than 2, then retain the two longest flat areas as segmented flat areas Pi: ; ; in, represents the i+1th flat area, and LP represents the left endpoint of the flat area; represents the i-th flat area, and RP represents the right endpoint of the flat area.

4. The infrared segmented dual-platform histogram enhancement method based on redistribution according to claim 3, characterized in that: The low temperature section LD is the total histogram HIST left end point IL to P1 RP The data segment between Conventional segment ND is P1 RP From P2 LP The data segment between High temperature section HD is P2 LP The data segment between the right endpoint IR of the total histogram HIST.

5. The infrared segmented dual-platform histogram enhancement method based on redistribution according to claim 4, characterized in that: Step S2 includes the following sub-steps: S21: traverse the total histogram HIST and redistribute the low temperature segment of the total histogram; S22: traverse the total histogram HIST and redistribute the normal temperature segment of the total histogram; S23: traverse the total histogram HIST and redistribute the high temperature segment of the total histogram.

6. The infrared segmented dual-platform histogram enhancement method based on redistribution according to claim 5, characterized in that: Step S21 includes the following sub-steps: S211: Count the number of valid pixels numLowD and the number of invalid pixels numLowP in the low temperature segment in the total histogram HIST: S212: Calculate the upper platform value TupLow and the lower platform threshold TdownLow of the low temperature segment: ; ; Among them, dstDataLow=DL*T8, dstPlatLow=PL*T8, DL and PL are configurable parameters, T8 represents the number of histograms at each pixel level when all pixels are evenly distributed to an 8-bit histogram; S213: Low temperature segment of redistribution total histogram HIST: ; Where T is the preset value; k represents the pixel value in the histogram, which is the total histogram HIST from the left endpoint IL to P1 RP The data segment between.

7. The infrared segmented dual-platform histogram enhancement method based on redistribution according to claim 5, characterized in that: Step S22 includes the following sub-steps: S221: Count the number of valid pixels numNorD and the number of invalid pixels numNorP in the normal temperature section in the total histogram HIST: S222: Calculate the upper platform value TupNor and the lower platform threshold TdownNor of the normal temperature section: ; ; Among them, dstDataNor=DN*T8, dstPlatNor=PN*T8; DN and PN are configurable parameters, and T8 represents the number of histograms at each pixel level when all pixels are evenly distributed to an 8-bit histogram; S223: Normal temperature section of the redistribution total histogram HIST: ; Where T is the preset value; k represents the pixel value in the histogram, which is P1 RP From P2 LP The data segment between.

8. The infrared segmented dual-platform histogram enhancement method based on redistribution as claimed in claim 5, characterized in that: Step S23 includes the following sub-steps: S231: Count the number of valid pixels numHighD and the number of invalid pixels numHighP in the high temperature segment in the total histogram HIST: S232: Calculate the upper platform value TupHigh and the lower platform value TdownHigh of the high temperature section: ; ; Among them, dstDataHigh=DH*T8, dstPlatHigh=PH*T8; DH and PH are configurable parameters, and T8 represents the number of histograms at each pixel level when all pixels are evenly distributed to an 8-bit histogram; S233: High temperature section of the redistribution total histogram HIST: ; Where T is the preset value; k represents the pixel value in the histogram, which is P2 LP The data segment to the right endpoint IR of the total histogram HIST.

9. The infrared segmented dual-platform histogram enhancement method based on redistribution as claimed in claim 5, characterized in that: Step S3 includes the following sub-steps: S31: Calculate the cumulative histogram cdf: ; S32: traverse the original infrared image data DA, and obtain the histogram equalization result DB according to the pixel value Pi at (x, y): DB(x,y)=cdf(Pi+1)*255 / cdf(16384); Among them, (x, y) represents the pixel coordinates, and Pi represents the pixel value at (x, y).

Citation Information

Patent Citations

  • FPGA (field programmable gate array)-based infrared image detail enhancing system and method

    CN103177429A

  • Self-adaptation equalization method based on extensible segmentation histogram

    CN104282004A

  • Real-time enhancement method for reducing edge fuzziness of infrared images

    CN106127704A

  • Document image processing including tokenization of non-textual semantic elements

    US20230351115A1

Cited By

  • Self-adaptive infrared image equalization method

    CN119540066A

  • An adaptive infrared image equalization method

    CN119540066B