A redistribution-based infrared segmented dual-platform histogram enhancement method

Through the use of heavy distribution of infrared dual -platform histogram enhancement methods in infrared image processing, the traditional method of changing the problem of poor robustness in the infrared scene at all times is solved, and a better local and global contrast optimization effect is achieved.

CN119228656BActive Publication Date: 2025-01-28JING LIN CHENGDU SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The traditional infrared image dual-platform histogram equalization algorithm is poorly robust in infrared scenes that change at all times and cannot effectively improve the contrast of the target.

Method used

Adopt the reinforcement method of the dual -platform dual -platform dual -platform dual -segmentation of infrared segments, and to process the general histogram of the original infrared data through statistics and segments, re -distribute the histogram, and carry out the histogram equilibrium, and the adaptive calculation of the upper and lower platform values.

Benefits of technology

This method does not require specific upper and lower platform values, which can meet the infrared scenes that are changing at all times, improve the optimization effect of local and global contrast, and enhance the robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228656B_ABST
    Figure CN119228656B_ABST
Patent Text Reader

Abstract

The present invention discloses an infrared segmented dual-platform histogram enhancement method based on redistribution, the method comprising the following steps: S1: Counting the total histogram HIST of the original infrared data DA, and performing segmentation processing on the total histogram HIST; S2: Redistributing the total histogram HIST to obtain a redistributed histogram Dh; S3: Performing histogram equalization on the redistributed histogram Dh to obtain an equalization result DB. The present invention does not need to set specific upper and lower platform values, and all adaptive calculations are performed, which can meet the infrared scenes that change at any time and has good robustness.
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:

[0005] S1: Count the total histogram HIST of the original infrared data DA, and perform segment processing on the total histogram HIST;

[0006] S2: Redistribute the total histogram HIST to obtain a redistributed histogram Dh;

[0007] S3: Perform histogram equalization on the redistributed histogram Dh to obtain a balanced result DB.

[0008] Furthermore, step S1 includes the following sub-steps:

[0009] S11: traverse all pixel points of the original infrared data DA and establish a total histogram HIST;

[0010] S12: Find all flat areas AllPi in the total histogram HIST;

[0011] S13: traverse all flat areas AllPi, and retain the two longest flat areas as segmented flat areas Pi;

[0012] 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.

[0013] 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:

[0014] ;

[0015] ;

[0016] 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.

[0017] Furthermore, the low temperature segment LD is the total histogram HIST from the left end point IL to P1 RP The data segment between

[0018] Conventional segment ND is P1 RP From P2 LP The data segment between

[0019] High temperature section HD is P2 LP The data segment from the right endpoint IR of the total histogram HIST.

[0020] Furthermore, step S2 includes the following sub-steps:

[0021] S21: traverse the total histogram HIST and redistribute the low temperature segment of the total histogram;

[0022] S22: traverse the total histogram HIST and redistribute the normal temperature segment of the total histogram;

[0023] S23: traverse the total histogram HIST and redistribute the high temperature segment of the total histogram.

[0024] Furthermore, step S21 includes the following sub-steps:

[0025] 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:

[0026] S212: Calculate the upper platform value TupLow and the lower platform threshold TdownLow of the low temperature segment:

[0027] ;

[0028] ;

[0029] 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;

[0030] S213: Low temperature segment of redistribution total histogram HIST:

[0031] ;

[0032] 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.

[0033] Further, step S22 includes the following sub-steps:

[0034] 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:

[0035] S222: Calculate the upper platform value TupNor and the lower platform threshold TdownNor of the normal temperature section:

[0036] ;

[0037] ;

[0038] 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;

[0039] S223: Normal temperature section of the redistribution total histogram HIST:

[0040] ;

[0041] 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.

[0042] Further, step S23 includes the following sub-steps:

[0043] 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:

[0044] S232: Calculate the upper platform value TupHigh and the lower platform value TdownHigh of the high temperature section:

[0045] ;

[0046] ;

[0047] 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;

[0048] S233: High temperature section of the redistribution total histogram HIST:

[0049] ;

[0050] 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.

[0051] Furthermore, step S3 includes the following sub-steps:

[0052] S31: Calculate the cumulative histogram cdf:

[0053] ;

[0054] S32: traverse the original infrared image data DA, and obtain the histogram equalization result DB according to the pixel value Pi at (x, y):

[0055] DB(x,y)=cdf(Pi+1)*255 / cdf(16384);

[0056] Among them, (x, y) represents the pixel coordinates, and Pi represents the pixel value at (x, y).

[0057] The beneficial effects of the present invention are:

[0058] 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;

[0059] 2. The present invention has better local contrast and global contrast in different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] 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.

[0061] Figure 1 It is a flow chart of the present invention;

[0062] Figure 2 is a flowchart of step S1;

[0063] Figure 3 is a flow chart of step S2;

[0064] Figure 4 This is a flowchart of step S3. DETAILED DESCRIPTION

[0065] 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.

[0066] 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.

[0067] 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.

[0068] See also Figure 1 , an infrared segmented dual-platform histogram enhancement method based on redistribution, comprising the following steps:

[0069] S1: Count the total histogram HIST of the original infrared data DA and perform segment processing on the histogram;

[0070] S2: Redistribute the total histogram HIST to obtain the redistributed histogram Dh;

[0071] S3: Perform histogram equalization on the redistributed histogram Dh.

[0072] 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:

[0073] S11: traverse all pixel points of the original infrared data DA and establish a total histogram HIST;

[0074] ;

[0075] in, , pi represents the pixel value at the (x, y) coordinate of the original infrared data DA.

[0076] S12: Find all flat areas AllPi in the total histogram HIST. The flat areas meet the following two conditions:

[0077] ;

[0078] ;

[0079] 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.

[0080] 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:

[0081] ;

[0082] ;

[0083] 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.

[0084] 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;

[0085] 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.

[0086] See also Figure 3 , step S2 redistributes the total histogram HIST to obtain a redistributed histogram Dhi, which specifically includes:

[0087] S21: traverse the total histogram HIST and redistribute the low temperature segment of the total histogram;

[0088] S22: traverse the total histogram HIST and redistribute the normal temperature segment of the total histogram;

[0089] S23: traverse the total histogram HIST and redistribute the high temperature segment of the total histogram.

[0090] Specifically, in step S21, the low temperature segment of the total histogram is redistributed, specifically including:

[0091] 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;

[0092] ;

[0093] ;

[0094] 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.

[0095] S212: Calculate the upper platform value TupLow and the lower platform threshold TdownLow of the low temperature segment;

[0096] ;

[0097] ;

[0098] 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.

[0099] S213: redistribute the low temperature segment of the total histogram HIST;

[0100] ;

[0101] Among them, k is the same as above.

[0102] Specifically, in step S22, redistributing the normal temperature section of the total histogram specifically includes:

[0103] S221: Counting the number of valid pixels numNorD and the number of invalid pixels numNorP in the normal temperature section in the total histogram;

[0104] ;

[0105] ;

[0106] 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.

[0107] S222: Calculate the upper platform value TupNor and the lower platform threshold TdownNor of the normal segment;

[0108] ;

[0109] ;

[0110] 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.

[0111] S223: Redistribute the regular segments of the total histogram HIST;

[0112] ;

[0113] Among them, k is the same as above.

[0114] Specifically, in S23, the high temperature section of the redistribution total histogram specifically includes:

[0115] 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;

[0116] ;

[0117] ;

[0118] 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.

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

[0120] ;

[0121] .

[0122] 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.

[0123] S233: redistribute the high temperature section of the total histogram HIST;

[0124] ;

[0125] Among them, k is the same as above.

[0126] See also Figure 4 In step S3, the redistributed histogram Dh is subjected to histogram equalization, which specifically includes:

[0127] S31: Calculate the cumulative histogram cdf;

[0128] ;

[0129] S32: traverse the original infrared image data DA, and obtain the histogram equalization result DB according to the pixel value pi at (x, y);

[0130] ;

[0131] Among them, (x, y) represents the pixel coordinates, and pi represents the pixel value at (x, y).

[0132] Based on the above embodiments, the present invention has at least the following technical effects:

[0133] 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.

[0134] 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.

[0135] 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: Counting the total histogram HIST of the original infrared data DA, and performing segment processing on the total histogram HIST; 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; Step S13 is specifically: traverse all flat areas AllPi, and 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 end point of the flat area; S14: according to the segmented flat area Pi, the total histogram HIST is divided into a low temperature segment LD, a normal segment ND, and a high temperature segment HD; the low temperature segment LD is the left end point IL to P1 of the total histogram HIST 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 from the right end point IR of the total histogram HIST; S2: Redistribute the total histogram HIST to obtain a redistributed histogram Dh; 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; 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 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.

3. The infrared segmented dual-platform histogram enhancement method based on redistribution according to claim 1, 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.

4. The infrared segmented dual-platform histogram enhancement method based on redistribution according to claim 1, 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.

5. The infrared segmented dual-platform histogram enhancement method based on redistribution according to claim 1, 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