Algorithm Research on Detail and Contrast Enhancement of High Dynamic Infrared Images

: Infrared images have the advantages of being employed in all weather conditions and exhibiting strong anti-interference abilities and are widely used in many ﬁelds. However, there are also problems of low contrast, high noise and blurred details, for which a high dynamic infrared image enhancement method based on wavelet transform is proposed. First, multi-resolution analysis is performed using wavelet transform, and the image is decomposed into a low-frequency information layer and high-frequency information layer, which are processed separately. The low-frequency information layer is subjected to contrast-constrained adaptive histogram equalisation to improve the contrast. The high-frequency information layer is enhanced with adaptive coefﬁcients, and the gain coefﬁcients are determined using gamma transform, which is designed to increase the applicability. Wavelet inverse transform is performed on the processed image to meet the desired requirements. It is shown that the algorithm can effectively enhance the high dynamic image contrast and improve the image detail information.


Introduction
For digital images, the dynamic range is the ratio between the maximum possible grey value and the minimum grey value of an image pixel, which can also be expressed as the difference between the two [1].In real imaging, the background information, such as the sea and sky, often has a large temperature difference, while the temperature difference of the object to be imaged is relatively small.Thus, the imaging system provides poor detail information.In order to improve the spatial and temperature resolution of the infrared system, the modern infrared imaging system is commonly applied to large-scale infrared focal plane arrays and high-level analogue-to-digital converters, which greatly improves the dynamic range of infrared images [1].Compared with traditional infrared images, high dynamic infrared images have a wider brightness range and richer detail information, so they are important in target detection, identification, tracking and other critical tasks; however, high dynamic infrared images also suffer from high noise levels, low contrast, and other problems, which seriously affect the quality of the image and the accuracy of the subsequent processing.In the field of infrared image processing, how to effectively highlight the hierarchy of images, improve the image contrast, and enhance detail has become a research task of great interest.The importance of this work lies not only in the improvement in the quality of infrared images, but also in the fact that it achieves a richer presentation of image information under the conditions of a high signal-to-noise ratio with moderate computational speed.Therefore, the aim of this study is to investigate how to process high dynamic infrared images in order to effectively enhance the layering of infrared images and further increase the detail information in the images, thus improving their applicability and usefulness.
Image enhancement refers to emphasising or sharpening certain features of an image, such as edges, contours or contrast.The traditional methods currently applied to image processing can be divided into two main categories: spatial domain enhancement [2][3][4][5][6] and frequency domain enhancement [7][8][9][10].Spatial domain enhancement includes methods such as automatic gain conversion (AGC), gamma transformation (γ-transformation) and histogram equalisation (HE), which achieve the effect of image enhancement by directly changing the pixel values of the image.Spatial domain enhancement has the characteristics of a simple algorithm and fast processing speed, which can be better applied and popularised.However, there are also problems, such as image noise amplification due to the overall changes in the image, and the enhancement effect is not obvious.In frequency domain enhancement, the spatial domain is transformed into the frequency domain.By modifying the magnitude and other information of the image, the relevant features in the image are enhanced, which enhances the recognition ability of the image and simultaneously effectively reduces the noise of the image.From the first application of Fourier transform techniques to image processing by Emil Picard and André Victor Zygmunt Wyman in 1966 [11] to the application of wavelet transform processing in image processing by Ingrid Daubechies in 1988 [12], the frequency domain enhancement field has come a long way.Since the development of image processing, a single method can no longer meet the needs of image processing, and image enhancement algorithms combining advantages are more meaningful for research [13,14].
In this study, a combined time-frequency domain approach is used to process the image.The image is first decomposed using a discrete steady 2D wavelet transform (discrete stationary 2D wavelet transform (SWT2)) [15].Secondly, the low-frequency subbands decomposed by SWT2 are processed using contrast-limited adaptive histogram equalisation (CLAHE) [16], which can effectively enhance the contrast of the image.Highfrequency subband filtering is used for noise reduction, and adaptive enhancement is used to highlight detailed information.Finally, the image is synthesised, which can effectively ensure that the synthesised image has a good enhancement effect.Wavelet transform has a multi-resolution analysis ability, which can effectively deal with a high dynamic range and detailed information, and also has good time-frequency localisation.In addition, SWT2 performs image processing without sampling operations, which can effectively avoid image deformations in space and reduce the probability of offset or blurring phenomena of contour, texture, etc. [17].

High Dynamic Infrared Image Enhancement Algorithm
Thanks to the development of infrared detection technology, most of the current infrared detectors use 14 bit or 16 bit digital-to-analogue conversion technology, with higher precision quantitative sampling, so that the high dynamic infrared image can contain richer scene detail information.However, the traditional display has only 256 grey levels.After the image is compressed and displayed, the detail information will be merged due to the small difference and cannot be displayed, resulting in a waste of data resources; therefore, it is necessary to adopt reasonable and effective detail contrast enhancement and compression techniques.
In 2005, FLIR Corporation released digital detail enhancement (DDE) technology, which is defined in the digital detail enhancement (DDE) technical note as follows: FLIR Systems has developed a powerful algorithm to help users solve the problem of locating low-contrast targets in high-dynamic-range scenes.DDE is an advanced, nonlinear imageprocessing algorithm that preserves high dynamic range detail in an image and enhances the image detail to match the total dynamic range of the original image background [18].The essence is that the high dynamic two-dimensional image is processed by layering and decomposed into a low-frequency information layer and a high-frequency information layer.
The low-frequency information layer contains a large amount of background information, which needs to be processed to improve the contrast.The high-frequency information layer contains the contour of the image, edge information, and noise information, which needs to be processed by the noise-reduction process to improve the details of the image.Finally, the compression process is carried out, which can better retain the detailed information of the image [18].Since then, the processing mode based on the idea of layering has gradually been used in infrared image processing and achieved good results.Branchitta and others proposed a dynamic range enhancement algorithm based on bilateral filtering [19], which retains the high-frequency detail information of the image when it enhances the details of high dynamic range infrared images.However, this method can easily produce the phenomenon of edge-flip in the region of large grey-scale changes, which leads to the appearance of halo artifacts in the processed infrared images.Liu N and others proposed an infrared image detail enhancement algorithm based on guided filtering [20].The algorithm uses a guided filter instead of a bilateral filter as a frequency divider tool.Luo J and others weighted the details of the guided filtering based on this; the weights were used to stratify the image, and good experimental results were achieved [21].However, image layering based on guided filtering requires manual threshold setting and high computational complexity, resulting in the poor scene applicability of the algorithm as well as real-time processing.Through the research and study of DDE technology and the comparison and analysis of a variety of algorithms, the algorithm in this study is proposed, and its algorithm flow is shown in Figure 1.
The essence is that the high dynamic two-dimensional image is processed by layering and decomposed into a low-frequency information layer and a high-frequency information layer.The low-frequency information layer contains a large amount of background information, which needs to be processed to improve the contrast.The high-frequency information layer contains the contour of the image, edge information, and noise information, which needs to be processed by the noise-reduction process to improve the details of the image.Finally, the compression process is carried out, which can better retain the detailed information of the image [18].Since then, the processing mode based on the idea of layering has gradually been used in infrared image processing and achieved good results.Branchitta and others proposed a dynamic range enhancement algorithm based on bilateral filtering [19], which retains the high-frequency detail information of the image when it enhances the details of high dynamic range infrared images.However, this method can easily produce the phenomenon of edge-flip in the region of large grey-scale changes, which leads to the appearance of halo artifacts in the processed infrared images.Liu N and others proposed an infrared image detail enhancement algorithm based on guided filtering [20].The algorithm uses a guided filter instead of a bilateral filter as a frequency divider tool.Luo J and others weighted the details of the guided filtering based on this; the weights were used to stratify the image, and good experimental results were achieved [21].However, image layering based on guided filtering requires manual threshold setting and high computational complexity, resulting in the poor scene applicability of the algorithm as well as real-time processing.Through the research and study of DDE technology and the comparison and analysis of a variety of algorithms, the algorithm in this study is proposed, and its algorithm flow is shown in Figure 1.This research will provide an effective method for high dynamic infrared image processing.This study's algorithm can effectively improve the quality of high dynamic infrared images, enhance the image details, and improve the accuracy of target detection and tracking, so as to provide a more reliable solution for applications in military, security, medical and industrial fields.

Algorithm Implementation
In this study, by learning and analysing the DDE technique, wavelet transform is used to decompose the highly dynamic two-dimensional image into a low-frequency information layer and high-frequency information layer, and the image enhancement process is carried out.The applied image is captured in low light or at night without the help of light, offering all-weather characteristics and an advantage compared to ordinary images that need to be captured under light conditions.However, the captured infrared images, which are characterised by low brightness, low contrast and fuzzy details, also provide more trouble for the subsequent application processing, and the quality of the images is significantly improved after processing using this algorithm.The steps of the algorithm are as follows: (1) Through the SWT2 wavelet transform, the image is decomposed into low-frequency information layer and high-frequency information layer images in three directions: horizontal, vertical and diagonal.After experiments, the low-frequency information layer of the primary decomposition is selected as the low-frequency information layer image for the subsequent processing, and the high-frequency information layer This research will provide an effective method for high dynamic infrared image processing.This study's algorithm can effectively improve the quality of high dynamic infrared images, enhance the image details, and improve the accuracy of target detection and tracking, so as to provide a more reliable solution for applications in military, security, medical and industrial fields.

Algorithm Implementation
In this study, by learning and analysing the DDE technique, wavelet transform is used to decompose the highly dynamic two-dimensional image into a low-frequency information layer and high-frequency information layer, and the image enhancement process is carried out.The applied image is captured in low light or at night without the help of light, offering all-weather characteristics and an advantage compared to ordinary images that need to be captured under light conditions.However, the captured infrared images, which are characterised by low brightness, low contrast and fuzzy details, also provide more trouble for the subsequent application processing, and the quality of the images is significantly improved after processing using this algorithm.The steps of the algorithm are as follows: (1) Through the SWT2 wavelet transform, the image is decomposed into low-frequency information layer and high-frequency information layer images in three directions: horizontal, vertical and diagonal.After experiments, the low-frequency information layer of the primary decomposition is selected as the low-frequency information layer image for the subsequent processing, and the high-frequency information layer image of the secondary decomposition is selected as the high-frequency information layer image for the subsequent processing.The effect reaches the best state.(2) The low-frequency information layer image contains the background information of the image and has the disadvantage of low contrast.The CLAHE algorithm is used for contrast enhancement processing.The CLAHE algorithm generates a mapping function by statistically calculating the grey values of the image, redistributes the grey values and applies bilinear interpolation to solve the block effect that occurs in the chunking process.The CLAHE algorithm also adopts contrast limitation to prevent the image from being over-enhanced, which provides the best processing results [15].(3) The high-frequency information layer contains the detailed texture and edge contour information of the image, and coefficient gain processing is carried out to highlight the effective information.The gain coefficients are determined by adaptive gamma transform, and the gamma γ values are calculated using variance σ and mean µ, which is an innovative way to improve the adaptability of the algorithm.The detailed information of the image is effectively enhanced to achieve the best image processing effect.(4) The processed high-and low-frequency information is synthesized using ISWT2 inverse wavelet transform, and the image is compressed for output.

Discrete Smooth 2D Wavelet Transforms
Fourier transform converts the signal analysis into the field of frequency domain analysis.Both the linear system and the nonlinear system can be analysed, which is more convenient when analysing the performance of the system.Using Fourier transform, Formula (1) shows that obtaining a signal to its Fourier transform spectrum must take an infinite amount of time (−∞, +∞); that is, it must be obtained in the time domain of all the information, and vice versa.To use the spectrum to describe the signal, regardless of how short the signal time, the entire frequency domain must be used.That is, the Fourier transform is not localised and is only applicable to deterministic signals and smooth signals.However, most signals are non-smooth signals, and the frequency analysis of the Fourier transform is deficient.
Wavelet transform is developed on the basis of Fourier transform, which retains the advantages of Fourier transform in frequency-domain processing, but also has a good timedomain processing ability.As can be seen from Equation (1), unlike the Fourier transform, which has only frequency as a variable, the wavelet transform has two variables: scale a and translation τ.The scale a controls the expansion and contraction of the wavelet function, and translation τ controls the translation of the wavelet function.Scale a corresponds to frequency, and translation τ corresponds to time.This not only indicates what frequency component the signal has, but also exactly where it exists in the time domain.In 2D digital image processing, given a scale function ϕ(x) and a wavelet function ψ(x), a 2D scale function ϕ(x, y) = ϕ(x)ϕ(y) and three 2D wavelet functions y) can be combined.The discrete function f (x, y) can be decomposed into a linear combination of these four functions at different scales and locations, as shown in Equation (2): where the first part represents the low-frequency coefficients of the high dynamic infrared image, representing the background information of the image, and the second part represents the high-frequency coefficients of the high dynamic infrared image, representing the details of the image as well as the contour information.Through Formula (2), providing a multi-layer decomposition of the image, each decomposition can obtain a low-frequency component and three high-frequency components in the horizontal, vertical and diagonal directions.This decomposition structure is shown in Figure 2.


where the first part represents the low-frequency coefficients of the high dynamic infrared image, representing the background information of the image, and the second part represents the high-frequency coefficients of the high dynamic infrared image, representing the details of the image as well as the contour information.Through Formula (2), providing a multi-layer decomposition of the image, each decomposition can obtain a low-frequency component and three high-frequency components in the horizontal, vertical and diagonal directions.This decomposition structure is shown in Figure 2. In addition, the SWT2 algorithm uses up-sampling when performing wavelet decomposition, interpolating zeros at intervals when performing the layering operation, which ensures that the layered image is still the same size as the original image.Different layers of the image can be merged, and the decomposition process is shown in Figure 3.In this study, a three-layer wavelet decomposition process is carried out on the acquired high dynamic image, which contains trees, grass, streetlamps, characters and horses in the near distance.This image has good research value.The experiment is shown in the figure below.After wavelet decomposition, the first layer of low-frequency information is shown in Figure 4a, which is able to maximise the retention of the background information.Compared to the original image, the decomposed low-frequency image does not have the problem of blurring, and with the increase in the number of decomposition layers, the image gradually blurs due to the increase in the frequency of the interception, as shown in Figure 4b,c.Therefore, the first low-frequency information layer after wavelet decomposition is used for subsequent processing.In addition, the SWT2 algorithm uses up-sampling when performing wavelet decomposition, interpolating zeros at intervals when performing the layering operation, which ensures that the layered image is still the same size as the original image.Different layers of the image can be merged, and the decomposition process is shown in Figure 3.  ( , , ) ( , )


where the first part represents the low-frequency coefficients of the high dynamic infrared image, representing the background information of the image, and the second part represents the high-frequency coefficients of the high dynamic infrared image, representing the details of the image as well as the contour information.Through Formula (2), providing a multi-layer decomposition of the image, each decomposition can obtain a low-frequency component and three high-frequency components in the horizontal, vertical and diagonal directions.This decomposition structure is shown in Figure 2. In addition, the SWT2 algorithm uses up-sampling when performing wavelet decomposition, interpolating zeros at intervals when performing the layering operation, which ensures that the layered image is still the same size as the original image.Different layers of the image can be merged, and the decomposition process is shown in Figure 3.In this study, a three-layer wavelet decomposition process is carried out on the acquired high dynamic image, which contains trees, grass, streetlamps, characters and horses in the near distance.This image has good research value.The experiment is shown in the figure below.After wavelet decomposition, the first layer of low-frequency information is shown in Figure 4a, which is able to maximise the retention of the background information.Compared to the original image, the decomposed low-frequency image does not have the problem of blurring, and with the increase in the number of decomposition layers, the image gradually blurs due to the increase in the frequency of the interception, as shown in Figure 4b,c.Therefore, the first low-frequency information layer after wavelet decomposition is used for subsequent processing.In this study, a three-layer wavelet decomposition process is carried out on the acquired high dynamic image, which contains trees, grass, streetlamps, characters and horses in the near distance.This image has good research value.The experiment is shown in the figure below.After wavelet decomposition, the first layer of low-frequency information is shown in Figure 4a, which is able to maximise the retention of the background information.Compared to the original image, the decomposed low-frequency image does not have the problem of blurring, and with the increase in the number of decomposition layers, the image gradually blurs due to the increase in the frequency of the interception, as shown in Figure 4b,c.Therefore, the first low-frequency information layer after wavelet decomposition is used for subsequent processing.The results of the experiment involving the high-frequency information layer image are shown in Figure 5.The first layer image is shown in Figure 5a-c, and the original image is decomposed into horizontal, vertical and diagonal directions.The detailed information is not fully displayed during processing, and the subsequent enhancement effect is not The results of the experiment involving the high-frequency information layer image are shown in Figure 5.The first layer image is shown in Figure 5a-c, and the original image is decomposed into horizontal, vertical and diagonal directions.The detailed information is not fully displayed during processing, and the subsequent enhancement effect is not obvious.The second layer image is shown in Figure 5d-f, where the image information is clearly presented.The impact of noise is small after the subsequent enhancement of the best results.The third layer of the image is shown in Figure 5g-i.The image also clearly shows detailed information; however, after subsequent processing and the amplification of the noise, as well as image synthesis, artifacts will appear, resulting in image blurring.Therefore, the algorithm in this study selected the second high-frequency information layer for subsequent processing.The experimental results of the image comparison are as follows: the experimental results of the low-frequency information layer are shown in Figure 4, and the experimental results of the high-frequency information layer are shown in Figure 5.The results of the experiment involving the high-frequency information layer image are shown in Figure 5.The first layer image is shown in Figure 5a-c, and the original image is decomposed into horizontal, vertical and diagonal directions.The detailed information is not fully displayed during processing, and the subsequent enhancement effect is not obvious.The second layer image is shown in Figure 5d-f, where the image information is clearly presented.The impact of noise is small after the subsequent enhancement of the best results.The third layer of the image is shown in Figure 5g-i.The image also clearly shows detailed information; however, after subsequent processing and the amplification of the noise, as well as image synthesis, artifacts will appear, resulting in image blurring.Therefore, the algorithm in this study selected the second high-frequency information layer for subsequent processing.

Layered Processing
The low-frequency information layer contains the background information of the image, which has the disadvantages of producing low contrast and fuzzy images, and needs to be processed for contrast enhancement.After the wavelet transform image is produced, the noise information is mainly contained in the high-frequency information layer.The low-frequency information layer of the null-domain method of enhancement can be effectively avoided to enhance the contrast of the image and reduce the noise interference, linear gain,  transform and histogram equalisation algorithms, as well as other null-do- main methods, to enhance the contrast to good effect.Histogram algorithms are currently the most widely used.In this study, the CLAHE algorithm is selected to process the lowfrequency information layer image obtained by wavelet transform.

Layered Processing
The low-frequency information layer contains the background information of the image, which has the disadvantages of producing low contrast and fuzzy images, and needs to be processed for contrast enhancement.After the wavelet transform image is produced, the noise information is mainly contained in the high-frequency information layer.The low-frequency information layer of the null-domain method of enhancement can be effectively avoided to enhance the contrast of the image and reduce the noise interference, linear gain, γ transform and histogram equalisation algorithms, as well as other null-domain methods, to enhance the contrast to good effect.Histogram algorithms are currently the most widely used.In this study, the CLAHE algorithm is selected to process the low-frequency information layer image obtained by wavelet transform.
The core idea of the histogram equalisation algorithm (HE algorithm) is to re-count the grey values of the infrared image and distribute the intervals where the grey levels of the infrared image are concentrated uniformly over the whole range of grey levels using Equation (3) [16]: where r j denotes the grey value of point j, p r represents the probability of the grey value of point r, k denotes the first grey value, L denotes the maximum grey value, and MN denotes the size of the image.Through processing the above mapping formula, the global contrast of the image can be increased, and the effect is especially obvious for the images with concentrated grey-scale intervals.In addition, the HE algorithm does not need to set other parameters and can be run separately as a self-contained system, which has the advantages of simplicity and efficiency.This algorithm is widely used in medical imaging and other images.However, in practical applications, due to the differences between various parts of the image, the global histogram equalisation of the whole image is not good, and the adaptive histogram equalisation algorithm (adaptive HE (AHE)) solves this problem.The AHE algorithm is improved on the basis of the HE algorithm in the following way, as shown in Figure 6.First, the whole image is divided into many sub-blocks.Then, each sub-block is respectively processed by histogram equalisation, and the distribution function of each sub-block is statistically mapped, which can improve the local details of the image data.However, due to the chunking process, the whole image will present the block effect at the sub-block connection and the connection misalignment problem.This problem can be solved by bilinear interpolation, the principle of which is shown in Figure 6 [16].The main idea of bilinear interpolation is to perform one linear interpolation in the , xy directions, separately; calculate the values in both directions; and compute the pixel values of o points using the following bilinear interpolation (Equation ( 4)).The bilinear method takes surrounding pixels with different weights (the closer distance, the higher weight) into consideration for computing the interpolated pixels, while the nearest neighbour method only can consider the pixels that in the closest distance for interpolation.Thus, bilinear method can achieve superior performance when compared to the nearest neighbour method.
( ) ( ) ( ) ( ) The main idea of bilinear interpolation is to perform one linear interpolation in the x, y directions, separately; calculate the values in both directions; and compute the pixel values of o points using the following bilinear interpolation (Equation ( 4)).The bilinear method takes surrounding pixels with different weights (the closer distance, the higher weight) into consideration for computing the interpolated pixels, while the nearest neighbour method only can consider the pixels that in the closest distance for interpolation.Thus, bilinear method can achieve superior performance when compared to the nearest neighbour method.
where g A , g B , g C , g D denote the mapping function of each sub-block; r o denotes the pixel value of point o; and x, y denote the horizontal and vertical displacements, respectively.In Figure 6, A, B, C, and D denote the pixel values of the point, separately, and the o point is the pixel of the requested point.The specific application in the image is shown in Figure 7: (1) Divide the image into several rectangular blocks.For each rectangular block sub-map, calculate its grey-scale histogram and the corresponding transformation function (cumulative histogram), separately.(2) Process the pixels in the original image, according to their distribution, into three cases:

•
The pixels in the red area are grey mapped according to the transform function of the sub-map in which they are located;

•
The pixels in the green area are linearly interpolated by the transform function of two neighbouring subgraphs;

•
The pixels in the blue region are bilinearly interpolated according to the transform function of the four neighbouring subgraphs.
, xy directions, separately; calculate the values in both directions; and compute the pixel values of o points using the following bilinear interpolation (Equation ( 4)).The bilinear method takes surrounding pixels with different weights (the closer distance, the higher weight) into consideration for computing the interpolated pixels, while the nearest neighbour method only can consider the pixels that in the closest distance for interpolation.Thus, bilinear method can achieve superior performance when compared to the nearest neighbour method.
( ) ( ) ( ) ( )   Finally, the CLAHE algorithm is formed by limiting the pixels with excessive image frequency and adding the intercepted pixel values uniformly over the entire range, as shown in Figure 8. Finally, the CLAHE algorithm is formed by limiting the pixels with excessive image frequency and adding the intercepted pixel values uniformly over the entire range, as shown in Figure 8. Through the application of three histogram equalisation algorithms to the image lowfrequency information layer, a comparison of the experimental results can be obtained.The three histogram processing steps of the low-frequency information layer image contrast enhancement have significant effects.The HE algorithm's experimental results are shown in Figure 9a.There are excessive enhancement problems: the image has been lost in part of the information, the wavelet transformed low-frequency information layer image processing is poor, and the results are not applicable to the combination of this algorithm.The experimental results of the AHE algorithm are shown in Figure 9b, which shows that there is no over-enhancement problem for the image processing of the lowfrequency information layer.However, the image as a whole is too bright, as shown in the yellow box in Figure 9b.The image details are poorly displayed, and the contrast is increased.However, the effect is not optimal.The CLAHE algorithm experimental results are shown in Figure 9c; the image retains the original low-frequency information layer's background, as shown in the image in the yellow box in Figure 9c.The contrast enhancement also has a significant effect, and the visual effect is significant, making the image suitable for combining with the wavelet transform for the processing of high dynamic Through the application of three histogram equalisation algorithms to the image lowfrequency information layer, a comparison of the experimental results can be obtained.The three histogram processing steps of the low-frequency information layer image contrast enhancement have significant effects.The HE algorithm's experimental results are shown in Figure 9a.There are excessive enhancement problems: the image has been lost in part of the information, the wavelet transformed low-frequency information layer image processing is poor, and the results are not applicable to the combination of this algorithm.The experimental results of the AHE algorithm are shown in Figure 9b, which shows that there is no over-enhancement problem for the image processing of the low-frequency information layer.However, the image as a whole is too bright, as shown in the yellow box in Figure 9b.The image details are poorly displayed, and the contrast is increased.However, the effect is not optimal.The CLAHE algorithm experimental results are shown Appl.Sci.2023, 13, 12649 9 of 16 in Figure 9c; the image retains the original low-frequency information layer's background, as shown in the image in the yellow box in Figure 9c.The contrast enhancement also has a significant effect, and the visual effect is significant, making the image suitable for combining with the wavelet transform for the processing of high dynamic infrared images.
shown in Figure 9a.There are excessive enhancement problems: the image has been lost in part of the information, the wavelet transformed low-frequency information layer image processing is poor, and the results are not applicable to the combination of this algorithm.The experimental results of the AHE algorithm are shown in Figure 9b, which shows that there is no over-enhancement problem for the image processing of the lowfrequency information layer.However, the image as a whole is too bright, as shown in the yellow box in Figure 9b.The image details are poorly displayed, and the contrast is increased.However, the effect is not optimal.The CLAHE algorithm experimental results are shown in Figure 9c; the image retains the original low-frequency information layer's background, as shown in the image in the yellow box in Figure 9c.The contrast enhancement also has a significant effect, and the visual effect is significant, making the image suitable for combining with the wavelet transform for the processing of high dynamic infrared images.The high-frequency information layer contains the detail and contour information of the image, as well as the noise information of the image, which first needs to be denoised.In addition, the effective information should be enhanced for subsequent image applications [22][23][24].Traditional image denoising, such as median filtering, mean filtering, etc., assume that the signal and noise are in different frequency bands.However, the noise is The high-frequency information layer contains the detail and contour information of the image, as well as the noise information of the image, which first needs to be denoised.In addition, the effective information should be enhanced for subsequent image applications [22][23][24].Traditional image denoising, such as median filtering, mean filtering, etc., assume that the signal and noise are in different frequency bands.However, the noise is distributed over the entire frequency axis, so there are certain limitations.By decomposing the image, the wavelet transform mainly focuses the high-frequency information and noise information on the high-frequency information layer and thresholds the high-frequency information layer for denoising.Coefficient gain is applied to the denoised high-frequency information layer image to enhance the detail information and contour edges of the image and improve the visualisation ability of the image.The coefficient gain of the image is selected using adaptive gamma, which greatly improves the applicability of the method.As can be seen from Equation ( 5), the gamma transform enhances the image by controlling two parameters, c and γ.
Here, I out is the output image, and I in is the input image.Different values of γ can be selected to enhance the image.In this study, through the mean and variance of the image, an adaptive determination of the gamma value can be obtained.Through experimental verification, this study's innovative γ value formula is proven to feasibly achieve good results through the formula shown in Equation (6).
Here, σ represents the variance, and µ represents the mean.The results are shown in Figures 10 and 11. Figure 10a-c present the image before processing, and Figure 11a-c present the image after enhancement.From the experimental results, the algorithm further enhances the detailed information of the image that can be shown after wavelet decomposition, and the information that is not shown can also be shown after enhancement.It is proven that the processing of the high-frequency information layer has an obvious enhancement effect, and the adopted adaptive gamma transform can effectively enhance the detail information.There is also an enhancement effect for different scenes, which shows that the method has good applicability.
Figures 10 and 11. Figure 10a-c present the image before processing, and Figure 11a-c present the image after enhancement.From the experimental results, the algorithm further enhances the detailed information of the image that can be shown after wavelet decomposition, and the information that is not shown can also be shown after enhancement.It is proven that the processing of the high-frequency information layer has an obvious enhancement effect, and the adopted adaptive gamma transform can effectively enhance the detail information.There is also an enhancement effect for different scenes, which shows that the method has good applicability.

Subjective Evaluation
In this study, three images with different distances were selected for experimental processing, and the three images were taken from the following distances: within 200 m, from 200 m to 1000 m, and above 1000 m.The experimental results for all three images

Subjective Evaluation
In this study, three images with different distances were selected for experimental processing, and the three images were taken from the following distances: within 200 m,  In addition, this study also carries out an experimental processing of HE algorithm, CLAHE algorithm, wavelet transform and adaptive gamma transform.Through comparisons, it is fully demonstrated that combining the time-frequency domain methods to process the image has significant advantages.A comparison of the experimental results shows that the algorithm in this study adopts layered processing and applies CLAHE to process low-frequency information, which effectively avoids the noise amplification caused by the HE algorithm and CLAHE algorithm directly processing the whole image.At the same time, through contrast enhancement, the HE algorithm has excessive enhancement problems in the processing of images, while the CLAHE algorithm, effectively avoiding the problem of over-enhancement, also results in a loss of detail information.The algorithm in this study can effectively solve the problem of information loss by layering the details in the high-frequency information layer.Wavelet transform and adaptive gamma processing lead to a certain improvement in the image brightness.However, the enhancement in contrast is small, and the visual effect is poor.In addition there is no obvious enhancement in the subsequent image processing.Therefore, the algorithm proposed in this study achieves certain improvements in image richness, contrast and detail information compared to other methods and achieved good results.The experimental results of its algorithm are shown in Figure 13.In addition, this study also carries out an experimental processing of HE algorithm, CLAHE algorithm, wavelet transform and adaptive gamma transform.Through comparisons, it is fully demonstrated that combining the time-frequency domain methods to process the image has significant advantages.A comparison of the experimental results shows that the algorithm in this study adopts layered processing and applies CLAHE to process low-frequency information, which effectively avoids the noise amplification caused by the HE algorithm and CLAHE algorithm directly processing the whole image.At the same time, through contrast enhancement, the HE algorithm has excessive enhancement problems in the processing of images, while the CLAHE algorithm, effectively avoiding the problem of over-enhancement, also results in a loss of detail information.The algorithm in this study can effectively solve the problem of information loss by layering the details in the high-frequency information layer.Wavelet transform and adaptive gamma processing lead to a certain improvement in the image brightness.However, the enhancement in contrast is small, and the visual effect is poor.In addition there is no obvious enhancement in the subsequent image processing.Therefore, the algorithm proposed in this study achieves certain improvements in image richness, contrast and detail information compared to other methods and achieved good results.The experimental results of its algorithm are shown in Figure 13.

Objective Evaluation
For the subjective evaluation presented above, the difference is caused by human factors, resulting in errors in the evaluation of the processing results.Therefore, an objective evaluation is essential.This study used the information entropy, mean square error ( MSE ), peak signal-to-noise ratio ( PSRN ), structural similarity ( SSIM ) and processing time as the evaluation criteria, which can effectively prevent the interference of human factors and simultaneously evaluate the processing results of the image in a more comprehensive manner.In addition, the experiments for the proposed method are conducted with the MATALB R2021a environment on the Windows 10 platform with CPU Intel(R) Core(TM) i5-6300HQ and 12 GB running memory (Table 1).(1) Information Entropy Information entropy is an important indicator of the richness of image information.For images, the wider the grey-scale distribution, the richer the details, and the greater the information entropy.The calculation is shown in Formulas ( 7) and (8), where ( , ) f i j is the frequency of occurrence of feature binary ( , ) ij, N is the scale of the image, and ( , ) ij P denotes the proportion of the image whose feature binary is ( , ) ij.

Objective Evaluation
For the subjective evaluation presented above, the difference is caused by human factors, resulting in errors in the evaluation of the processing results.Therefore, an objective evaluation is essential.This study used the information entropy, mean square error (MSE), peak signal-to-noise ratio (PSRN), structural similarity (SSI M) and processing time as the evaluation criteria, which can effectively prevent the interference of human factors and simultaneously evaluate the processing results of the image in a more comprehensive manner.In addition, the experiments for the proposed method are conducted with the MATALB R2021a environment on the Windows 10 platform with CPU Intel(R) Core(TM) i5-6300HQ and 12 GB running memory (Table 1).(1) Information Entropy Information entropy is an important indicator of the richness of image information.For images, the wider the grey-scale distribution, the richer the details, and the greater the information entropy.The calculation is shown in Formulas ( 7) and (8), where f (i, j) is the frequency of occurrence of feature binary (i, j), N is the scale of the image, and P (i,j) denotes the proportion of the image whose feature binary is (i, j).
(2) MSE The root mean square represents the square of the difference between the true and predicted values.The, the sum of the squares is found in the average.The smaller the value of MSE, the more similar the images.The calculation formula is shown in Equation (9), where f (i, j) and f (i, j) denote the image to be evaluated and the original image, respectively, and M, N denote the length and width of the image, respectively.
The peak signal-to-noise ratio (PSRN) is used to evaluate the parameters of image quality and can reflect the size of the impact of noise on the image.A larger peak in the signal-to-noise ratio of the image indicates better image quality.Its expression is shown in Formula (10), where Max I is the maximum possible pixel value in the image, MSE is the root mean square and log 10 performs the logarithmic operation.
(4) SSI M Structural similarity (SSI M) is derived from the structural similarity theory and is used to measure the magnitude of structural similarity between two images, with a maximum value of 1, where larger values represent greater similarity.It especially reflects the similarity of the contours, details, etc. of the images.The formula is shown in Equations ( 11) and (12), where l( f , g) denotes the change, c( f , g) denotes the variance change, and s( f , g) is the structural change.In addition, f and g denote the two images, µ f and u g denote the mean of the images, σ f and σ g denote their variance, and σ f g denotes their covariance.C 1 , C 2 and C 3 are relatively small constants used to ensure that the denominator is not equal to zero.
(5) Processing time The processing time reflects the timeliness of the algorithm and also shows the consumption of resources to a certain extent; the shorter the time, the better the processing results, providing further proof of the algorithm's advantages.
According to the data in Table 2, the adaptive value formula designed in this study combined with this study's algorithm used in image processing has obvious advantages in objective indexes and obviously surpasses the fixed value processing method, achieving excellent processing results.According to Table 3, compared with the histogram equalisation algorithm, the algorithm in this study achieves a greater improvement in image richness, detail enhancement and other aspects.Compared with wavelet transform and the adaptive gamma algorithm, this algorithm is better in terms of image richness; however, due to the large amount of image information that must be processed, the image processing results in terms of peak signal-to-noise ratio, mean squared error and structural similarity are slightly inferior to those of simple wavelet transform.The innovative adaptive γ transform described in this study also has good indicators.In terms of processing time, the algorithm in this study also has a certain advantage.In terms of comprehensive image processing results and objective indicators, this high-dynamic infrared image processing enhancement effect of the algorithm presented in this study is obvious.It also has a wide application scope and good reference value and is worth further research and discussion.

Summary
Aiming to resolve the problems of high dynamic infrared images, such as low contrast, high noise and blurred details, this study proposes an innovative algorithm to enhance the contrast enhancement and details of high dynamic infrared images.First, the discrete wavelet transform is studied in depth through theoretical analysis, the image is processed in layers, and the enhancement operation is carried out for the high-frequency information layer image and the low-frequency information layer image, separately, to improve the image quality.After wavelet transform, the low-frequency image mainly contains the background information of the original image, and the CLAHE algorithm is used to enhance the contrast.The high-frequency information layer image contains the detail and contour information of the original image.Adaptive gamma transform was designed in this study to adjust the gain coefficients so as to enhance the detail information of the image, and the parameters can be adaptively determined according to the characteristics of the image, which improves the applicability of the algorithm.The algorithm used in this study is further compared with the separate time-frequency domain algorithm and evaluated using a series of quantitative metrics.The results show that this study's algorithm performs well in terms of both visual effects and objective metrics, which confirms the potential application of the combined time-frequency domain approach to high dynamic infrared image enhancement.The algorithm in this study provides an effective research approach to acquiring high-quality infrared images, which provides strong support for future infrared

Figure 4 .
Figure 4. Experimental results of low-frequency information layer 3. (a) First low-frequency information layer, (b) Second low-frequency information layer, (c) Third low-frequency information layer.

Figure 4 .
Figure 4. Experimental results of low-frequency information layer 3. (a) First low-frequency information layer, (b) Second low-frequency information layer, (c) Third low-frequency information layer.

Figure 4 .
Figure 4. Experimental results of low-frequency information layer 3. (a) First low-frequency information layer, (b) Second low-frequency information layer, (c) Third low-frequency information layer.

17 Figure 5 .
Figure 5. Three-layer experimental results of the high-frequency information layer: (a) First horizontal high-frequency information layer, (b) First vertical high-frequency information layer, (c) First diagonal high-frequency information layer, (d) Second horizontal high-frequency information layer, (e) Second vertical high-frequency information layer, (f) Second diagonal high-frequency information layer, (g) Third horizontal high-frequency information layer, (h) Third vertical high-frequency information layer, (i) Third diagonal high-frequency information layer.

Figure 5 .
Figure 5. Three-layer experimental results of the high-frequency information layer: (a) First horizontal high-frequency information layer, (b) First vertical high-frequency information layer, (c) First diagonal high-frequency information layer, (d) Second horizontal high-frequency information layer, (e) Second vertical high-frequency information layer, (f) Second diagonal high-frequency information layer, (g) Third horizontal high-frequency information layer, (h) Third vertical high-frequency information layer, (i) Third diagonal high-frequency information layer.

7 :( 1 )
mapping function of each sub-block; o r denotes the pixel value of point o ; and x , y denote the horizontal and vertical displacements, respec- tively.In Figure 6, A, B, C, and D denote the pixel values of the point, separately, and the o point is pixel of the requested point.The specific application in the image is shown in Figure Divide the image into several rectangular blocks.For each rectangular block submap, calculate its grey-scale histogram and the corresponding transformation function (cumulative histogram), separately.(2) Process the pixels in the original image, according to their distribution, into three cases: • The pixels in the red area are grey mapped according to the transform function of the sub-map in which they are located; • The pixels in the green area are linearly interpolated by the transform function of two neighbouring subgraphs; •The pixels in the blue region are bilinearly interpolated according to the transform function of the four neighbouring subgraphs.

Figure 9 .
Figure 9. Experimental results of low-frequency information layer image processing: (a) HE processing results, (b) AHE processing results, (c) CLAHE processing results.

Figure 9 .
Figure 9. Experimental results of low-frequency information layer image processing: (a) HE processing results, (b) AHE processing results, (c) CLAHE processing results.

Figure 10 .Figure 11 .
Figure 10.Second layer high-frequency image: (a) First image before enhancement, (b) Second image before enhancement, (c) Third image before enhancement.

Figure 11 .
Figure 11.Enhanced second layer high-frequency image: (a) First image after enhancement, (b) Second image after enhancement, (c) Third image after enhancement.

Figure 12 .
Figure 12.Experimental results for different  values: (a) Algorithm in this study and  = 0.5, (b) Algorithm in this study and  = 1.2, (c) Algorithm in this study and  = 2, (d) Algorithm in this study and adaptive  .

Figure 12 .
Figure 12.Experimental results for different γ values: (a) Algorithm in this study and γ = 0.5, (b) Algorithm in this study and γ = 1.2, (c) Algorithm in this study and γ = 2, (d) Algorithm in this study and adaptive γ.
Block diagram of multi-layer wavelet decomposition.

Table 1 .
The computer configuration used for the experiments in this paper.

Table 1 .
The computer configuration used for the experiments in this paper.

Table 2 .
Objective indicators for controlled experiments with different γ values.

Table 3 .
Comparison of objective indicators.