Non-uniformity correction method for infrared image based on notch filter and guided filter
By combining notch filtering with anisotropic guided filtering, the problem of image detail loss in non-uniform correction of infrared images is solved, the effects of noise removal and detail preservation are achieved, and the image quality is improved.
Patent Information
- Application Number
- CN202411614531.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-13
AI Technical Summary
Existing infrared image non-uniformity correction algorithms will cause loss of image details when removing stripe noise, and there is a lack of methods that can effectively preserve image details.
A method based on notch filtering and guided filtering is adopted. A notch filter is constructed through discrete Fourier transform to attenuate the noise spectrum. Anisotropic guided filtering is combined to extract detail layers to achieve image non-uniform correction.
Effectively remove stripe noise from images while retaining a large amount of detail information, avoiding image distortion and improving image resolution and contrast.
Smart Images

Figure CN119559108B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of infrared image processing, and particularly relates to an infrared image non-uniformity correction method based on notch filtering and guided filtering. BACKGROUND
[0002] Infrared images have important applications in medical treatment, agricultural production and other fields, mainly including thermal imaging, night vision, satellite imaging and other technologies. Unlike traditional optical imaging technology, in the COMS readout circuit of infrared thermal imaging technology, one amplifier is shared by each column of units. Since the parameters of the amplifier cannot be completely consistent, significant stripe noise appears in the infrared image. Therefore, non-uniformity correction technology emerges.
[0003] At present, mainstream non-uniformity correction technologies are divided into two kinds. One is a calibration-based method, which needs to acquire data in a known environment and then correct it. This method is simple in principle and relatively mature in technology, but it needs to be corrected constantly to cope with the time drift of the non-uniformity of the detector. Each correction needs to interrupt the imaging process, which has a big problem in application. The other method is a scene-based method, which does not need a reference environment but processes images, including multi-frame and single-frame methods. The multi-frame correction method needs to analyze multiple frames of data, which occupies a lot of resources and is difficult to implement the algorithm. The single-frame processing method only needs to rely on a single picture, which is fast in timeliness and occupies less resources, overcoming the shortcomings of the multi-frame method, and is the current research focus.
[0004] At present, the algorithms that can effectively remove stripe noise include the middle histogram equalization algorithm based on gray scale statistics and the one-dimensional guided filter algorithm based on filter estimation. The gray scale statistics algorithm adjusts the current pixel by calculating the local histogram to eliminate stripes. The one-dimensional guided filter algorithm based on filter estimation removes noise through local linear estimation.
[0005] Although the above algorithms can eliminate stripes, they have poor detail preservation ability. In the processing process, most of the image details are lost. Therefore, there is a lack of an infrared image non-uniformity correction algorithm that can preserve image details. SUMMARY
[0006] In view of the deficiencies of the prior art, the present application provides an infrared image non-uniformity correction method based on notch filtering and guided filtering, which can accurately correct the non-uniformity noise in the infrared image and overcome the problem of image detail loss in the non-uniformity correction process, while preserving a large amount of image details.
[0007] To solve the above technical problems, the technical scheme of the present application is as follows:
[0008] The infrared image non-uniformity correction method based on notch filtering and guided filtering includes the following steps:
[0009] Step 1: Input an infrared focal plane array image, perform discrete Fourier transform on the input image to obtain the amplitude spectrum and phase spectrum, and estimate the notch filter compensation parameters by predicting the central spectral region of the amplitude spectrum, thereby constructing a notch filter;
[0010] Step 2: Pass the amplitude spectrum through the constructed notch filter to obtain a new filtered amplitude spectrum. The new filtered amplitude spectrum and the original phase spectrum are used to obtain the filtered background layer through inverse discrete Fourier transform.
[0011] Step 3: Subtract the original input infrared focal plane array image from the filtered background layer to obtain a noise map, and use anisotropic guided filtering to regularize the coefficients. Weighted improvement to extract some detail layers from the noise map;
[0012] Step 4: Overlay all detail layers and output the correction results.
[0013] As an example, in step 1, the input infrared focal plane array image I(i) is defined as an M×N infrared focal plane array image I(i) and a discrete Fourier transform is performed to obtain an amplitude spectrum G(u, v) bit spectrum. The expression is as follows:
[0014]
[0015] Where F[*] is the calculation of the amplitude spectrum, and Θ[*] is the calculation of the phase spectrum.
[0016] Preferably, in step 1, the method for estimating the compensation parameter of the notch filter is:
[0017] First, according to the size of the infrared focal plane array image I(i), the amplitude spectrum is obtained. The amplitude spectrum is an M×N matrix and is expressed as follows:
[0018]
[0019] Then, the amplitude spectrum is divided into upper and lower halves by row;
[0020] For the upper part, set the parameter K to represent the specific area of the notch filter, select B rows through the data outside the K neighborhood, and make linear fitting by estimating the K rows of data column by column to calculate a i , b i parameter:
[0021]
[0022] in, x i is the number of rows, G(i,v) is the data of the amplitude graph;
[0023] Using the estimated parameter a i , b i Fit and calculate the data in the K neighborhood to estimate the compensation parameters of the notch filter;
[0024] The same calculations are performed on the lower half of the amplitude spectrum as on the upper half.
[0025] Preferably, in step 1, the notch filter constructed is as follows:
[0026]
[0027] Among them, Ω K×N Represents a K×N-shaped box, where K is the width of the rectangular box and is used to attenuate the noise energy in the horizontal center area. This is the compensation after attenuation.
[0028] Preferably, in step 2, the amplitude spectrum G(u,v) is multiplied by the notch filter H(u,v), and finally the amplitude spectrum G(u,v) is multiplied by the notch filter H(u,v). K×N In-area compensation C i,j , forming a new amplitude spectrum G', and then the new amplitude spectrum G' and the original phase spectrum are subjected to inverse discrete Fourier transform to obtain the background layer.
[0029] Preferably, the anisotropic guided filtering method is: on the basis of guided filtering, by modifying the regularization coefficient, it can maintain the maximum and minimum intensity boundaries in all directions, so as to achieve better noise reduction effect at edge details.
[0030] Preferably, in step 3, the method for extracting the detail layer by anisotropic guided filtering is expressed as follows:
[0031]
[0032]
[0033] q i =a i I i +b i
[0034] where μ k and σ k 2 Yes k The mean and variance of the pixel data of the guidance image within the window, λ is the regularization coefficient, and |ω| is ω k The number of pixels within is omega k the mean value of the input image, by calculating the parameter a of the anisotropic guided filter i ,b i Then the stripe layer is obtained, and the stripe layer is subtracted from the noise layer to obtain a detail layer, and the extraction of the detail information is completed.
[0035] The present application has the following characteristics and beneficial effects:
[0036] The above technical solution can effectively remove the stripe information in the image, complete the non-uniformity correction of the image, retain a large amount of detail information through the anisotropic guided filtering, avoid image distortion, and effectively prevent image distortion. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0038] Fig. 1 The flow chart of the infrared image non-uniformity correction method based on notch filtering and guided filtering of the embodiment of the present application.
[0039] Fig. 2 The correction result output schematic diagram of the embodiment of the present application.
[0040] Fig. 3 The correction flow chart of the real-time example of the present application. DETAILED DESCRIPTION
[0041] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0042] In the description of the present application, it needs to be understood that the terms "center", "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second" and the like are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined with "first", "second" and the like can be explicitly or implicitly included one or more. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.
[0043] In the description of the present application, it needs to be understood that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood in a broad sense, for example, it can be fixed connection, or detachable connection, or integral connection; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through intermediate medium, or the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood through specific circumstances.
[0044] The present application provides an infrared image non-uniformity correction method based on notch filtering and guided filtering, as shown in Figs. 1-3 The specific steps are as follows:
[0045] Step 1, input the infrared focal plane array image, perform discrete Fourier transform on the input image to obtain amplitude spectrum and phase spectrum, use amplitude spectrum data to predict the center frequency spectrum region, classify the filtering problem as a regression problem, estimate the compensation parameters of the notch filter, and construct the notch filter.
[0046] Specifically: input the infrared focal plane array I(i), the image size is MxN, perform discrete Fourier transform to obtain amplitude spectrum G(u,v) and That is
[0047]
[0048] Wherein, I(i) is the original input infrared focal plane array, F[*] is the calculation of amplitude spectrum, and Θ[*] is the calculation of phase spectrum.
[0049] Using amplitude spectrum data, the center frequency spectrum region is predicted, the filtering problem is classified as a regression problem, the compensation parameters of the notch filter are estimated, and the notch filter is constructed. The specific process is as follows:
[0050] The first part, according to a large number of image analysis, the energy of the stripe noise is mainly concentrated in the middle region of the horizontal axis of the amplitude spectrum, by constructing a notch filter, the spectral energy of the middle region is attenuated, to remove the noise, and to preserve part of the image details, the amplitude spectrum is an MxN matrix, It is divided into upper and lower parts, and the same operation needs to be performed separately, and the parameter K is set to represent the specific region of the notch filter (energy attenuation). By the data outside the K neighborhood, B rows are selected, and by estimating the B row data, linear fitting is performed to calculate a i , b i Parameters.
[0051] In this embodiment, the least square method is used to predict the center spectrum region to estimate the compensation data of the middle K rows. Specifically, the upper half data is taken from the row to the row, a total of B row data, and the parameter matrix a(i), b(i) is calculated by using the B row data, which is used to estimate the data from the row to the row; the lower half data is selected in the same row manner from the row to the row, B row data, and the parameters a(i), b(i) are calculated to estimate the data from the row to the row.
[0052]
[0053] The calculation is the same operation performed column by column, where x i is the number of rows, and G(i,v) is the data of the amplitude graph.
[0054] Further, in the second part, the compensation parameters of the notch filter are estimated, and the estimated parameters a i , b i are used to fit and calculate the data within the K neighborhood. The same operation is divided into upper and lower parts, and is calculated respectively.
[0055] C(i) = a(i)x(i) + b(i) (4)
[0056] Where C(i) is the estimated compensation value. The value of i is from to
[0057] The third part is to construct a notch filter as follows:
[0058]
[0059] Where Ω K×Nrepresents a rectangular frame with size KxN, K is the width of the rectangular frame, and is used to attenuate the noise energy in the horizontal center region, is the compensated after attenuation.
[0060] It can be understood that the value of the width of the rectangular frame is the same as the value of the parameter K.
[0061] Step 2, pass the amplitude spectrum through the constructed notch filter to obtain a new amplitude spectrum after filtering, and use the amplitude spectrum after filtering and the original phase spectrum to obtain a background layer after filtering through inverse discrete Fourier transform.
[0062] Specifically, it includes the following two parts:
[0063] The first part, multiply the amplitude spectrum G(u, v) with the notch filter H(u, v), and finally compensate C in the Ω region to form a new amplitude spectrum G'. K×N i,j
[0064] G'(u, v) = G(u, v) x H(u, v) + C (6)
[0065] The second part, through the amplitude spectrum after filtering and the original phase spectrum, after inverse discrete Fourier transform, the background layer is obtained.
[0066]
[0067] Wherein, O1(i) is the background layer, F -1 [*] is the inverse discrete Fourier transform.
[0068] Step 3, difference between the original input image and the filtered background image to obtain a noise image, use anisotropic guided filtering to improve the regularization coefficient, and extract part of the detail layer from the noise image.
[0069] The specific process is as follows:
[0070] The first part, separate the input infrared focal plane array from the filtered background layer to realize image layering and obtain a noise layer.
[0071] O n (i) = I(i) - O1(i) (8)
[0072] Wherein, O n (i) is the obtained noise layer, I(i) is the input infrared focal plane array, and O1(i) is the background layer.
[0073] Second part, using anisotropic guided filter to extract image details in noise layer, do image detail compensation. Anisotropic guided filter is an improvement of guided filter. Guided filter principle is that there is a linear relationship between output and guide image. Anisotropic guided filter modifies regularization coefficient to keep maximum and minimum intensity limit in each direction, so that it can achieve good noise reduction effect at edge details. We use this feature to extract image details in stripe noise.
[0074]
[0075] Equation (9) is the formula of guided filter, where a k and b k are continuous linear constant coefficients in window ω k , ω k is an N×N rectangular box, I i is the input guide image, and p i is the image to be processed. Equation (10) is a constraint function in window ω k .
[0076]
[0077] In the solution of a k and b k , μ k and σ k 2 are the mean and variance of the pixel data of the guide image in window ω k , λ is the regularization coefficient, which aims to prevent σ k 2 =0 and a k too large, |ω| is the number of pixels in ω k , is the mean of the input image in ω k .
[0078]
[0079] q i = a i I i + b i (15)
[0080] Because the original guided filter has poor diffusion performance at the edge details of the processed image, and lacks the ability to extract image details, the linear constant coefficients are anisotropically weighted. Equation (13) is the weighting parameter, where Equation (14) is the weighted linear constant coefficient a i and b i, Formula (11) becomes Formula (15). Using anisotropic guided filtering, the guide map and input map are both the noise layer O obtained in Formula (8) n (i) In the noise layer, the main body of the image is the stripe information, and the anisotropic guided filtering can be used to obtain O s (i), then O de (i) = O n (i)-O s (i) The detailed information of the image can be extracted.
[0081] Step 4: Overlay the layers and output the correction results.
[0082] The specific operations are:
[0083] O ou (i) = O1(i) + O de (i) (16)
[0084] Among them O ou (i) is the final correction result output, O1(i) is the background layer obtained by formula (7), O de (i) is the extracted detail information.
[0085] pass Fig. 2 It can be seen that the correction result in this embodiment is relatively clear, and the resolution and contrast in the image are significantly improved. (a) is the original input image, (b) is the background layer, (c) is the detail layer, and (d) is the correction result.
[0086] In order to highlight the correction effect of the algorithm of the present invention in actual images, based on the above description, the overall correction process Fig. 3 shown.
[0087] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. It will be apparent to those skilled in the art that various changes, modifications, substitutions, and variations of these embodiments, including components, without departing from the principles and spirit of the present invention are still within the scope of protection of the present invention.
Claims
1. The infrared image non-uniformity correction method based on notch filtering and guided filtering is characterized by: The following steps are involved: Step 1: Input an infrared focal plane array image, perform discrete Fourier transform on the input image to obtain the amplitude spectrum and phase spectrum, and estimate the notch filter compensation parameters by predicting the central spectral region of the amplitude spectrum, thereby constructing a notch filter; The method for estimating the compensation parameters of the notch filter is: First, according to the size of the infrared focal plane array image I(i), the amplitude spectrum is obtained. The amplitude spectrum is an M×N matrix and is expressed as follows: Then, the amplitude spectrum is divided into upper and lower halves by row; For the upper part, set the parameter K to represent the specific area of the notch filter, select B rows through the data outside the K neighborhood, and make linear fitting by estimating the K rows of data column by column to calculate k v ,z v parameter: in, x i is the number of rows, G(i,v) is the data of the amplitude graph; Using the estimated parameter k v ,z v Fit the data within the K neighborhood to estimate the compensation parameters of the notch filter: C(i)=k v x i +z v ; Where C(i) is the estimated compensation value, and the value of i ranges from arrive Perform the same calculations for the lower half of the amplitude spectrum as for the upper half; Step 2: Pass the amplitude spectrum through the constructed notch filter to obtain a new filtered amplitude spectrum. The new filtered amplitude spectrum and the original phase spectrum are used to obtain the filtered background layer through inverse discrete Fourier transform. Step 3: Subtract the original input infrared focal plane array image from the filtered background layer to obtain a noise map, and use anisotropic guided filtering to regularize the coefficients. Weighted improvement is used to extract some detail layers from the noise map. The anisotropic guided filtering method is as follows: based on the guided filtering, by modifying the regularization coefficient, it can maintain the maximum and minimum intensity boundaries in all directions, thereby achieving noise reduction effects at edge details. The method of extracting detail layers through anisotropic guided filtering is expressed as follows: q i =a i I i +b i where μ k and σ k 2 Yes k The mean and variance of the pixel data of the guidance image within the window, λ is the regularization coefficient, and |ω| is ω k The number of pixels within Yes k The mean of the input image, I i is the input guidance image, p i Is the image to be processed, by calculating the parameters a of the anisotropic guided filter i ,b i , then get the stripe layer, and subtract the stripe layer from the noise layer to get the detail layer, completing the extraction of detail information; Step 4: Overlay all detail layers and output the correction results.
2. The infrared image non-uniformity correction method based on notch filtering and guided filtering according to claim 1 is characterized in that: In step 1, the size of the input infrared focal plane array image I(i) is defined as M×N, and the infrared focal plane array image I(i) is subjected to discrete Fourier transform to obtain the amplitude spectrum G(u,v) and phase spectrum The expression is as follows: Where F[*] is the calculation of the amplitude spectrum, and Θ[*] is the calculation of the phase spectrum.
3. The infrared image non-uniformity correction method based on notch filtering and guided filtering according to claim 2, characterized in that: In step 1, the notch filter constructed is as follows: Among them, Ω K×N Represents a rectangular box of size K×N, where K is the width of the rectangular box and is used to attenuate the noise energy in the horizontal center area. This is the compensation after attenuation.
4. The infrared image non-uniformity correction method based on notch filtering and guided filtering according to claim 3 is characterized in that: In step 2, the amplitude spectrum G(u,v) is multiplied by the notch filter H(u,v), and finally in Ω K×N Compensation within the area C i,j , forming a new amplitude spectrum G', and then the new amplitude spectrum G' and the original phase spectrum are subjected to inverse discrete Fourier transform to obtain the background layer.
Citation Information
Patent Citations
Infrared weak and small target rapid detection method
CN110929574A
Low-illumination video enhancement method and device based on detail reservation of dark channel
CN112991197A