Infrared image enhancement methods, apparatus, equipment, storage media and products

By decomposing infrared images into low-frequency and high-frequency layers and performing adaptive dynamic range compression and enhancement processing on them respectively, the problem of mutual constraint between contrast and noise suppression in existing technologies is solved, and efficient dynamic range compression and detail enhancement of infrared images are achieved.

CN122335637APending Publication Date: 2026-07-03CHENGDU WEIHEIDE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU WEIHEIDE TECH CO LTD
Filing Date
2026-03-27
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing dynamic range compression methods for infrared images struggle to achieve adaptive contrast adjustment while preserving detail and suppressing noise, resulting in reduced image contrast and amplified noise.

Method used

Infrared images are decomposed into low-frequency and high-frequency layers, and adaptive dynamic range compression and enhancement are performed on them respectively. Contrast preservation and noise suppression are achieved by adaptively adjusting the compression strategy and nonlinear mapping function.

Benefits of technology

It achieves the goal of maintaining the contrast between the subject and the background, enhancing edge details and suppressing background noise during dynamic range compression, thus avoiding loss of detail and amplification of noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122335637A_ABST
    Figure CN122335637A_ABST
Patent Text Reader

Abstract

This application discloses an infrared image enhancement method, apparatus, device, storage medium, and product, relating to the field of image processing technology. The infrared image enhancement method includes: acquiring a preprocessed infrared image; decomposing the preprocessed infrared image into a low-frequency layer image and a high-frequency layer image; performing adaptive dynamic range compression processing on the low-frequency layer image; performing enhancement processing on the high-frequency layer image; and fusing the processed low-frequency layer image and the processed high-frequency layer image to generate an output image. This application decomposes the infrared image into low-frequency and high-frequency layers for independent processing, dynamically adjusting the compression strategy based on the image's grayscale distribution characteristics. While effectively compressing the dynamic range to adapt to the display bit depth, it maintains an appropriate contrast between the subject and the background, ultimately achieving dynamic range compression of the infrared image to adapt to the display bit depth while avoiding detail loss and noise amplification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to infrared image enhancement methods, apparatus, devices, storage media, and products. Background Technology

[0002] Infrared thermal imaging technology generates temperature distribution images by detecting the infrared energy radiated by objects, and is widely used in industrial inspection, security monitoring, medical diagnosis, and vehicle night vision. In related technologies, infrared sensors typically output raw data with a bit depth of 14 bits or higher, and their dynamic range can reach thousands or even tens of thousands of gray levels, far exceeding the display capabilities of conventional 8-bit display devices. Therefore, dynamic range compression of high-bit-depth infrared images is necessary to adapt them to display devices. Common dynamic range compression methods include linear stretching, histogram equalization, and contrast-limited adaptive histogram equalization. Linear stretching maps the entire temperature range linearly to the display grayscale range. When there is a large temperature difference in the scene, the contrast between the effective target and the background is over-compressed, resulting in reduced image contrast and difficulty in discerning details. Histogram equalization enhances contrast by redistributing pixel grayscale, but it easily over-stretches noise in the background area, causing an unnatural grainy appearance in the image. Contrast-limited adaptive histogram equalization (HQE) algorithms improve the uniformity of contrast stretching through block processing and histogram cropping. However, its block processing method easily introduces obvious block artifacts and has high computational complexity, making it difficult to implement in real-time on embedded devices. Furthermore, existing technologies have also proposed decomposing images into low-frequency and high-frequency layers for separate processing. However, these schemes typically employ a global mapping strategy when processing low-frequency layers, making it difficult to adapt to the grayscale distribution characteristics of different temperature scenarios. When processing high-frequency layers, they often use a simple high-frequency amplification strategy, resulting in simultaneous enhancement of noise and detail, failing to achieve effective noise suppression. More importantly, there is a mutual constraint between dynamic range compression, detail enhancement, and noise suppression in existing technologies. Compressing the dynamic range tends to smooth out details, while enhancing details tends to amplify noise, making it difficult to achieve a balance among the three. Summary of the Invention

[0003] The main objective of this application is to provide an infrared image enhancement method, apparatus, device, storage medium, and product, aiming to solve the technical problem of how to perform dynamic range compression of infrared images to adapt to the display bit depth while avoiding loss of detail and amplification of noise.

[0004] To achieve the above objectives, this application proposes an infrared image enhancement method, the method comprising:

[0005] Acquire the preprocessed infrared image; The preprocessed infrared image is decomposed into a low-frequency layer image and a high-frequency layer image; Adaptive dynamic range compression is performed on the low-frequency layer image; Enhancement processing is performed on the high-frequency layer image; The processed low-frequency layer image is fused with the processed high-frequency layer image to generate an output image.

[0006] In one embodiment, the step of performing adaptive dynamic range compression on the low-frequency layer image includes: Multiple grayscale ranges are dynamically divided based on the histogram features of the low-frequency layer image; Determine the compression ratio corresponding to each of the aforementioned grayscale ranges; Based on each of the compression ratios, a mapping curve segment corresponding to each of the grayscale ranges is generated; The complete mapping curve obtained by combining the mapping curve segments converts the low-frequency layer image from the first depth to the second depth.

[0007] In one embodiment, the step of dynamically dividing multiple grayscale intervals based on the histogram features of the low-frequency layer image includes: Calculate the histogram and cumulative histogram of the low-frequency layer image; Based on the preset shadow ratio coefficient and highlight ratio coefficient, the shadow threshold and highlight threshold of the low-frequency layer image are calculated respectively. The gray value corresponding to the first time the cumulative histogram reaches or exceeds the shadow threshold is determined as the upper boundary of the low gray value range, and the gray value corresponding to the first time the cumulative histogram reaches or exceeds the highlight threshold is determined as the upper boundary of the main gray value range. The minimum gray value of the low-frequency layer image is taken as the lower bound of the low gray-level range, and the maximum gray value of the low-frequency layer image is taken as the upper bound of the high gray-level range. The gray-level range is divided into the low gray-level range, the main gray-level range, and the high gray-level range by the upper bound of the low gray-level range and the upper bound of the main gray-level range.

[0008] In one embodiment, the step of determining the compression ratio corresponding to each grayscale range includes: Calculate the dynamic range value of the grayscale interval of the main body; When the dynamic range value is greater than or equal to a preset threshold, a preset number of main gray levels are allocated to the main gray range; When the dynamic range value is less than the preset threshold, the number of main gray levels allocated in the main gray range is determined according to the ratio of the dynamic range value to the preset minimum compression ratio. The number of low gray levels allocated to the low gray level range is determined based on the ratio of the width of the low gray level range to the preset minimum compression ratio. The number of high grayscale levels allocated to the high grayscale range is determined based on the ratio of the width of the high grayscale range to the preset minimum compression ratio.

[0009] In one embodiment, the step of generating the mapping curve segment corresponding to each grayscale range based on each compression ratio includes: For the low grayscale range, a low-mapping curve segment is generated based on the cumulative distribution value corresponding to the low grayscale range in the cumulative histogram and the number of low grayscale levels; For the main grayscale range, a main mapping curve segment is generated based on the cumulative distribution value corresponding to the main grayscale range in the cumulative histogram and the number of main grayscale levels; For the high grayscale range, a high mapping curve segment is generated based on the cumulative distribution value corresponding to the high grayscale range in the cumulative histogram and the number of high grayscale levels; The low-level mapping curve segment, the main mapping curve segment, and the high-level mapping curve segment are spliced ​​together in grayscale order to form the complete mapping curve.

[0010] In one embodiment, the step of performing enhancement processing on the high-frequency layer image includes: The high-frequency layer image is subjected to bilateral filtering. A hyperbolic tangent function is constructed as a nonlinear mapping function. The absolute value of the filtered high-frequency layer image is input into the hyperbolic tangent function to obtain the mapping coefficients. The mapping coefficients are multiplied by the filtered high-frequency layer image to obtain the nonlinearly adjusted high-frequency layer image. Obtain the dynamic range value of the grayscale range of the main subject in the low-frequency layer image, and calculate the high-frequency gain based on the dynamic range value; The enhanced high-frequency layer image is obtained by multiplying the nonlinearly adjusted high-frequency layer image with the high-frequency gain.

[0011] Furthermore, to achieve the above objectives, this application also proposes an infrared image enhancement device, which includes: The acquisition module is used to acquire preprocessed infrared images; The decomposition module is used to decompose the preprocessed infrared image into a low-frequency layer image and a high-frequency layer image; The compression module is used to perform adaptive dynamic range compression processing on the low-frequency layer image; An enhancement module is used to perform enhancement processing on the high-frequency layer image; The fusion module is used to fuse the processed low-frequency layer image with the processed high-frequency layer image to generate an output image.

[0012] In addition, to achieve the above objectives, this application also proposes an infrared image enhancement device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the infrared image enhancement method as described above.

[0013] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the infrared image enhancement method described above.

[0014] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the infrared image enhancement method described above.

[0015] One or more technical solutions proposed in this application have at least the following technical effects: Compared to related technologies where dynamic range compression, detail enhancement, and noise suppression are mutually restrictive and difficult to simultaneously meet the requirements of display adaptation, contrast preservation, and noise suppression, this application obtains a pre-processed infrared image; decomposes the pre-processed infrared image into a low-frequency layer image and a high-frequency layer image; performs adaptive dynamic range compression processing on the low-frequency layer image; performs enhancement processing on the high-frequency layer image; and fuses the processed low-frequency layer image and the processed high-frequency layer image to generate an output image. Understandably, this application employs a frequency-division processing architecture. When an infrared image is decomposed into a low-frequency layer and a high-frequency layer, the contrast compression task and the detail enhancement task are independently optimized by assigning them to different domains, thereby decoupling dynamic range compression and detail preservation. When performing adaptive dynamic range compression processing on the low-frequency layer, the compression strategy is adaptively adjusted according to the histogram characteristics of the low-frequency layer image, thereby achieving adaptive preservation of the contrast between the subject and the background under different temperature difference scenarios. When performing enhancement processing on the high-frequency layer, filtering and nonlinear mapping are applied to the high-frequency layer to enhance edge details while suppressing noise amplification. When the processed low-frequency layer and high-frequency layer are fused, the independently optimized low-frequency components are superimposed with the high-frequency components, thereby achieving organic integration of the compressed background contrast and the enhanced detail information. Therefore, based on the frequency division processing architecture, dynamic range compression, detail enhancement and noise suppression can be synergistically optimized. This ensures that during the process of dynamically compressing infrared images to adapt to the display bit depth, the contrast between the subject and the background is maintained, edge details are enhanced, and background noise is effectively suppressed. Ultimately, this achieves the goal of dynamically compressing infrared images to adapt to the display bit depth while avoiding loss of detail and amplification of noise. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating an embodiment of the infrared image enhancement method of this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the infrared image enhancement method of this application; Figure 3 A simplified flowchart illustrating the infrared image enhancement method provided in this application embodiment; Figure 4 This is a schematic diagram of the module structure of the infrared image enhancement device according to an embodiment of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the infrared image enhancement method in the embodiments of this application.

[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0020] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0022] The main solution in this application embodiment is: Acquire the preprocessed infrared image; The preprocessed infrared image is decomposed into a low-frequency layer image and a high-frequency layer image; Adaptive dynamic range compression is performed on the low-frequency layer image; Enhancement processing is performed on the high-frequency layer image; The processed low-frequency layer image is fused with the processed high-frequency layer image to generate an output image.

[0023] In this embodiment, the application uses an infrared image enhancement device as the execution subject. For ease of description, it will be referred to as "device" in detail below.

[0024] Because existing technologies for dynamic range compression, detail enhancement, and noise suppression are mutually restrictive, it is difficult to simultaneously meet the requirements for display adaptation, contrast maintenance, and noise suppression.

[0025] This application provides a solution employing a frequency-division processing architecture. When an infrared image is decomposed into a low-frequency layer and a high-frequency layer, the contrast compression task and the detail enhancement task are independently optimized by assigning them to different domains, thereby decoupling dynamic range compression and detail preservation. When performing adaptive dynamic range compression processing on the low-frequency layer, the compression strategy is adaptively adjusted based on the histogram characteristics of the low-frequency layer image, thereby achieving adaptive preservation of the subject-target and background contrast under different temperature difference scenarios. When performing enhancement processing on the high-frequency layer, filtering and nonlinear mapping are applied to the high-frequency layer to enhance edge details while suppressing noise amplification. When the processed low-frequency layer and high-frequency layer are fused, the independently optimized low-frequency components are superimposed with the high-frequency components, thereby achieving organic integration of compressed background contrast and enhanced detail information. Therefore, based on the frequency division processing architecture, dynamic range compression, detail enhancement and noise suppression can be synergistically optimized. This ensures that during the process of dynamically compressing infrared images to adapt to the display bit depth, the contrast between the subject and the background is maintained, edge details are enhanced, and background noise is effectively suppressed. Ultimately, this achieves the goal of dynamically compressing infrared images to adapt to the display bit depth while avoiding loss of detail and amplification of noise.

[0026] Based on this, embodiments of this application provide an infrared image enhancement method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the infrared image enhancement method of this application.

[0027] In this embodiment, the infrared image enhancement method includes steps S10 to S50: Step S10: Obtain the preprocessed infrared image; It should be noted that the preprocessed infrared image refers to the image after a series of corrections and filtering processes on the data acquired by the original infrared sensor. The original infrared sensor data is typically a 14-bit or higher bit-depth digital signal, with a dynamic range far exceeding the display capabilities of conventional display devices. Preprocessing operations include, but are not limited to, non-uniformity correction, temporal filtering, background correction, and vertical stripe removal. Non-uniformity correction eliminates fixed-pattern noise caused by inconsistencies in the response of individual pixels in the infrared sensor; temporal filtering reduces random noise; background correction eliminates fixed-pattern noise; and vertical stripe removal corrects column-oriented non-uniformity. After these preprocessing steps, the basic image data is obtained and can be used for subsequent enhancement processing.

[0028] Understandably, by acquiring preprocessed infrared images, various noises and distortions caused by the sensor's own characteristics are eliminated, providing high-quality basic data for subsequent frequency division processing and enhancement operations, thereby ensuring the stability and reliability of the final enhancement effect.

[0029] Step S20: Decompose the preprocessed infrared image into a low-frequency layer image and a high-frequency layer image; It should be noted that the low-frequency layer image refers to the image components extracted after convolving the preprocessed infrared image with a low-pass filter, representing large-scale changes in temperature distribution and background information in the image. The high-frequency layer image refers to the image components obtained by subtracting the low-frequency layer image from the preprocessed infrared image, representing detailed information such as edges and textures, as well as noise components in the image. The low-pass filter includes, but is not limited to, Gaussian filters, mean filters, or bilateral filters.

[0030] It is understandable that by decomposing the infrared image into low-frequency and high-frequency layers, the separation of different attribute information in the image is achieved. This allows subsequent steps to adopt different optimization strategies for the background contrast requirements of the low-frequency layer and the detail enhancement requirements of the high-frequency layer, thus avoiding the problem of mutual constraints between dynamic range compression and detail enhancement when processing in a single domain.

[0031] Step S30: Perform adaptive dynamic range compression processing on the low-frequency layer image; It should be noted that adaptive dynamic range compression processing refers to the process of adaptively converting a low-frequency layer image from a high bit depth to a low bit depth based on its own gray-level distribution characteristics. This process includes dynamically dividing the low-frequency layer image into multiple gray-level intervals based on its histogram characteristics, determining the compression ratio for each gray-level interval, generating mapping curve segments for each gray-level interval based on the compression ratio, and converting the low-frequency layer image from a first bit depth to a second bit depth using the complete mapping curve obtained by combining the mapping curve segments. The gray-level intervals include, but are not limited to, low gray-level intervals, main gray-level intervals, and high gray-level intervals, corresponding to the background area, target subject area, and bright interference area in the infrared image, respectively. The compression ratio refers to the mapping slope of the gray-level allocation during the conversion process, used to control the contrast performance of that interval in the output image. The first bit depth refers to the original bit depth of the input low-frequency layer image, and the second bit depth refers to the display bit depth of the output image.

[0032] It is understandable that by performing adaptive dynamic range compression on the low-frequency layer image, the intervals are dynamically divided according to the actual gray-scale distribution characteristics of the image and the compression ratio is determined for each interval. This allows the main target area to obtain appropriate contrast performance under different temperature difference scenarios, while the background area and the bright interference area are effectively suppressed, thus achieving a balance between dynamic range compression and maintaining the contrast of the main subject.

[0033] Step S40: Perform enhancement processing on the high-frequency layer image; It should be noted that enhancement processing refers to a series of operations performed on the high-frequency layer image to enhance detail information while suppressing noise. This processing includes: bilateral filtering of the high-frequency layer image; constructing a hyperbolic tangent function as a nonlinear mapping function; inputting the absolute value of the filtered high-frequency layer image into the hyperbolic tangent function to obtain mapping coefficients, which are then multiplied by the filtered high-frequency layer image to obtain a nonlinearly adjusted high-frequency layer image; obtaining the dynamic range value of the main grayscale interval in the low-frequency layer image and calculating the high-frequency gain based on this dynamic range value; and multiplying the nonlinearly adjusted high-frequency layer image by the high-frequency gain to obtain the enhanced high-frequency layer image. Bilateral filtering is an edge-preserving filtering algorithm that smooths noise while maintaining edge information. The hyperbolic tangent function is an S-shaped function whose mapping characteristics can suppress high-frequency components with small amplitudes and compress high-frequency components with large amplitudes. The high-frequency gain is a coefficient used to adjust the enhancement intensity of high-frequency components, and its magnitude is positively correlated with the dynamic range value of the main grayscale interval in the low-frequency layer.

[0034] Understandably, by performing enhancement processing on the high-frequency layer image, firstly, bilateral filtering is used to remove random noise in the high-frequency layer and preserve edges. Then, the remaining high-frequency components are nonlinearly adjusted using the hyperbolic tangent function, so that weak noise is suppressed while significant edges are preserved. Finally, the high-frequency gain is adaptively adjusted according to the scene temperature difference reflected by the low-frequency layer, which enhances details when the temperature difference is large and avoids noise amplification when the temperature difference is small, thus achieving synergistic optimization of detail enhancement and noise suppression.

[0035] Step S50: The processed low-frequency layer image and the processed high-frequency layer image are fused to generate an output image.

[0036] It should be noted that fusion refers to the process of superimposing and combining a low-frequency layer image that has undergone adaptive dynamic range compression with a high-frequency layer image that has undergone enhancement. This process includes adding the processed low-frequency layer image and the enhanced high-frequency layer image pixel by pixel, and performing a saturation truncation operation on the superimposed result to ensure that the output pixel value falls within a preset output bit depth range.

[0037] Understandably, by fusing the independently optimized low-frequency layer with the high-frequency layer, the good background contrast after compression and the optimized edge details after enhancement are integrated at the pixel level, ultimately generating an output infrared image that meets the display bit depth requirements and has clear details and suitable contrast.

[0038] This embodiment provides an infrared image enhancement method that employs a frequency-division processing architecture. When the infrared image is decomposed into a low-frequency layer and a high-frequency layer, the contrast compression task and the detail enhancement task are independently optimized by assigning them to different domains, thereby decoupling dynamic range compression and detail preservation. When performing adaptive dynamic range compression processing on the low-frequency layer, the compression strategy is adaptively adjusted according to the histogram characteristics of the low-frequency layer image, thereby achieving adaptive preservation of the contrast between the subject and the background under different temperature difference scenarios. When performing enhancement processing on the high-frequency layer, filtering and nonlinear mapping are applied to the high-frequency layer to enhance edge details while suppressing noise amplification. When the processed low-frequency layer and high-frequency layer are fused, the independently optimized low-frequency components are superimposed with the high-frequency components, thereby achieving organic integration of the compressed background contrast and the enhanced detail information. Therefore, based on the frequency division processing architecture, dynamic range compression, detail enhancement and noise suppression can be synergistically optimized. This ensures that during the process of dynamically compressing infrared images to adapt to the display bit depth, the contrast between the subject and the background is maintained, edge details are enhanced, and background noise is effectively suppressed. Ultimately, this achieves the goal of dynamically compressing infrared images to adapt to the display bit depth while avoiding loss of detail and amplification of noise.

[0039] In one feasible implementation, the step of performing adaptive dynamic range compression processing on the low-frequency layer image includes: Multiple grayscale ranges are dynamically divided based on the histogram features of the low-frequency layer image; Determine the compression ratio corresponding to each of the aforementioned grayscale ranges; Based on each of the compression ratios, a mapping curve segment corresponding to each of the grayscale ranges is generated; The complete mapping curve obtained by combining the mapping curve segments converts the low-frequency layer image from the first depth to the second depth.

[0040] It should be noted that histogram features refer to the statistical distribution information of gray values ​​in the low-frequency layer image, including the number of pixels corresponding to each gray level and the cumulative distribution. Dynamic partitioning refers to adaptively determining the interval boundaries based on the actual gray-level distribution of the low-frequency layer image, rather than using fixed boundary points. Multiple gray-level intervals include, but are not limited to, low gray-level intervals, main gray-level intervals, and high gray-level intervals, corresponding to the background area, target main area, and bright interference area in the infrared image, respectively. Compression ratio refers to the mapping slope of gray-level allocation during dynamic range compression of each gray-level interval, used to control the contrast performance of that interval in the output image. It is determined adaptively based on the width of each gray-level interval and the preset minimum compression ratio. Mapping curve segment refers to the function curve segment that maps the input gray-level value to the output gray-level value. Each gray-level interval corresponds to an independent mapping curve segment, which is generated based on the cumulative distribution value corresponding to each gray-level interval and the number of gray levels allocated to that interval. A complete mapping curve refers to a continuous mapping function formed by splicing the mapping curve segments corresponding to each gray-level interval in gray-level order. The first bit depth refers to the original bit depth of the input low-frequency layer image, and the second bit depth refers to the display bit depth of the output image. The second bit depth is usually lower than the first bit depth.

[0041] Understandably, this implementation dynamically divides the grayscale range of the low-frequency layer image into multiple intervals, determines the compression ratio and generates a mapping curve segment for each interval, and finally combines them to form a complete mapping curve for bit depth conversion. During this process, the low-grayscale and high-grayscale intervals are moderately compressed according to a preset minimum compression ratio, effectively suppressing background areas and bright interference areas. The compression ratio of the main grayscale interval is adaptively adjusted according to its dynamic range, maintaining the contrast of the target subject when the dynamic range is sufficient, and avoiding over-compression that would make the target difficult to identify when the dynamic range is insufficient. Simultaneously, the generation of the mapping curve segment matches the pixel distribution density within each interval, allowing densely pixelated grayscale areas to obtain finer grayscale level allocation. Therefore, this implementation achieves differentiated compression strategies for different grayscale intervals, ensuring that the background, target, and interference areas obtain compression effects that conform to their respective characteristics while compressing the overall dynamic range.

[0042] For example, Figure 2 The overall algorithm flowchart of this embodiment is shown. Figure 2As shown, the process begins by acquiring a preprocessed infrared image. This preprocessing includes non-uniformity correction, temporal filtering, background correction, and vertical stripe removal to eliminate various noises and distortions caused by the sensor's inherent characteristics. Subsequently, the preprocessed infrared image is decomposed into a low-frequency layer image and a high-frequency layer image. The low-frequency layer image represents large-scale changes in temperature distribution and background information, while the high-frequency layer image represents details such as edges and textures, as well as noise components. Based on this, adaptive dynamic range compression is performed on the low-frequency layer image. By analyzing the histogram features of the low-frequency layer image, multiple gray-level intervals are dynamically divided, and the compression ratio for each interval is determined. Mapping curve segments corresponding to each interval are generated and finally combined to form a complete mapping curve that transforms the low-frequency layer image from high bit depth to low bit depth. Simultaneously, enhancement processing is performed on the high-frequency layer image. Through bilateral filtering, hyperbolic tangent nonlinear mapping, and adaptive high-frequency gain calculation based on the dynamic range of the low-frequency layer's main gray-level intervals, noise suppression is achieved while enhancing edge details. Finally, the processed low-frequency layer image and the processed high-frequency layer image are fused to generate the output image.

[0043] In one feasible implementation, the step of dynamically dividing multiple grayscale intervals based on the histogram features of the low-frequency layer image includes: Calculate the histogram and cumulative histogram of the low-frequency layer image; Based on the preset shadow ratio coefficient and highlight ratio coefficient, the shadow threshold and highlight threshold of the low-frequency layer image are calculated respectively. The gray value corresponding to the first time the cumulative histogram reaches or exceeds the shadow threshold is determined as the upper boundary of the low gray value range, and the gray value corresponding to the first time the cumulative histogram reaches or exceeds the highlight threshold is determined as the upper boundary of the main gray value range. The minimum gray value of the low-frequency layer image is taken as the lower bound of the low gray-level range, and the maximum gray value of the low-frequency layer image is taken as the upper bound of the high gray-level range. The gray-level range is divided into the low gray-level range, the main gray-level range, and the high gray-level range by the upper bound of the low gray-level range and the upper bound of the main gray-level range.

[0044] It should be noted that a histogram refers to the statistical distribution of the number of pixels at each gray level in a low-frequency layer image; a cumulative histogram is a cumulative distribution function obtained by summing the number of pixels at each gray level, used to reflect the cumulative increase in the number of pixels as the gray level increases. The shadow proportion coefficient and highlight proportion coefficient are preset parameters used to control the proportion of shadow and highlight areas. The shadow proportion coefficient defines the proportion of background or low-temperature areas in the image, while the highlight proportion coefficient defines the proportion of the target subject area. The shadow threshold and highlight threshold are values ​​obtained by multiplying the shadow proportion coefficient and highlight proportion coefficient by the total number of pixels in the image, used to locate the upper bound of the low gray level range and the upper bound of the subject gray level range, respectively. "First time reaching or exceeding" means that during the traversal of the cumulative histogram from low to high gray levels, the cumulative number of pixels first meets the condition of not being less than the threshold. The upper boundary of the low grayscale range refers to the boundary grayscale value between the low grayscale range and the main grayscale range. The upper boundary of the main grayscale range refers to the boundary grayscale value between the main grayscale range and the high grayscale range. The minimum grayscale value refers to the minimum grayscale value of all pixels in the low-frequency layer image, and the maximum grayscale value refers to the maximum grayscale value of all pixels in the low-frequency layer image.

[0045] Understandably, this implementation dynamically determines the shadow and highlight thresholds by calculating the histogram and cumulative histogram of the low-frequency layer image, combined with preset shadow and highlight proportion coefficients. It then determines the boundary points of each grayscale interval based on the position where the cumulative histogram first reaches or exceeds the threshold. This allows the division of low-grayscale, main-object, and high-grayscale intervals to adapt to the actual grayscale distribution characteristics of the current scene. During this process, the setting of the shadow and highlight proportion coefficients allows the division results to be flexibly adjusted according to the needs of different application scenarios. This ensures that the background area, target subject area, and bright interference area can be accurately divided under different temperature difference scenarios, providing a precise interval basis for subsequently applying differentiated compression strategies to each interval.

[0046] In one specific implementation, the number of histogram bins, HIST_BINS, is set, and the histogram ratio, hist_ratio, is calculated. ; Where max represents the maximum value of the low-frequency layer image, and min represents the minimum value of the low-frequency layer image. By using this histogram ratio, the continuous gray-level range of the low-frequency layer image is discretized into multiple histogram intervals.

[0047] In one specific implementation, the total number of pixels (pixel_count) is calculated, and th0 = b0 × pixel_count and th1 = b1 × pixel_count are set, where b0 is the shadow proportion coefficient and b1 is the highlight proportion coefficient. The cumulative histogram (cumsum) is calculated, and low_index and low are also calculated. cumsum[low_index] <th0<cumsum[low_index + 1]; low = low_index × hist_ratio + min; Calculate high_index and high: cumsum[high_index] <th1<cumsum[high_index + 1]; high = high_index × hist_ratio + min; Wherein, low is the upper boundary of the low grayscale range, and high is the upper boundary of the main grayscale range.

[0048] In one feasible implementation, the step of determining the compression ratio corresponding to each grayscale range includes: Calculate the dynamic range value of the grayscale interval of the main body; When the dynamic range value is greater than or equal to a preset threshold, a preset number of main gray levels are allocated to the main gray range; When the dynamic range value is less than the preset threshold, the number of main gray levels allocated in the main gray range is determined according to the ratio of the dynamic range value to the preset minimum compression ratio. The number of low gray levels allocated to the low gray level range is determined based on the ratio of the width of the low gray level range to the preset minimum compression ratio. The number of high grayscale levels allocated to the high grayscale range is determined based on the ratio of the width of the high grayscale range to the preset minimum compression ratio.

[0049] It should be noted that the dynamic range value refers to the difference between the maximum and minimum values ​​within the main grayscale range, used to characterize the amplitude of temperature changes within that range. The preset threshold is a value determined by multiplying the preset minimum compression ratio by the preset maximum number of grayscale levels for the main subject, used to determine whether the main grayscale range has sufficient dynamic range to allocate the preset number of grayscale levels. The preset minimum compression ratio is a preset parameter used to limit the minimum compression level of each range, used to prevent over-compression leading to low contrast when the dynamic range is narrow. The preset number of grayscale levels for the main subject refers to the maximum number of grayscale levels allocated to the preset main grayscale range in the output image. The actual number of grayscale levels allocated to the main grayscale range is the preset number allocated when the dynamic range of the main grayscale range is sufficient; when the dynamic range is insufficient, it is dynamically determined based on the ratio of the dynamic range value to the preset minimum compression ratio. The number of low grayscale levels refers to the actual number of grayscale levels allocated to the low grayscale range, determined by the ratio of the width of the low grayscale range to the preset minimum compression ratio. The number of high gray levels refers to the actual number of gray levels allocated in the high gray level range, which is determined based on the ratio of the width of the high gray level range to the preset minimum compression ratio.

[0050] Understandably, this implementation method achieves adaptive adjustment of the compression ratio of the main subject area by calculating the dynamic range value of the subject grayscale interval and comparing it with a preset threshold: when the dynamic range of the subject area is sufficient, a preset number of subject grayscale levels is allocated to ensure that the target subject obtains sufficient contrast performance; when the dynamic range of the subject area is insufficient, the number of grayscale levels is allocated according to the ratio of the dynamic range value to the preset minimum compression ratio to avoid allocating too many grayscale levels when the dynamic range is narrow, which would lead to compression distortion. At the same time, the number of grayscale levels in the low grayscale interval and the high grayscale interval is determined according to the ratio of their respective interval widths to the preset minimum compression ratio, so that the background area and the bright interference area can be appropriately compressed according to a unified compression logic. Thus, this implementation method achieves adaptive determination of the compression ratio of each grayscale interval, ensuring that the target subject, background area, and bright interference area can all obtain appropriate compression effects under different temperature difference scenarios.

[0051] For example, Figure 3 A detailed flowchart illustrating the steps of low-frequency layer adaptive dynamic range compression is shown. Figure 3As shown, firstly, the histogram and cumulative histogram of the low-frequency layer image are calculated. Then, the shadow threshold and highlight threshold are calculated according to the preset shadow proportion coefficient and highlight proportion coefficient, respectively, to distinguish the background area and the subject target area in the image. The gray value corresponding to the first time the cumulative histogram reaches or exceeds the shadow threshold is determined as the upper boundary of the low gray-level interval, and the gray value corresponding to the first time the cumulative histogram reaches or exceeds the highlight threshold is determined as the upper boundary of the subject gray-level interval. At the same time, the minimum gray value of the low-frequency layer image is used as the lower boundary of the low gray-level interval, and the maximum gray value is used as the upper boundary of the high gray-level interval. Thus, the gray-level range is divided into the low gray-level interval, the subject gray-level interval, and the high gray-level interval. Subsequently, the dynamic range value of the main grayscale interval is calculated and compared with a preset threshold. When the dynamic range value is greater than or equal to the preset threshold, a preset number of main grayscale levels is allocated to the main grayscale interval. When the dynamic range value is less than the preset threshold, the number of main grayscale levels is determined based on the ratio of the dynamic range value to a preset minimum compression ratio. Simultaneously, the number of low grayscale levels is determined based on the ratio of the width of the low grayscale interval to a preset minimum compression ratio, and the number of high grayscale levels is determined based on the ratio of the width of the high grayscale interval to a preset minimum compression ratio. Based on this, low-level mapping curve segments, main grayscale mapping curve segments, and high-level mapping curve segments are generated according to the cumulative distribution value corresponding to each grayscale interval and the allocated number of grayscale levels. These three mapping curve segments are then stitched together in grayscale order to form a complete mapping curve. Finally, this complete mapping curve is used to convert the low-frequency layer image from the first bit depth to the second bit depth, completing the adaptive dynamic range compression processing.

[0052] In one specific implementation, a minimum compression ratio ZOOM_RATIO is preset, the number of main gray levels MAIN_GRAY is preset, the dynamic range value of the main gray level interval is calculated as range = high - low, and the number of gray levels allocated to the main gray level interval is main_gray: ; Where MAIN_LEAST_AD = ZOOM_RATIO × MAIN_GRAY.

[0053] In one specific implementation, the number of low gray levels allocated in the low gray range, low_gray, is: ; The number of high gray levels allocated in the high gray range is: .

[0054] In one feasible implementation, the step of generating the mapping curve segment corresponding to each grayscale interval based on each compression ratio includes: For the low grayscale range, a low-mapping curve segment is generated based on the cumulative distribution value corresponding to the low grayscale range in the cumulative histogram and the number of low grayscale levels; For the main grayscale range, a main mapping curve segment is generated based on the cumulative distribution value corresponding to the main grayscale range in the cumulative histogram and the number of main grayscale levels; For the high grayscale range, a high mapping curve segment is generated based on the cumulative distribution value corresponding to the high grayscale range in the cumulative histogram and the number of high grayscale levels; The low-level mapping curve segment, the main mapping curve segment, and the high-level mapping curve segment are spliced ​​together in grayscale order to form the complete mapping curve.

[0055] It should be noted that the cumulative distribution value refers to the cumulative number of pixels corresponding to each gray level in the cumulative histogram, reflecting the cumulative situation of all pixels before that gray level. The low-level mapping curve segment is a function curve segment that maps input gray values ​​within the low gray-level range to output gray values; it is generated based on the cumulative distribution value corresponding to the low gray-level range and the number of low gray levels. The main body mapping curve segment is a function curve segment that maps input gray values ​​within the main gray-level range to output gray values; it is generated based on the cumulative distribution value corresponding to the main gray-level range and the number of main gray levels. The high-level mapping curve segment is a function curve segment that maps input gray values ​​within the high gray-level range to output gray values; it is generated based on the cumulative distribution value corresponding to the high gray-level range and the number of high gray levels. Concatenation refers to connecting the mapping curve segments end-to-end according to their corresponding gray-level ranges to form a continuous mapping function covering the complete input gray-level range. A complete mapping curve is a mapping function formed by stitching together the low mapping curve segment, the main mapping curve segment, and the high mapping curve segment in grayscale order. It is used to convert the grayscale value of each pixel in the low-frequency layer image from the first bit depth to the second bit depth.

[0056] Understandably, this implementation generates corresponding mapping curve segments based on the cumulative distribution value and the number of gray levels allocated to the low grayscale range, the main grayscale range, and the high grayscale range, respectively. This ensures that the mapping relationship within each range matches the pixel distribution density within that range. The cumulative distribution value reflects the density of pixel distribution within that range. Regions with a faster increase in cumulative distribution value indicate dense pixel distribution, and the corresponding mapping curve segment has a steeper slope, thus allocating more gray levels in that region. Conversely, regions with a slower increase in cumulative distribution value indicate sparse pixel distribution, and the corresponding mapping curve segment has a shallower slope, thus allocating fewer gray levels in that region. By stitching the three mapping curve segments together in grayscale order to form a complete mapping curve, it achieves adaptive allocation of gray levels based on the pixel distribution density of different grayscale ranges while compressing the overall dynamic range. This allows densely pixelated main target areas to obtain finer gray level allocation, effectively preserving local contrast information during dynamic range compression.

[0057] In one specific implementation, the histogram clipping limit is calculated as follows:

[0058] Where b0 is the shadow ratio coefficient, b1 is the highlight ratio coefficient, pixel_count is the total number of pixels, ZOOM_RATIO is the preset minimum compression ratio, and main_gray is the number of gray levels allocated to the main grayscale range.

[0059] In one specific implementation, the piecewise mapping curve (map) is calculated as follows:

[0060] Where cdf is the cumulative distribution value, and base is the brightness adaptive adjustment factor, base = MAIN_GRAY - main_gray.

[0061] In one feasible implementation, the step of performing enhancement processing on the high-frequency layer image includes: The high-frequency layer image is subjected to bilateral filtering. A hyperbolic tangent function is constructed as a nonlinear mapping function. The absolute value of the filtered high-frequency layer image is input into the hyperbolic tangent function to obtain the mapping coefficients. The mapping coefficients are multiplied by the filtered high-frequency layer image to obtain the nonlinearly adjusted high-frequency layer image. Obtain the dynamic range value of the grayscale range of the main subject in the low-frequency layer image, and calculate the high-frequency gain based on the dynamic range value; The enhanced high-frequency layer image is obtained by multiplying the nonlinearly adjusted high-frequency layer image with the high-frequency gain.

[0062] It should be noted that bilateral filtering is an edge-preserving filtering algorithm. It smooths noise while maintaining the edge information in the image, considering both spatial distance similarity and gray-level similarity between pixels. The hyperbolic tangent function is an sigmoid nonlinear function whose value approaches 1 as the independent variable increases. It has the characteristic of compressing large-amplitude components and suppressing small-amplitude components. The mapping coefficient refers to the output value obtained by inputting the absolute value of the filtered high-frequency layer image into the hyperbolic tangent function, used to adjust the adjustment amplitude of each pixel in the high-frequency layer image. The nonlinearly adjusted high-frequency layer image is the high-frequency component image obtained by multiplying the mapping coefficient by the filtered high-frequency layer image, where small-amplitude high-frequency components are suppressed and large-amplitude high-frequency components are moderately compressed. The dynamic range value of the main gray-level interval in the low-frequency layer image refers to the difference between the maximum and minimum values ​​within the main gray-level interval, used to characterize the temperature change amplitude of the current scene. The high-frequency gain is the enhancement coefficient calculated based on the dynamic range value of the main gray-level interval in the low-frequency layer, used to adjust the enhancement intensity of high-frequency components; its magnitude is positively correlated with the dynamic range value. The enhanced high-frequency layer image refers to the high-frequency component image obtained by multiplying the nonlinearly adjusted high-frequency layer image with the high-frequency gain.

[0063] Understandably, this implementation achieves synergistic optimization of detail enhancement and noise suppression by sequentially performing bilateral filtering, nonlinear mapping, and adaptive gain adjustment on the high-frequency layer image. Bilateral filtering first removes random noise from the high-frequency layer while preserving edge information, providing a clean foundation for subsequent processing. The hyperbolic tangent function performs nonlinear adjustment on the filtered high-frequency layer image, effectively suppressing small-amplitude noise components and moderately compressing large-amplitude edge detail components, avoiding overshoot during subsequent magnification. The high-frequency gain is adaptively calculated based on the dynamic range of the main grayscale range of the low-frequency layer. When the scene temperature difference is large, the dynamic range value is large, and the high-frequency gain increases accordingly, fully enhancing edge details; when the scene temperature difference is small, the dynamic range value is small, and the high-frequency gain decreases accordingly, preventing weak background noise from being excessively amplified. Thus, this implementation achieves targeted enhancement of edge details while effectively suppressing background noise under different temperature difference scenarios, providing high-quality high-frequency components for subsequent fusion with the low-frequency layer.

[0064] In one specific implementation, the hyperbolic tangent function is constructed as a nonlinear mapping function: I_high1 = f(|I_high|) × I_high; In the formula, f(x) = tanh(x / 4) Where I_high is the filtered high-frequency layer image, and I_high1 is the non-linearly adjusted high-frequency layer image.

[0065] In one specific implementation, the high-frequency layer image is compressed: I_high_pressed = I_high1 × 255 / press; In the formula, press is the compression coefficient: ; Where max and min are the maximum and minimum values ​​of the low-frequency layer image, respectively.

[0066] In one specific implementation, the high-frequency gain high_gain is calculated as follows: high_gain = 1 + range_k × F / max_range; Where range_k is the difference between the dynamic range value of the main grayscale interval and the preset baseline value, F is the preset gain coefficient, and max_range is the preset maximum range value.

[0067] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the infrared image enhancement method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0068] This application also provides an infrared image enhancement device; please refer to... Figure 4 The infrared image enhancement device includes: Acquisition module 10 is used to acquire the preprocessed infrared image; Decomposition module 20 is used to decompose the preprocessed infrared image into a low-frequency layer image and a high-frequency layer image; Compression module 30 is used to perform adaptive dynamic range compression processing on the low-frequency layer image; Enhancement module 40 is used to perform enhancement processing on the high-frequency layer image; The fusion module 50 is used to fuse the processed low-frequency layer image with the processed high-frequency layer image to generate an output image.

[0069] And / or, the infrared image enhancement device includes: The first segmentation module is used to dynamically segment multiple grayscale ranges based on the histogram features of the low-frequency layer image. The first determining module is used to determine the compression ratio corresponding to each of the grayscale ranges; The first generation module is used to generate mapping curve segments corresponding to each of the grayscale ranges based on each of the compression ratios. The first conversion module is used to convert the low-frequency layer image from the first bit depth to the second bit depth using the complete mapping curve obtained by combining the mapping curve segments.

[0070] And / or, the infrared image enhancement device includes: The first calculation module is used to calculate the histogram and cumulative histogram of the low-frequency layer image; The second calculation module is used to calculate the shadow threshold and highlight threshold of the low-frequency layer image according to the preset shadow ratio coefficient and highlight ratio coefficient, respectively. The second determining module is used to determine the gray value corresponding to the first time the cumulative histogram reaches or exceeds the shadow threshold as the upper boundary of the low gray range, and to determine the gray value corresponding to the first time the cumulative histogram reaches or exceeds the highlight threshold as the upper boundary of the main gray range. The second division module is used to take the minimum gray value of the low-frequency layer image as the lower bound of the low gray-level interval, take the maximum gray value of the low-frequency layer image as the upper bound of the high gray-level interval, and divide the gray-level range into the low gray-level interval, the main gray-level interval, and the high gray-level interval using the upper bound of the low gray-level interval and the upper bound of the main gray-level interval.

[0071] And / or, the infrared image enhancement device includes: The third calculation module is used to calculate the dynamic range value of the grayscale range of the main body; The first allocation module is used to allocate a preset number of main gray levels to the main gray range when the dynamic range value is greater than or equal to a preset threshold. The third determining module is used to determine the number of main gray levels allocated in the main gray range based on the ratio of the dynamic range value to the preset minimum compression ratio when the dynamic range value is less than the preset threshold. The fourth determining module is used to determine the number of low gray levels allocated to the low gray range based on the ratio of the width of the low gray range to the preset minimum compression ratio. The fifth determining module is used to determine the number of high grayscale levels allocated to the high grayscale range based on the ratio of the width of the high grayscale range to the preset minimum compression ratio.

[0072] And / or, the infrared image enhancement device includes: The second generation module is used to generate a low-mapping curve segment for the low grayscale interval based on the cumulative distribution value corresponding to the low grayscale interval in the cumulative histogram and the number of low grayscale levels. The third generation module is used to generate a subject mapping curve segment based on the cumulative distribution value of the subject grayscale interval in the cumulative histogram and the number of subject grayscale levels for the subject grayscale interval. The fourth generation module is used to generate a high-mapping curve segment for the high grayscale range based on the cumulative distribution value corresponding to the high grayscale range in the cumulative histogram and the number of high grayscale levels. The first splicing module is used to splice the low-mapping curve segment, the main mapping curve segment, and the high-mapping curve segment in grayscale order to form the complete mapping curve.

[0073] And / or, the infrared image enhancement device includes: The first filtering module is used to perform bilateral filtering on the high-frequency layer image; The fourth calculation module is used to construct a hyperbolic tangent function as a nonlinear mapping function. The absolute value of the filtered high-frequency layer image is input into the hyperbolic tangent function to obtain the mapping coefficients. The mapping coefficients are multiplied by the filtered high-frequency layer image to obtain the nonlinearly adjusted high-frequency layer image. The fifth calculation module is used to obtain the dynamic range value of the grayscale range of the main body in the low-frequency layer image, and calculate the high-frequency gain based on the dynamic range value; The second multiplication module is used to multiply the nonlinearly adjusted high-frequency layer image with the high-frequency gain to obtain the enhanced high-frequency layer image.

[0074] The infrared image enhancement device provided in this application, employing the infrared image enhancement method described in the above embodiments, can solve the technical problem of how to dynamically compress infrared images to adapt to the display bit depth while avoiding loss of detail and amplification of noise. Compared with the prior art, the beneficial effects of the infrared image enhancement device provided in this application are the same as those of the infrared image enhancement method provided in the above embodiments, and other technical features in the infrared image enhancement device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0075] This application provides an infrared image enhancement device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the infrared image enhancement method in Embodiment 1 above.

[0076] The following is for reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing the infrared image enhancement device of the embodiments of this application. The infrared image enhancement device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, tablets, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital televisions and desktop computers. Figure 5The infrared image enhancement device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.

[0077] like Figure 5 As shown, the infrared image enhancement device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the infrared image enhancement device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the infrared image enhancement device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show infrared image enhancement devices with various systems, it should be understood that implementing or having all of the systems shown is not required. More or fewer systems may be implemented alternatively.

[0078] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0079] The infrared image enhancement device provided in this application, employing the infrared image enhancement method described in the above embodiments, solves the technical problem of how to dynamically compress infrared images to adapt to the display bit depth while avoiding loss of detail and amplification of noise. Compared with the prior art, the beneficial effects of the infrared image enhancement device provided in this application are the same as those of the infrared image enhancement method provided in the above embodiments, and other technical features of this infrared image enhancement device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0080] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0081] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0082] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the infrared image enhancement method in the above embodiments.

[0083] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0084] The aforementioned computer-readable storage medium may be included in the infrared image enhancement device; or it may exist independently and not assembled into the infrared image enhancement device.

[0085] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the infrared image enhancement device, cause the infrared image enhancement device to: Acquire the preprocessed infrared image; The preprocessed infrared image is decomposed into a low-frequency layer image and a high-frequency layer image; Adaptive dynamic range compression is performed on the low-frequency layer image; Enhancement processing is performed on the high-frequency layer image; The processed low-frequency layer image is fused with the processed high-frequency layer image to generate an output image.

[0086] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0087] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0088] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0089] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described infrared image enhancement method. This solves the technical problem of how to dynamically compress infrared images to adapt to the display bit depth while avoiding loss of detail and amplification of noise. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the infrared image enhancement method provided in the above embodiments, and will not be repeated here.

[0090] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the infrared image enhancement method described above.

[0091] The computer program product provided in this application solves the technical problem of how to dynamically compress infrared images to adapt to the display bit depth while avoiding loss of detail and amplification of noise. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the infrared image enhancement method provided in the above embodiments, and will not be repeated here.

[0092] All acquisition of signals, information, or actions in this application are carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization of the relevant device owner.

[0093] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.

Claims

1. An infrared image enhancement method, characterized in that, include: Acquire the preprocessed infrared image; The preprocessed infrared image is decomposed into a low-frequency layer image and a high-frequency layer image; Adaptive dynamic range compression is performed on the low-frequency layer image; Enhancement processing is performed on the high-frequency layer image; The processed low-frequency layer image is fused with the processed high-frequency layer image to generate an output image.

2. The method as described in claim 1, characterized in that, The step of performing adaptive dynamic range compression processing on the low-frequency layer image includes: Multiple grayscale ranges are dynamically divided based on the histogram features of the low-frequency layer image; Determine the compression ratio corresponding to each of the aforementioned grayscale ranges; Based on each of the compression ratios, a mapping curve segment corresponding to each of the grayscale ranges is generated; The complete mapping curve obtained by combining the mapping curve segments converts the low-frequency layer image from the first depth to the second depth.

3. The method as described in claim 2, characterized in that, The step of dynamically dividing multiple grayscale intervals based on the histogram features of the low-frequency layer image includes: Calculate the histogram and cumulative histogram of the low-frequency layer image; Based on the preset shadow ratio coefficient and highlight ratio coefficient, the shadow threshold and highlight threshold of the low-frequency layer image are calculated respectively. The gray value corresponding to the first time the cumulative histogram reaches or exceeds the shadow threshold is determined as the upper boundary of the low gray value range, and the gray value corresponding to the first time the cumulative histogram reaches or exceeds the highlight threshold is determined as the upper boundary of the main gray value range. The minimum gray value of the low-frequency layer image is taken as the lower bound of the low gray-level range, and the maximum gray value of the low-frequency layer image is taken as the upper bound of the high gray-level range. The gray-level range is divided into the low gray-level range, the main gray-level range, and the high gray-level range by the upper bound of the low gray-level range and the upper bound of the main gray-level range.

4. The method as described in claim 3, characterized in that, The steps of determining the compression ratio corresponding to each grayscale range include: Calculate the dynamic range value of the grayscale interval of the main body; When the dynamic range value is greater than or equal to a preset threshold, a preset number of main gray levels are allocated to the main gray range; When the dynamic range value is less than the preset threshold, the number of main gray levels allocated in the main gray range is determined according to the ratio of the dynamic range value to the preset minimum compression ratio. The number of low gray levels allocated to the low gray level range is determined based on the ratio of the width of the low gray level range to the preset minimum compression ratio. The number of high grayscale levels allocated to the high grayscale range is determined based on the ratio of the width of the high grayscale range to the preset minimum compression ratio.

5. The method as described in claim 4, characterized in that, The step of generating the mapping curve segment corresponding to each grayscale range based on each compression ratio includes: For the low grayscale range, a low-mapping curve segment is generated based on the cumulative distribution value corresponding to the low grayscale range in the cumulative histogram and the number of low grayscale levels; For the main grayscale range, a main mapping curve segment is generated based on the cumulative distribution value corresponding to the main grayscale range in the cumulative histogram and the number of main grayscale levels; For the high grayscale range, a high mapping curve segment is generated based on the cumulative distribution value corresponding to the high grayscale range in the cumulative histogram and the number of high grayscale levels; The low-level mapping curve segment, the main mapping curve segment, and the high-level mapping curve segment are spliced ​​together in grayscale order to form the complete mapping curve.

6. The method as described in claim 1, characterized in that, The step of performing enhancement processing on the high-frequency layer image includes: The high-frequency layer image is subjected to bilateral filtering. A hyperbolic tangent function is constructed as a nonlinear mapping function. The absolute value of the filtered high-frequency layer image is input into the hyperbolic tangent function to obtain the mapping coefficients. The mapping coefficients are multiplied by the filtered high-frequency layer image to obtain the nonlinearly adjusted high-frequency layer image. Obtain the dynamic range value of the grayscale range of the main subject in the low-frequency layer image, and calculate the high-frequency gain based on the dynamic range value; The enhanced high-frequency layer image is obtained by multiplying the nonlinearly adjusted high-frequency layer image with the high-frequency gain.

7. An infrared image enhancement device, characterized in that, The device includes: The acquisition module is used to acquire preprocessed infrared images; The decomposition module is used to decompose the preprocessed infrared image into a low-frequency layer image and a high-frequency layer image; The compression module is used to perform adaptive dynamic range compression processing on the low-frequency layer image; An enhancement module is used to perform enhancement processing on the high-frequency layer image; The fusion module is used to fuse the processed low-frequency layer image with the processed high-frequency layer image to generate an output image.

8. An infrared image enhancement device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the infrared image enhancement method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the infrared image enhancement method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the infrared image enhancement method as described in any one of claims 1 to 6.