An adaptive enhancement method for infrared images that can suppress overstretching

By introducing grayscale equal-spaced density equalization technology into infrared image enhancement, grayscale filling and equal-spaced rearrangement are performed, which solves the problem of over-stretching in low dynamic range, improves the enhancement quality and visual effects of infrared images, and is suitable for Infrared image enhancement under different conditions, with low computational complexity and high timeliness.

CN118735791BActive Publication Date: 2024-10-29CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411221158.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-10-29
Estimated Expiration
2044-09-02

AI Technical Summary

Technical Problem

Existing infrared image enhancement technology is prone to over-stretching under low dynamic range conditions, resulting in background noise amplification and affecting the observation effect. Moreover, the automatic calculation of the threshold value of the constant ratio of effective pixels is time-consuming, and the gray level rearrangement interval setting is deviated from the actual distribution. Insufficient adaptability, offset compensation calculations are unnecessary in infrared images.

Method used

Introducing gray equal-spaced density equalization technology, obtaining the gray histogram through statistics to set the effective gray level threshold, removing invalid gray levels, calculating the gray level filling range, performing gray level filling and equal interval rearrangement mapping, and suppressing Overstretch to improve the visual consistency and continuity of the image.

Benefits of technology

It effectively solves the problem of over-stretching, improves the enhancement quality and visual effects of infrared images, is suitable for infrared image enhancement under different conditions, has low computational complexity and high timeliness, and the single frame processing time is less than 1ms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735791B_ABST
    Figure CN118735791B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image enhancement technology, and specifically provides an infrared image adaptive enhancement method that can suppress over-stretching. First, the effective grayscale threshold is determined based on experience or existing methods, and the grayscale with the number of pixels below the threshold in the grayscale histogram of the infrared image is removed; in order to suppress the problem of over-enhancement under low dynamic range conditions, a grayscale filling range is selected near the grayscale mean, and part of the grayscale is filled with pixels, and then the filled histogram is subjected to grayscale equal-pitch density equalization processing. The present invention not only has the advantages of small computational complexity, good timeliness, and strong adaptability of traditional grayscale equal-pitch density equalization technology, but also can solve the problem of over-stretching existing in traditional grayscale equal-pitch density equalization technology, and avoids the background noise of the infrared image from being amplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image enhancement, and in particular provides an infrared image adaptive enhancement method capable of suppressing excessive stretching. Background Art

[0002] Infrared band image detectors directly sense and image the infrared radiation energy of objects. They are not restricted by lighting conditions and have a certain penetration ability under observation conditions with poor visibility. Therefore, the application of infrared imaging equipment is becoming more and more widespread. The original infrared image is generally a 14-bit grayscale image, while the image display is generally an 8-bit grayscale image. Therefore, the imaging display of infrared images generally requires 14-bit to 8-bit stretching and enhancement processing. In addition to ensuring that the single-frame image has a high contrast, the real-time enhancement processing of infrared images should also consider the real-time nature of the processing algorithm and the continuity of the enhancement effect between image sequence frames.

[0003] There are usually two types of methods in existing image enhancement technology: frequency domain method and spatial domain method. The frequency domain method is to perform some kind of operation on the transformation value of the image in a certain transformation domain of the image (usually the frequency domain), and then transform it back to the spatial domain. Since the frequency domain method requires two transformation domain conversions, the amount of calculation is generally large. As the image resolution of imaging equipment becomes higher and higher, the conventional frequency domain method gradually cannot meet the real-time processing requirements. The spatial domain method mainly processes and calculates the grayscale value of the image pixel directly in the spatial domain. Therefore, in real-time image enhancement processing, the spatial domain method is more widely used.

[0004] Typical spatial domain enhancement methods include linear transformation, nonlinear transformation, histogram method and related derivative algorithms. In the linear transformation method, each gray level maintains the same rate of change, making it difficult to highlight some important gray details; its derived piecewise linear transformation method, although it can highlight the gray level range that needs to be observed, generally requires manual setting of the gray level points of each segment, and has poor adaptability. Nonlinear transformation, such as logarithmic transformation and gamma transformation, generally sets parameters specifically for known gray level distribution defects of the image, and has poor flexibility. The typical histogram equalization method can achieve balanced presentation of each gray level in the image, but it often causes the amplification of useless gray levels and interference noise.

[0005] Grayscale equidistant density equalization method is also a histogram enhancement method. The basic idea of ​​this method is to first remove the grayscale that does not exist or has a small number of pixels in the image, and rearrange the other valid grayscales in the grayscale mapping space with equal spacing. Therefore, this method ensures that the effective grayscale is fully expanded while maintaining the distribution ratio of each grayscale in the original image. Therefore, this method has a good performance in real-time enhancement of infrared images. However, this algorithm has the following defects: when the dynamic range of the image is narrow, there is a problem of over-enhancement, which leads to excessive amplification of the image background noise and affects the observation effect.

[0006] The Chinese patent publication number is CN112991240A, and the publication date is June 18, 2021. The patent name is "An image adaptive enhancement algorithm for real-time image enhancement". The invention patent application is based on the grayscale equal spacing density equalization method. For the threshold of invalid grayscale, it proposes an automatic calculation method for the threshold of the effective pixel constant ratio, and sets an upper limit on the grayscale rearrangement interval. In addition, in order to prevent the problem of large changes in the overall brightness of the visible image, a bias compensation calculation after rearrangement is proposed. However, this method still has the following shortcomings:

[0007] First, the automatic threshold calculation method for a constant ratio of effective pixels designs multiple rounds of iterative statistics of the threshold, which is relatively time-consuming.

[0008] Second, the upper limit setting of the grayscale rearrangement interval is out of touch with the actual grayscale statistical distribution of the image, which makes the enhancement effect less adaptable.

[0009] Third, for infrared images, the background of the stretched image is generally black, and no bias compensation calculation is required. Using the patented method for bias compensation calculation will cause unnecessary computational redundancy for infrared enhancement processing. Summary of the invention

[0010] In order to solve the above problems, the present invention provides an infrared image adaptive enhancement method which can suppress over-stretching. Based on the grayscale equidistant density equalization technology, a partial grayscale filling strategy is introduced, which effectively alleviates the over-stretching phenomenon that may occur in the image enhancement process. It can not only ensure that the continuous infrared image sequence maintains a consistent visual effect during the real-time enhancement process, but also significantly improve the enhancement quality of a single-frame image.

[0011] The infrared image adaptive enhancement method capable of suppressing overstretching provided by the present invention comprises:

[0012] S1: Statistically obtain the grayscale histogram of the infrared image to be processed and set the effective grayscale threshold TH;

[0013] S2: The grayscale whose number of pixels in the grayscale histogram is less than the valid grayscale threshold TH is regarded as an invalid grayscale, and the number of pixels of the invalid grayscale is set to 0;

[0014] S3: Calculate the grayscale mean of the infrared image , and the grayscale filling range is determined by the following formula :

[0015] ;

[0016] ;

[0017] in, Indicates the starting gray level to be filled. Indicates the final gray level that needs to be filled. Indicates the preset number of gray levels that need to be filled, and n represents the bit depth of the infrared image;

[0018] The preset number of grayscale fills per grayscale fill range pixels;

[0019] S4: Perform grayscale equal-pitch density equalization processing on the infrared image processed by S3 to complete the enhancement transformation of the infrared image.

[0020] Preferably, the effective gray level threshold TH has a value interval of .

[0021] Preferably, the grayscale mean is calculated according to the following formula: :

[0022] ;

[0023] in, Indicates the grayscale histogram without removing invalid grayscale levels. The number of pixels in grayscale, .

[0024] Preferably, in S3, each gray level within the gray level filling range is filled according to the following formula:

[0025] ;

[0026] in, Indicates the grayscale histogram after S3 fills the pixel. The number of pixels in grayscale, Indicates the grayscale histogram with invalid grayscale levels removed. The number of pixels in grayscale.

[0027] Preferably, the number of pixels The value range of .

[0028] Preferably, S4 includes:

[0029] S41: Within the range, traverse each gray level in the gray histogram after S3 fills the pixels, and perform gray level sorting and mapping according to the number of pixels corresponding to each gray level. The mapping rule is:

[0030] ;

[0031] in, Indicates Gray level sequence number after gray level sorting mapping;

[0032] S42: Calculate the The mapped gray value p after gray level sorting mapping:

[0033] ;

[0034] in, Represents the grayscale interval after equal spacing rearrangement, , m represents the image bit depth after enhancement transformation, .

[0035] Preferably, the bit depth n of the infrared image is 8.

[0036] Compared with the prior art, the present invention can achieve the following beneficial effects:

[0037] The present invention is based on the grayscale equidistant density balanced enhancement technology. In order to suppress the problem of over-enhancement in low dynamic range conditions, before equal-interval rearrangement, part of the grayscale is first filled near the image grayscale mean, and then equal-interval rearrangement mapping processing is performed, which effectively solves the over-stretching problem existing in the prior art and improves the visual consistency and continuity of the enhanced image.

[0038] The present invention has good applicability and can achieve relatively ideal infrared enhancement effects under different shooting periods, different weather conditions, and different shooting scenes (ground scenes, aerial scenes, sea and sky scenes, etc.); for continuous infrared image sequences, it can better avoid the interference of small-scale local changes in the image on the overall enhancement effect, and has good enhancement effect continuity and anti-interference ability.

[0039] In addition, the present invention has the advantages of small amount of calculation, good timeliness, etc. For an infrared image with a resolution of 640×512, the single-frame processing time is less than 1 ms. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1is a flow chart of an infrared image adaptive enhancement method capable of suppressing over-stretching provided by an embodiment of the present invention;

[0041] Figure 2 is a diagram comparing the processing process of the method of the present invention provided according to an embodiment of the present invention and the traditional grayscale equal spacing density equalization technology;

[0042] Figure 3 It is a comparison diagram of the effects of enhancing a conventional dynamic range infrared image through a traditional grayscale equal spacing density equalization technology according to an embodiment of the present invention;

[0043] Figure 4 This is a comparison diagram of the effects of enhancing a low dynamic range infrared image provided by an embodiment of the present invention through a traditional grayscale equidistant density equalization technology. DETAILED DESCRIPTION

[0044] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the following description, the same modules are represented by the same reference numerals. In the case of the same reference numerals, their names and functions are also the same. Therefore, the detailed description thereof will not be repeated.

[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and do not constitute a limitation of the present invention.

[0046] like Figure 1 As shown, an embodiment of the present invention provides an infrared image adaptive enhancement method capable of suppressing over-stretching, and performs real-time enhancement on a continuous infrared image sequence, specifically comprising the following steps:

[0047] S1: Get the infrared image to be processed in the current frame. Before enhancing the infrared image, preprocessing can be performed according to the actual situation of the infrared image. Generally, in order to meet the processing requirements of the imaging device, the acquired infrared image is artificially superimposed with additional information by the device at a specified position. Usually, identification information is added to the first or last line of each frame or part of the infrared image. This type of information does not belong to the image recording information, and it will affect the grayscale histogram distribution of the entire frame of the infrared image. Therefore, if the infrared image has such information that is irrelevant to the actual grayscale level of the image, it needs to be replaced with the grayscale value of the surrounding image before image enhancement to eliminate the influence of irrelevant information on subsequent image enhancement; if there is no irrelevant information, the preprocessing process can be ignored.

[0048] After the infrared image is preprocessed, the grayscale histogram of the infrared image is statistically obtained and the effective grayscale threshold TH is set. The obtained grayscale histogram can be expressed as , , Indicates any Gray level, n represents the bit depth of the infrared image. In the embodiment of the present invention, the bit depth of the infrared image is n=8. That is, any The number of pixels corresponding to the gray level. The embodiment of the present invention can directly use the existing algorithm to calculate the effective gray level threshold TH. In addition, in order to reduce the complexity and calculation amount of the method of the present invention, the effective gray level threshold TH can be directly set manually based on experience and combined with actual conditions, and the value range of the empirical value recommendation is [0, 5].

[0049] S2: After setting the effective gray level threshold TH, the gray level histogram The gray level whose number of pixels is less than the effective gray level threshold TH is called invalid gray level. The number of pixels of invalid gray levels in is set to 0, and the invalid gray levels are removed. The gray histogram after removing the invalid gray levels is expressed as , that is, after removing the invalid gray levels, any The number of pixels in grayscale.

[0050] like Figure 2 As shown in the figure, after removing the invalid gray levels, the traditional grayscale equal spacing density equalization algorithm directly maps the remaining gray levels in the mapping grayscale range with equal spacing, so that the invalid gray levels are compressed and the valid gray levels are widened, realizing the expansion of image details and the enhancement of image contrast. Figure 3 As shown in the figure, (a) is the original image without enhancement, and (b) is the image obtained after enhancement. The traditional grayscale equal spacing density equalization algorithm has a good effect in processing infrared images with a conventional dynamic range. However, when the dynamic range of the infrared image is narrow, such as Figure 4 As shown, (c) is the original image with low dynamic range, and (d) is the enhanced low dynamic range enhanced image. It can be seen from the figure that the traditional grayscale equidistant density equalization algorithm over-stretches the original image, thereby amplifying the background noise of the image.

[0051] S3: In order to suppress the problem of over-enhancement in the case of low dynamic range, the embodiment of the present invention needs to perform grayscale filling before performing equal interval rearrangement to suppress over-stretching. Specifically, according to the grayscale histogram with invalid grayscale removed, Calculate the grayscale mean of the infrared image , grayscale mean The calculation formula is:

[0052] .

[0053] The gray mean As the starting gray level for grayscale filling ,Right now:

[0054] .

[0055] From the starting gray level Start continuous selection grayscale filling pixels, and the ending grayscale of grayscale filling is expressed as , when the gray mean When larger, fill There may be overflow in the gray level, so the gray level is terminated. It can be expressed as:

[0056] .

[0057] The number of gray levels to fill Determines the degree of inhibition to prevent overstretching, The larger the value, the greater the strength of suppressing excessive stretching, and vice versa. The specific calculation method is as follows:

[0058] ;

[0059] in, is an empirical value, ranging from .

[0060] will fill the range in grayscale Each gray level in the Represents the grayscale histogram after filling pixels. The number of filled pixels It can be determined according to the actual situation. The value of should not be too large to avoid the grayscale of the infrared image itself being affected by the filling pixels. The recommended value range is .

[0061] S4: After completing the removal of invalid gray levels in the histogram and gray level filling, the gray level histogram after the filled pixels can be Perform grayscale equal spacing density equalization processing, the specific transformation process is as follows:

[0062] S41: Within the range, traverse the grayscale histogram in turn Each gray level in , gray level sorting and mapping are performed according to the number of pixels corresponding to each gray level, and the mapping rule is:

[0063] ;

[0064] in, Indicates Gray level sequence number after gray level sorting mapping; when the Grayscale pixels When it is greater than 0, it means that the gray level is a valid gray level or a filled gray level. Grayscale number corresponding to the grayscale enhancement transformation The previous gray level number Add 1; when Grayscale pixels When it is equal to 0, it means that the gray level is invalid and no pixels are filled. Therefore, the gray level number corresponding to the gray level enhancement transformation is assigned to its previous gray level number. .

[0065] S42: Calculate the The mapped gray value p after gray level sorting mapping:

[0066] ;

[0067] in, It represents the gray level interval after equal spacing rearrangement, and its calculation formula is:

[0068] ;

[0069] Among them, m represents the image bit depth after enhancement transformation, is the number of gray levels involved in equal spacing rearrangement

[0070] .

[0071] After the current frame infrared image is mapped pixel by pixel according to the mapping rule, the enhancement processing of the single frame infrared image is realized.

[0072] Based on the prior art, the method of the present invention solves the problems of excessive stretching and amplification of background noise when enhancing low dynamic range infrared images.

[0073] Although the embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. Those skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

[0074] The above specific implementations of the present invention do not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. An infrared image adaptive enhancement method capable of suppressing overstretching, characterized in that: include: S1: Statistically obtain the grayscale histogram of the infrared image to be processed and set the effective grayscale threshold TH; S2: The grayscale level whose number of pixels in the grayscale histogram is less than the valid grayscale threshold TH is regarded as an invalid grayscale level, and the number of pixels of the invalid grayscale level is set to 0; S3: Calculate the grayscale mean of the infrared image , and the grayscale filling range is determined by the following formula : ; ; in, Indicates the starting gray level to be filled. Indicates the final gray level that needs to be filled. Indicates the preset number of gray levels that need to be filled, and n represents the bit depth of the infrared image; Each gray level in the gray level filling range is filled with a preset number of pixels; S4: performing grayscale equal-pitch density equalization processing on the infrared image processed by S3 to complete the enhancement transformation of the infrared image.

2. The infrared image adaptive enhancement method capable of suppressing overstretching according to claim 1, characterized in that: The effective gray level threshold TH has a value range of .

3. The infrared image adaptive enhancement method capable of suppressing overstretching according to claim 1, characterized in that: According to the grayscale mean value described by the following formula : ; in, Indicates that the grayscale histogram of the invalid grayscale level is not removed. The number of pixels in grayscale, .

4. The infrared image adaptive enhancement method capable of suppressing overstretching according to claim 1, characterized in that: In S3, each gray level within the gray level filling range is filled according to the following formula: ; in, It means the gray histogram after the pixel is filled by S3. The number of pixels in grayscale, Indicates that the grayscale histogram has been removed from the invalid grayscale level. The number of pixels in grayscale.

5. The infrared image adaptive enhancement method capable of suppressing overstretching according to claim 4, characterized in that: Number of pixels The value range of .

6. The infrared image adaptive enhancement method capable of suppressing overstretching according to claim 1, characterized in that: The S4 includes: S41: Within the range, each gray level in the gray histogram after the S3 filling pixel is traversed, and gray level sorting and mapping is performed according to the number of pixels corresponding to each gray level. The mapping rule is: ; in, Indicates Gray level sequence number after gray level sorting mapping; S42: Calculate the The mapped gray value p after gray level sorting mapping: ; in, Represents the grayscale interval after equal spacing rearrangement, , m represents the image bit depth after enhancement transformation, is the number of gray levels involved in equal spacing rearrangement, .

7. The infrared image adaptive enhancement method capable of suppressing overstretching according to claim 1, characterized in that: The bit depth of infrared images is n=8.

Citation Information

Patent Citations

  • Image adaptive enhancement algorithm for real-time image enhancement

    CN112991240A

  • Infrared image enhancement method based on improved histogram equalization and enhanced high-pass filtering

    CN114418904A