An infrared image multilateral filtering denoising method for suppressing salt and pepper noise and keeping weak edge details
By employing a multi-sided filtering method, and utilizing salt-and-pepper noise suppression parameters and weak edge detail preservation weights, infrared images are corrected and filtered. This solves the problem that existing technologies cannot effectively suppress salt-and-pepper noise and preserve weak edge details, achieving efficient noise suppression and detail preservation with short computation time.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2026-03-31
AI Technical Summary
Existing infrared image filtering and denoising methods cannot effectively suppress salt-and-pepper noise and preserve weak edge details, and have long computation time and poor real-time performance.
A multi-sided filtering method is adopted to correct and filter infrared images by calculating salt-and-pepper noise suppression parameters and weak edge detail preservation weights. The multi-sided filtering formula is used to suppress salt-and-pepper noise and preserve weak edge details.
It effectively suppresses salt-and-pepper noise interference, outperforms bilateral filtering in preserving weak edge details, has short computation time, and strong real-time performance.
Smart Images

Figure CN116188286B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically to a method for multi-sided filtering and denoising of infrared images that suppresses salt-and-pepper noise and preserves weak edge details. Background Technology
[0002] Infrared images suffer from numerous drawbacks during acquisition due to atmospheric conditions, ambient temperature, and inherent environmental factors, including low signal-to-noise ratio, significant noise interference, low image contrast, blurred details, and poor visual quality. To better realize infrared thermal imaging technology and improve the clarity of infrared images, the accuracy of infrared temperature measurement, and the ability to detect, search, and track infrared targets, the first step is to filter and denoise the various noises present in the infrared images.
[0003] Currently, traditional infrared image filtering and denoising methods include frequency domain processing and spatial domain processing. Frequency domain processing transforms the spatiotemporal infrared image to the frequency domain using methods such as Discrete Fast Fourier Transform (FFT), Discrete Cosine Transform (DCT), or Discrete Wavelet Transform (DWT) to detect and filter out high-frequency noise. However, this process is complex, computationally intensive, and lacks real-time performance. Spatial domain processing methods include Gaussian filtering, mean filtering, median filtering, and bilateral filtering. Gaussian and mean filtering can remove Gaussian noise, but they cannot preserve either strong or weak edge details. Median filtering is very effective at removing salt-and-pepper noise, but it also cannot preserve strong or weak edge details. Bilateral filtering is very effective at preserving strong edge details, but it cannot handle salt-and-pepper noise and has virtually no effect on preserving weak edge details.
[0004] Therefore, it is necessary to design a new method to effectively suppress salt-and-pepper noise interference, and to outperform bilateral filtering denoising in preserving weak edge details, with short computation time and strong real-time performance. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide an infrared image polygon filtering denoising method that suppresses salt-and-pepper noise and preserves weak edge details.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for infrared image polygon filtering denoising with salt-and-pepper noise suppression and weak edge detail preservation, comprising:
[0007] Acquire raw infrared image data;
[0008] The raw infrared image data is corrected to obtain corrected data;
[0009] Calculate the salt-and-pepper noise suppression parameters;
[0010] Calculate the weights for preserving weak edge details;
[0011] The corrected data is subjected to multi-sided filtering using the salt-and-pepper noise suppression parameters and the weak edge detail preservation weights to obtain the filtering result;
[0012] Output the filtering result.
[0013] The further technical solution is as follows: the calculation of salt-and-pepper noise suppression parameters includes:
[0014] Calculate the histogram of the corrected data;
[0015] Calculate the cumulative histogram based on the histogram;
[0016] The minimum and maximum windowing matrices are determined based on the cumulative histogram.
[0017] Set the decision threshold for salt-and-pepper noise;
[0018] Calculate the effective signal decision matrix based on the minimum windowing matrix, the maximum windowing matrix, and the decision threshold;
[0019] The replacement value of the center point of the filter window is calculated based on the effective signal decision matrix and the windowing matrix of the correction data.
[0020] The windowing matrix of the correction data is replaced with the replacement value of the center point of the filter window.
[0021] The further technical solution is as follows: determining the minimum windowing matrix and the maximum windowing matrix based on the cumulative histogram includes:
[0022] Set the minimum and maximum thresholds for the cumulative histogram;
[0023] The minimum window matrix is selected from the corrected data whose cumulative histogram is not less than the minimum threshold to form the minimum window matrix, and the maximum window matrix is selected from the corrected data whose cumulative histogram is not greater than the maximum threshold to form the maximum window matrix.
[0024] The further technical solution is as follows: the calculation of the weak edge detail preservation weights includes:
[0025] Calculate the sign of weak edge details at the center point of the filter window;
[0026] Calculate the intensity value of the edge details at the center point of the filter window to obtain the first intensity value;
[0027] Set the threshold for weak edge detail detection at the center point of the filtering window;
[0028] The intensity value of weak edge details at the center point of the filter window is calculated based on the first intensity value and the weak edge detail decision threshold.
[0029] The further technical solution is as follows: The correction data is subjected to multi-sided filtering using the salt-and-pepper noise suppression parameters and the weak edge detail preservation weights to obtain the filtering result, including:
[0030] Based on the multi-sided filtering formula and the calculation results of salt-and-pepper noise suppression and fine texture preservation processing, the corrected data is subjected to multi-sided filtering to obtain the filtering result.
[0031] The further technical solution is as follows: the polygonal filtering formula is... Among them W d For spatial approximation weights, W r W is the similarity weight for the range. p Preserve weights for weak edge details; spatial proximity weights Range similarity weight Weak edge detail preservation weights k,l∈[-2r-1,2+1], where r is the filter radius; AD′(x,y) is the replacement value of the center point of the filter window; SI cwd ST is the symbol for weak edge details at the center point of the filter window. cd ST represents the intensity value of the edge details at the center point of the filter window. cwd This represents the intensity value of weak edge details at the center point of the filter window.
[0032] The present invention also provides an infrared image polygon filtering denoising device for salt-and-pepper noise suppression and weak edge detail preservation, comprising:
[0033] The raw data acquisition unit is used to acquire raw infrared image data;
[0034] A correction unit is used to correct the raw infrared image data to obtain corrected data;
[0035] The parameter calculation unit is used to calculate the salt-and-pepper noise suppression parameters;
[0036] Weight calculation unit, used to calculate the weights for preserving weak edge details;
[0037] A multi-sided filtering unit is used to perform multi-sided filtering on the corrected data using the salt-and-pepper noise suppression parameters and the weak edge detail preservation weights to obtain the filtering result;
[0038] The output unit is used to output the filtering result.
[0039] The further technical solution is as follows: the parameter calculation unit includes:
[0040] A histogram calculation subunit is used to calculate the histogram of the corrected data;
[0041] The cumulative graph calculation subunit is used to calculate the cumulative histogram based on the histogram;
[0042] The data determination subunit is used to determine the minimum windowing matrix and the maximum windowing matrix based on the cumulative histogram.
[0043] The noise threshold setting subunit is used to set the decision threshold for salt-and-pepper noise.
[0044] The matrix calculation subunit is used to calculate the effective signal decision matrix based on the minimum window matrix, the maximum window matrix, and the decision threshold.
[0045] The replacement value calculation subunit is used to calculate the replacement value of the center point of the filter window based on the effective signal decision matrix and the windowing matrix of the correction data.
[0046] The replacement subunit is used to replace the windowing matrix of the correction data with the replacement value of the center point of the filter window.
[0047] The present invention also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described method.
[0048] The present invention also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0049] The beneficial effects of this invention compared with the prior art are as follows: This invention corrects the acquired raw infrared image data, calculates salt-and-pepper noise suppression parameters and weak edge detail preservation weights, and comprehensively considers spatial similarity, value range similarity, and positive and directional weighting of weak edge details. It can effectively suppress the interference of salt-and-pepper noise, and is superior to bilateral filtering denoising in terms of weak edge detail preservation. It achieves effective suppression of salt-and-pepper noise interference and is superior to bilateral filtering denoising in terms of weak edge detail preservation. It also has a short calculation time and strong real-time performance.
[0050] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1A schematic diagram illustrating an application scenario of the infrared image polygon filtering denoising method for salt-and-pepper noise suppression and weak edge detail preservation provided in an embodiment of the present invention.
[0053] Figure 2 A schematic flowchart of an infrared image polygon filtering denoising method for salt-and-pepper noise suppression and weak edge detail preservation provided in an embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram of a sub-process of the infrared image polygon filtering denoising method for salt-and-pepper noise suppression and weak edge detail preservation provided in an embodiment of the present invention.
[0055] Figure 4 This is a schematic diagram of a sub-process of the infrared image polygon filtering denoising method for salt-and-pepper noise suppression and weak edge detail preservation provided in an embodiment of the present invention.
[0056] Figure 5 This is a schematic diagram of a sub-process of the infrared image polygon filtering denoising method for salt-and-pepper noise suppression and weak edge detail preservation provided in an embodiment of the present invention.
[0057] Figure 6 A schematic block diagram of an infrared image polygon filtering denoising device 300 for salt-and-pepper noise suppression and weak edge detail preservation provided in an embodiment of the present invention;
[0058] Figure 7 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0061] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0062] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0063] Please see Figure 1 and Figure 2 , Figure 1 This is a schematic diagram illustrating an application scenario of the infrared image polygon filtering denoising method for salt-and-pepper noise suppression and weak edge detail preservation provided in an embodiment of the present invention. Figure 2 This is a schematic flowchart illustrating the infrared image multi-sided filtering denoising method for salt-and-pepper noise suppression and weak edge detail preservation provided in this embodiment of the invention. This method is applied in a server. The server interacts with the terminal to perform denoising processing on the infrared image using salt-and-pepper noise suppression, weak edge detail preservation, and multi-sided filtering. It comprehensively considers spatial similarity, value range similarity, and positive and directional weighting of weak edge details, effectively suppressing salt-and-pepper noise interference and outperforming bilateral filtering in preserving weak edge details. Applying this filtering algorithm to infrared image processing has yielded good results.
[0064] Figure 2 This is a flowchart illustrating an infrared image polygon filtering denoising method for suppressing salt-and-pepper noise and preserving weak edge details, provided in an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S160.
[0065] S110. Acquire raw infrared image data.
[0066] In this embodiment, raw infrared image data AD is acquired. ori (x, y), where x is the column coordinate of the infrared image and y is the row coordinate of the infrared image.
[0067] S120. Correct the raw infrared image data to obtain corrected data.
[0068] In this embodiment, the correction data refers to the image data formed after correcting the original infrared image data.
[0069] Specifically, the corrected infrared image data AD(x, y) is calculated.
[0070] S130. Calculate the salt-and-pepper noise suppression parameters.
[0071] In this embodiment, the salt-and-pepper noise suppression parameter refers to the replacement value of the windowing matrix.
[0072] In one embodiment, please refer to Figure 3The above-mentioned step S130 may include steps S131 to S137.
[0073] S131. Calculate the histogram of the correction data.
[0074] In this embodiment, the histogram of the corrected data AD(x, y) is calculated as H(AD).
[0075] S132. Calculate the cumulative histogram based on the histogram.
[0076] In this embodiment, the cumulative histogram HA(AD) is calculated based on the histogram H(AD).
[0077] S133. Determine the minimum windowing matrix and the maximum windowing matrix based on the cumulative histogram.
[0078] In this embodiment, the maximum window matrix refers to the maximum value of the window matrix corresponding to the correction data whose cumulative histogram is not greater than the maximum threshold; the minimum window matrix refers to the minimum value of the window matrix corresponding to the correction data whose cumulative histogram is not less than the minimum threshold.
[0079] In one embodiment, please refer to Figure 3 The above step S133 may include steps S1331 to S1332.
[0080] S1331. Set the minimum and maximum threshold values for the cumulative histogram;
[0081] S1332. Filter the minimum value of the window matrix corresponding to the correction data whose cumulative histogram is not less than the minimum threshold to form the minimum window matrix, and filter the maximum value of the window matrix corresponding to the correction data whose cumulative histogram is not greater than the maximum threshold to form the maximum window matrix.
[0082] Specifically, a minimum threshold TH is set for the cumulative histogram HA(AD). HA_min With the maximum threshold TH HA_max HA(AD)≥TH HA_min The minimum AD value is determined as the minimum window matrix AD. min HA(AD)≤TH HA_max The maximum AD value is determined as the maximum window matrix AD. max Where AD represents the window matrix corresponding to the corrected data.
[0083] S134. Set the decision threshold for salt-and-pepper noise.
[0084] In this embodiment, the decision threshold for salt-and-pepper noise is set to TH. sp .
[0085] S135. Calculate the effective signal decision matrix based on the minimum window matrix, the maximum window matrix, and the decision threshold.
[0086] In this embodiment, the effective signal decision matrix refers to the matrix for determining the effective signal of salt-and-pepper noise.
[0087] Calculate the effective signal decision matrix V with a filter window size of (2r+1)*(2r+1). s (x+k,y+l) is calculated as follows:
[0088] Where AD represents the pixel values within the filtering window, i.e., the infrared image windowing matrix AD(x+k,y+l), where k,l∈[-2r-1,2r+1], and r is the filtering radius.
[0089] S136. Calculate the replacement value of the center point of the filter window based on the effective signal decision matrix and the windowing matrix of the correction data;
[0090] S137. Replace the windowing matrix of the correction data with the replacement value of the center point of the filter window.
[0091] Specifically, based on the effective signal decision matrix V s Given (x+k, y+l) and the windowing matrix AD(x+k, y+l), calculate the replacement value of the center point of the filter window using the following formula: The replaced windowing matrix is AD′(x+k,y+l).
[0092] S140, Calculate the weights for preserving weak edge details.
[0093] In one embodiment, please refer to Figure 5 The above-mentioned step S140 may include steps S141 to S144.
[0094] S141, Calculate the symbol for weak edge details at the center point of the filter window.
[0095] Specifically, the sign SI of the weak edge details at the center point of the filter window is calculated. cwd The calculation formula is: SI cwd =∑ k, l sign(V s (x+k,y+l)*(AD′(x,y)-AD′(x+k,y+l))), where sign() is the sign determination function.
[0096] S142. Calculate the intensity value of the edge details at the center point of the filter window to obtain the first intensity value.
[0097] In this embodiment, the intensity value ST of the edge details at the center point of the filter window is calculated. cd The calculation formula is: ST cd =∑ k,l |V s (x+k,y+l)*(AD′(x,y)-AD′(x+k,y+l))|.
[0098] S143. Set the threshold for weak edge detail judgment at the center point of the filter window.
[0099] In this embodiment, the weak edge detail decision threshold at the center point of the filtering window is set to TH. cwd .
[0100] S144. Calculate the intensity value of weak edge details at the center point of the filter window based on the first intensity value and the weak edge detail decision threshold.
[0101] In this embodiment, the intensity value ST of weak edge details at the center point of the filter window is calculated. cwd The calculation formula is:
[0102] S150. The correction data is subjected to multi-sided filtering using the salt-and-pepper noise suppression parameters and the weak edge detail preservation weights to obtain the filtering result.
[0103] In this embodiment, the filtering result refers to the denoising result formed after performing multi-sided filtering on the correction data.
[0104] Specifically, based on the multi-sided filtering formula and the calculation results of salt-and-pepper noise suppression and fine texture preservation processing, the corrected data is subjected to multi-sided filtering to obtain the filtering result.
[0105] The polygonal filtering formula is as follows: Among them W d For spatial approximation weights, W r W is the similarity weight for the range. p Preserve weights for weak edge details; spatial proximity weights Range similarity weight Weak edge detail preservation weights σ d σ is the standard deviation of the spatially approximate weighted Gaussian function. r σ is the standard deviation of the Gaussian function of the similarity weights in the range. p To preserve the standard deviation of the Gaussian weight function for weak edge details, k,l∈[-2r-1,2r+1], where r is the filter radius; AD′(x,y) is the replacement value for the center point of the filter window; SI cwd ST is the symbol for weak edge details at the center point of the filter window. cdST represents the intensity value of the edge details at the center point of the filter window. cwd This represents the intensity value of weak edge details at the center point of the filter window.
[0106] S160. Output the filtering result.
[0107] The aforementioned infrared image multi-sided filtering denoising method for suppressing salt-and-pepper noise and preserving weak edge details corrects the original infrared image data, calculates salt-and-pepper noise suppression parameters and weak edge detail preservation weights, and comprehensively considers spatial similarity, value range similarity, and positive and directional weighting of weak edge details. It can effectively suppress the interference of salt-and-pepper noise and is superior to bilateral filtering denoising in preserving weak edge details. It achieves effective suppression of salt-and-pepper noise interference and is superior to bilateral filtering denoising in preserving weak edge details. It also has a short computation time and strong real-time performance.
[0108] Figure 6 This is a schematic block diagram of an infrared image polygon filtering denoising device 300 for salt-and-pepper noise suppression and weak edge detail preservation, provided in an embodiment of the present invention. Figure 6 As shown, corresponding to the above-described infrared image multi-sided filtering denoising method for salt-and-pepper noise suppression and weak edge detail preservation, the present invention also provides an infrared image multi-sided filtering denoising apparatus 300 for salt-and-pepper noise suppression and weak edge detail preservation. This infrared image multi-sided filtering denoising apparatus 300 includes a unit for performing the above-described infrared image multi-sided filtering denoising method for salt-and-pepper noise suppression and weak edge detail preservation, and the apparatus can be configured in a server. Specifically, please refer to... Figure 6 The infrared image multi-sided filtering denoising device 300 for salt and pepper noise suppression and weak edge detail preservation includes a raw data acquisition unit 301, a correction unit 302, a parameter calculation unit 303, a weight calculation unit 304, a multi-sided filtering unit 305, and an output unit 306.
[0109] The system includes a raw data acquisition unit 301 for acquiring raw infrared image data; a correction unit 302 for correcting the raw infrared image data to obtain corrected data; a parameter calculation unit 303 for calculating salt-and-pepper noise suppression parameters; a weight calculation unit 304 for calculating weak edge detail preservation weights; a polygon filtering unit 305 for performing polygon filtering on the corrected data using the salt-and-pepper noise suppression parameters and the weak edge detail preservation weights to obtain a filtering result; and an output unit 306 for outputting the filtering result.
[0110] In one embodiment, the parameter calculation unit 303 includes:
[0111] The system includes: a histogram calculation subunit for calculating the histogram of the corrected data; a cumulative histogram calculation subunit for calculating the cumulative histogram based on the histogram; a data determination subunit for determining the minimum and maximum windowing matrices based on the cumulative histogram; a noise threshold setting subunit for setting the decision threshold for salt-and-pepper noise; a matrix calculation subunit for calculating the effective signal decision matrix based on the minimum and maximum windowing matrices and the decision threshold; a replacement value calculation subunit for calculating the replacement value of the center point of the filter window based on the effective signal decision matrix and the windowing matrix of the corrected data; and a replacement subunit for replacing the windowing matrix of the corrected data with the replacement value of the center point of the filter window.
[0112] In one embodiment, the data determination subunit includes:
[0113] The threshold setting module is used to set the minimum and maximum thresholds for the cumulative histogram; the filtering module is used to filter the minimum value of the window matrix corresponding to the correction data whose cumulative histogram is not less than the minimum threshold, so as to form the minimum window matrix, and to filter the maximum value of the window matrix corresponding to the correction data whose cumulative histogram is not greater than the maximum threshold, so as to form the maximum window matrix.
[0114] In one embodiment, the weight calculation subunit includes:
[0115] The module includes a symbol calculation module for calculating the symbol of weak edge details at the center point of the filter window; a first intensity calculation module for calculating the intensity value of edge details at the center point of the filter window to obtain a first intensity value; a detail threshold determination module for setting a weak edge detail decision threshold at the center point of the filter window; and a second intensity calculation module for calculating the intensity value of weak edge details at the center point of the filter window based on the first intensity value and the weak edge detail decision threshold.
[0116] In one embodiment, the polygon filtering unit 305 is used to perform polygon filtering on the correction data according to the polygon filtering formula and the calculation results of salt-and-pepper noise suppression processing and fine texture preservation processing to obtain the filtering result.
[0117] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the infrared image multi-sided filtering denoising device 300 for suppressing salt and pepper noise and preserving weak edge details and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0118] The aforementioned infrared image polygon filtering denoising device 300 for salt-and-pepper noise suppression and weak edge detail preservation can be implemented as a computer program, which can be used in, for example... Figure 7 It runs on the computer device shown.
[0119] Please see Figure 7 , Figure 7 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.
[0120] See Figure 7 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0121] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform an infrared image polygon filtering denoising method that suppresses salt-and-pepper noise and preserves weak edge details.
[0122] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0123] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can perform an infrared image polygon filtering noise reduction method that suppresses salt and pepper noise and preserves weak edge details.
[0124] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0125] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps:
[0126] Acquire raw infrared image data; correct the raw infrared image data to obtain corrected data; calculate salt-and-pepper noise suppression parameters; calculate weak edge detail preservation weights; perform polygon filtering on the corrected data using the salt-and-pepper noise suppression parameters and the weak edge detail preservation weights to obtain filtering results; output the filtering results.
[0127] In one embodiment, when implementing the step of calculating the salt-and-pepper noise suppression parameters, the processor 502 specifically implements the following steps:
[0128] Calculate the histogram of the corrected data; calculate the cumulative histogram based on the histogram; determine the minimum and maximum windowing matrices based on the cumulative histogram; set the decision threshold for salt-and-pepper noise; calculate the effective signal decision matrix based on the minimum and maximum windowing matrices and the decision threshold; calculate the replacement value of the center point of the filter window based on the effective signal decision matrix and the windowing matrix of the corrected data; replace the windowing matrix of the corrected data with the replacement value of the center point of the filter window.
[0129] In one embodiment, when implementing the step of determining the minimum window matrix and the maximum window matrix based on the cumulative histogram, the processor 502 specifically implements the following steps:
[0130] Set minimum and maximum thresholds for the cumulative histogram; filter the minimum window matrix corresponding to the corrected data whose cumulative histogram is not less than the minimum threshold to form the minimum window matrix; filter the maximum window matrix corresponding to the corrected data whose cumulative histogram is not greater than the maximum threshold to form the maximum window matrix.
[0131] In one embodiment, when implementing the step of calculating the weak edge detail preserving weights, the processor 502 specifically implements the following steps:
[0132] Calculate the sign of the weak edge details at the center point of the filter window; calculate the intensity value of the edge details at the center point of the filter window to obtain a first intensity value; set a weak edge detail decision threshold at the center point of the filter window; calculate the intensity value of the weak edge details at the center point of the filter window based on the first intensity value and the weak edge detail decision threshold.
[0133] In one embodiment, when the processor 502 performs the step of multi-sided filtering on the corrected data using the salt-and-pepper noise suppression parameters and the weak edge detail preservation weights to obtain the filtering result, the following steps are specifically implemented:
[0134] Based on the multi-sided filtering formula and the calculation results of salt-and-pepper noise suppression and fine texture preservation processing, the corrected data is subjected to multi-sided filtering to obtain the filtering result.
[0135] The polygonal filtering formula is as follows: Among them W d For spatial approximation weights, W r W is the similarity weight for the range. p Preserve weights for weak edge details; spatial proximity weights Range similarity weight Weak edge detail preservation weights k,l∈[-2r-1,2r+1], where r is the filter radius; AD′(x,y) is the replacement value of the center point of the filter window; SI cwd ST is the symbol for weak edge details at the center point of the filter window. cd ST represents the intensity value of the edge details at the center point of the filter window. cwd This represents the intensity value of weak edge details at the center point of the filter window.
[0136] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0137] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0138] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein when executed by a processor, the computer program causes the processor to perform the following steps:
[0139] Acquire raw infrared image data; correct the raw infrared image data to obtain corrected data; calculate salt-and-pepper noise suppression parameters; calculate weak edge detail preservation weights; perform polygon filtering on the corrected data using the salt-and-pepper noise suppression parameters and the weak edge detail preservation weights to obtain filtering results; output the filtering results.
[0140] In one embodiment, when the processor executes the computer program to perform the step of calculating the salt-and-pepper noise suppression parameters, it specifically implements the following steps:
[0141] Calculate the histogram of the corrected data; calculate the cumulative histogram based on the histogram; determine the minimum and maximum windowing matrices based on the cumulative histogram; set the decision threshold for salt-and-pepper noise; calculate the effective signal decision matrix based on the minimum and maximum windowing matrices and the decision threshold; calculate the replacement value of the center point of the filter window based on the effective signal decision matrix and the windowing matrix of the corrected data; replace the windowing matrix of the corrected data with the replacement value of the center point of the filter window.
[0142] In one embodiment, when the processor executes the computer program to implement the step of determining the minimum window matrix and the maximum window matrix based on the cumulative histogram, it specifically implements the following steps:
[0143] Set minimum and maximum thresholds for the cumulative histogram; filter the minimum window matrix corresponding to the corrected data whose cumulative histogram is not less than the minimum threshold to form the minimum window matrix; filter the maximum window matrix corresponding to the corrected data whose cumulative histogram is not greater than the maximum threshold to form the maximum window matrix.
[0144] In one embodiment, when the processor executes the computer program to implement the step of calculating the weak edge detail preserving weights, it specifically implements the following steps:
[0145] Calculate the sign of the weak edge details at the center point of the filter window; calculate the intensity value of the edge details at the center point of the filter window to obtain a first intensity value; set a weak edge detail decision threshold at the center point of the filter window; calculate the intensity value of the weak edge details at the center point of the filter window based on the first intensity value and the weak edge detail decision threshold.
[0146] In one embodiment, when the processor executes the computer program to perform multi-sided filtering on the corrected data using the salt-and-pepper noise suppression parameters and the weak edge detail preservation weights to obtain the filtering result, the processor specifically implements the following steps:
[0147] Based on the multi-sided filtering formula and the calculation results of salt-and-pepper noise suppression and fine texture preservation processing, the corrected data is subjected to multi-sided filtering to obtain the filtering result.
[0148] The polygonal filtering formula is as follows: Among them W d For spatial approximation weights, W r W is the similarity weight for the range. p Preserve weights for weak edge details; spatial proximity weights Range similarity weight Weak edge detail preservation weights k,l∈[-2r-1,2r+1], where r is the filter radius; AD′(x,y) is the replacement value of the center point of the filter window; SI cwd ST is the symbol for weak edge details at the center point of the filter window. cd ST represents the intensity value of the edge details at the center point of the filter window. cwd This represents the intensity value of weak edge details at the center point of the filter window.
[0149] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0150] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0151] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0152] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0153] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0154] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An infrared image multilateral filtering denoising method for suppressing salt and pepper noise and preserving weak edge details, characterized in that, The method comprises the following steps: acquiring infrared image raw data; correcting the infrared image raw data to obtain corrected data; calculating a salt and pepper noise suppression parameter; calculating a weak edge detail retention weight value; performing multi-edge filtering on the corrected data by using the salt and pepper noise suppression parameter and the weak edge detail retention weight value to obtain a filtering result; outputting the filtering result; the calculation of the salt and pepper noise suppression parameter comprises the following steps: calculating a histogram of the corrected data; calculating a cumulative histogram according to the histogram; determining a minimum window matrix and a maximum window matrix according to the cumulative histogram; setting a salt and pepper noise decision threshold value; calculating an effective signal decision matrix according to the minimum window matrix, the maximum window matrix and the decision threshold value; calculating a replacement value of a filtering window center point according to the effective signal decision matrix and a window matrix of the corrected data; replacing the window matrix of the corrected data by using the replacement value of the filtering window center point; the calculation of the weak edge detail retention weight value comprises the following steps: calculating a sign of a weak edge detail of the filtering window center point; calculating a first intensity value of the edge detail of the filtering window center point; setting a weak edge detail decision threshold value of the filtering window center point; calculating an intensity value of the weak edge detail of the filtering window center point according to the first intensity value and the weak edge detail decision threshold value; the multi-edge filtering on the corrected data by using the salt and pepper noise suppression parameter and the weak edge detail retention weight value to obtain the filtering result comprises the following steps: performing multi-edge filtering on the corrected data according to a multi-edge filtering formula, a salt and pepper noise suppression processing result and a fine texture retention processing result to obtain the filtering result.
2. The method of claim 1, wherein the method is characterized by: the determination of the minimum window matrix and the maximum window matrix according to the cumulative histogram comprises the following steps: setting a minimum threshold value and a maximum threshold value of the cumulative histogram; screening a minimum value of the window matrix corresponding to the corrected data not less than the minimum threshold value to form the minimum window matrix, and screening a maximum value of the window matrix corresponding to the corrected data not greater than the maximum threshold value to form the maximum window matrix.
3. The method of claim 1, wherein the method further comprises: The multi-edge filter formula is where W d is a spatial proximity weight, W r is a value range similarity weight, and W p is a weak edge detail preservation weight; the spatial proximity weight the value range similarity weight the weak edge detail preservation weight r is a filter radius; AD ′ (x, y) is a replacement value of a center point of a filter window; SI cwd is a sign of a weak edge detail of the center point of the filter window; ST cwd is an intensity value of an edge detail of the center point of the filter window; ST cwd is an intensity value of a weak edge detail of the center point of the filter window; σ d is a standard deviation of a spatial proximity weight Gaussian function, σ r is a standard deviation of a value range similarity weight Gaussian function, and σ p is a standard deviation of a weak edge detail preservation weight Gaussian function.
4. An infrared image multilateral filtering denoising device for suppressing salt and pepper noise and preserving weak edge details, characterized in that, The device uses the salt and pepper noise suppression and weak edge detail retention infrared image multi-edge filtering denoising method according to claim 1, and the device comprises: an original data acquisition unit configured to acquire infrared image raw data; a correction unit configured to correct the infrared image raw data to obtain corrected data; a parameter calculation unit configured to calculate a salt and pepper noise suppression parameter; a weight value calculation unit configured to calculate a weak edge detail retention weight value; a multi-edge filtering unit configured to perform multi-edge filtering on the corrected data by using the salt and pepper noise suppression parameter and the weak edge detail retention weight value to obtain a filtering result; an output unit configured to output the filtering result; the parameter calculation unit comprises: a histogram calculation subunit configured to calculate a histogram of the corrected data; a cumulative histogram calculation subunit configured to calculate a cumulative histogram according to the histogram; a data determination subunit configured to determine a minimum window matrix and a maximum window matrix according to the cumulative histogram; a noise threshold value setting subunit configured to set a salt and pepper noise decision threshold value; The matrix calculation subunit is configured to calculate an effective signal decision matrix according to the minimum window matrix, the maximum window matrix, and the decision threshold; The replacement value calculation subunit is configured to calculate a replacement value of a center point of a filter window according to the effective signal decision matrix and the window matrix of the correction data; The replacement subunit is configured to replace the window matrix of the correction data with the replacement value of the center point of the filter window.
5. A computer device, comprising: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method in any one of claims 1 to 3 when executing the computer program.
6. A storage medium, characterized by The storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1 to 3.
Citation Information
Patent Citations
Image edge detection method based on window modified multi-level median filtering
CN102521804A
Image denoising method combining Tetrolet transform domain and PDE (Partial Differential Equation) and GCV (Generalized Cross Validation) theory
CN103679663A