FPGA-based nlmeans noise-reduction simplification method and system for infrared image, and medium and device
By simplifying the distance calculation of the infrared image nlmeans noise reduction algorithm on the FPGA platform, using linear superposition of Manhattan distance and Chebischev distance, the problem of low noise reduction efficiency on the FPGA platform is solved, and a faster and more efficient infrared image noise reduction effect is achieved.
Patent Information
- Application Number
- PCT/CN2023/139435
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-13
- Filing Date
- 2023-12-18
- Publication Date
- 2025-04-17
AI Technical Summary
When the prior art uses the FPGA platform to implement the infrared image nlmeans noise reduction algorithm, it is difficult to effectively handle complex floating-point operations and European-style distance calculations due to the resources and computing capabilities of the FPGA, resulting in low noise reduction efficiency.
A simplified method for infrared image nlmeans noise reduction based on FPGA is proposed. By simplifying distance calculation, the linear superposition of Manhattan distance and Chebishev distance is used to calculate the similarity of each matching block and the central block, and the weight is calculated based on the similarity to achieve the noise reduction result.
This method can basically maintain the noise reduction effect of the original nlmeans, and is more suitable for implementation on FPGA, with faster calculation speed and improved the noise reduction efficiency of infrared images.
Smart Images

Figure CN2023139435_17042025_PF_FP_ABST
Abstract
Description
FPGA-based infrared image NLmeans denoising simplification method, system, medium and device Technical Field
[0001] The present invention relates to the technical field of infrared image noise reduction, and in particular to an FPGA-based infrared image NLmeans noise reduction simplification method, system, medium and device. Background Art
[0002] Currently, infrared imaging technology is widely used in military, industrial, and agricultural fields. The growing demand for these applications places higher demands on the quality of infrared images. However, due to factors such as detector materials, processing methods, and the external environment, infrared images often contain some noise, which not only reduces image quality but also hinders the extraction of effective information from them. Extensive research has been conducted on infrared image denoising, and nlmeans is a very effective denoising algorithm.
[0003] Since many infrared devices are portable, they often implement algorithms based on FPGAs, which can effectively meet the needs of real-time scenarios. However, FPGAs have certain resource limitations and cannot perform particularly complex floating-point calculations. Therefore, some algorithms are complex and difficult to implement on FPGAs.
[0004] Patent document CN107590783A (application number: 201710754287.0) discloses an FPGA-based image noise reduction processing method, including: inputting image data into a template generation module, using a 1×7 neighborhood template to process the row data of the video image, and calculating the corresponding noise variance based on the amplitude of the input noise; performing median filtering on the generated 7 rows of original image data and noise variance through a median filtering module, calculating the median of the original video image data under four types of step sizes and the corresponding median of the noise variance, and outputting the results to a data analysis and selection module; calculating the range of the image signal under each step size based on the video image data and the corresponding noise variance under different step sizes, and selecting the optimal step size based on the range; and outputting the data through a data output module.
[0005] Aiming at the above problems, this paper proposes a simplified NLMeans denoising algorithm for infrared images based on FPGA, which can effectively remove noise from the original infrared image and is easy to implement on FPGA.
[0006] Summary of the Invention
[0007] In view of the defects in the prior art, the purpose of the present invention is to provide an FPGA-based infrared image NLMeans denoising simplification method, system, medium and device.
[0008] According to the present invention, a simplified FPGA-based infrared image NLmeans noise reduction method includes:
[0009] Step S1: Determine the search window size and the matching window size;
[0010] Step S2: Calculate the similarity between each matching block and the central block by linearly superposing the Manhattan distance and the Chebyshev distance;
[0011] Step S3: Calculate the weight of each matching block according to the similarity, and calculate the current noise reduction result according to each matching block and the corresponding weight.
[0012] Preferably, the step S1 adopts: determining a search window N*N; a matching window d*d; when N=11, d=3, there are 81 matching blocks in total.
[0013] Preferably, the step S2 adopts: S i =(1-a)Σ|a i -b i |+a max(|a i -b i |)
[0014] Among them, S i Represents similarity; a represents parameter, a i and b i Both represent the pixel values of the image blocks; the subscript i represents the same position in the two image blocks, i = 1, 2..., 9.
[0015] According to the present invention, an FPGA-based infrared image NLmeans denoising and simplification system is provided, comprising:
[0016] Module M1: Determine the search window size and matching window size;
[0017] Module M2: Manhattan distance and Chebyshev distance are linearly superimposed to calculate the similarity between each matching block and the central block;
[0018] Module M3: Calculates the weight of each matching block according to the similarity, and calculates the current noise reduction result based on each matching block and the corresponding weight.
[0019] Preferably, the module M1 adopts: determining a search window N*N; a matching window d*d; when N=11, d=3, there are 81 matching blocks in total.
[0020] Preferably, the module M2 adopts: Si =(1-a)Σ|a i -b i |+a max(|a i -b i |)
[0021] Among them, S i Represents similarity; a represents parameter, a i and b i Both represent the pixel values of the image blocks; the subscript i represents the same position in the two image blocks, i = 1, 2..., 9.
[0022] According to the present invention, a computer-readable storage medium storing a computer program is provided. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0023] According to the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The electronic device is characterized in that when the computer program is executed by the processor, the steps of the above-mentioned FPGA-based infrared image NLMeans denoising simplification method are implemented.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] 1. The method of the present invention can basically maintain the noise reduction effect of the original nlmeans, and the process is more convenient to implement on FPGA;
[0026] 2. Faster calculation speed is beneficial to improving the noise reduction efficiency of infrared images. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0028] Figure 1 is a schematic diagram of point distribution of the four methods at the same distance.
[0029] FIG2 is a comparison diagram of the algorithms of the present invention. DETAILED DESCRIPTION
[0030] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.
[0031] The present invention discloses a simplified NLMeans denoising method and system for infrared images based on FPGA, the purpose of which is to optimize the traditional NLMeans denoising algorithm, facilitate implementation on FPGA, and do not affect the denoising effect. NLMeans is a commonly used image denoising algorithm. The original NLMeans algorithm involves complex floating-point operations and Euclidean distance calculations. Floating-point operations and Euclidean distance calculations are easy to implement on general processors, but when implemented on FPGAs, a large amount of resources are consumed and the processing speed is also affected. Therefore, in order to better implement the NLMeans algorithm on FPGAs, the original algorithm process needs to be simplified. The present invention mainly simplifies the distance calculation. Experimental results show that the application of the method of the present invention can basically maintain the denoising effect of the original NLMeans, and the process is more convenient to implement on FPGAs.
[0032] Example 1
[0033] The present invention provides an FPGA-based infrared image NLmeans denoising simplification method, comprising:
[0034] Step 1: Determine the search window size and matching window size;
[0035] Step 2: Calculate the similarity between each matching block and the central block;
[0036] Step 3: Calculate the weight of each matching block based on the similarity;
[0037] Step 4: Calculate the current noise reduction result based on each matching block and its corresponding weight;
[0038] Specifically, the step 1 includes:
[0039] Assuming N = 11 and d = 3, there are 81 matching blocks in total;
[0040] Specifically, step 2: calculate the similarity Si between the matching block Pi (i=1...81) and the center block Q. The original nlmeans uses the Euclidean distance calculation (method 1), but it is more complicated due to the square sum calculation involved. In order to simplify, the Manhattan distance calculation (method 2) is directly used, but the effect loss is relatively large.
[0041] The corresponding pixels of the two image blocks are calculated:
[0042] Method 1: Si = sqrt(∑(a i -b i ) 2 ), Euclidean distance (the method used in the standard nlmeans algorithm);
[0043] Method 2: Si = ∑|a i-b i |, Manhattan distance;
[0044] Method 3: Si=max(|a i -b i |), Chebyshev distance;
[0045] Method 4: Si = (1-α)∑|a i -b i |+αmax(|a i -b i |), Manhattan distance + Chebyshev distance linear superposition;
[0046] As shown in Figure 1, it can be seen that the results of method 4 are closest to those of method 1.
[0047] Step 3: Calculate weights based on similarity, Where σ is the image noise level, and a lookup table is created based on Si to obtain the w value. For example, if Si ranges from 0 to 100,000, since σ is a fixed value, the corresponding w values for 0 to 100,000 can be calculated and stored in a table. In actual use, the w value is looked up based on the Si value.
[0048] Step 4: The result of denoising the central pixel of the central block Q, Pi c is the center pixel of the i-th matching block;
[0049] Therefore, the original nlmeans process is simplified to make it more suitable for implementation on FPGA without greatly affecting the effect.
[0050] Method 1 is the original nlmeans effect, Method 2 is Manhattan distance, Method 3 is Chebyshev distance, and Method 4 is a combination of Manhattan distance and Chebyshev distance. Method 4 is closer to the original nlmeans effect and simplifies the square calculation. The specific effect is shown in Figure 2; Figure 2 (a) is the effect diagram of Method 1; Figure 2 (b) is the effect diagram of Method 2; Figure 2 (c) is the effect diagram of Method 3; Figure 2 (d) is the effect diagram of Method 4.
[0051] The present invention provides an FPGA-based infrared image NLmeans noise reduction and simplification system, comprising:
[0052] Module 1: Determine the search window size and matching window size;
[0053] Module 2: Calculate the similarity between each matching block and the central block;
[0054] Module 3: Calculate the weight of each matching block based on similarity;
[0055] Module 4: Calculate the current noise reduction result based on each matching block and its corresponding weight;
[0056] Specifically, the module 1 includes:
[0057] Assuming N = 11 and d = 3, there are 81 matching blocks in total;
[0058] Specifically, module 2: calculates the similarity Si between the matching block Pi (i=1...81) and the center block Q. The original nlmeans method uses the Euclidean distance calculation (method 1), but it is more complicated due to the square sum calculation involved. In order to simplify, the Manhattan distance calculation (method 2) is directly used, but the effect is relatively lost.
[0059] The corresponding pixels of the two image blocks are calculated:
[0060] Method 1: Si = sqrt(∑(a i -b i ) 2 ), Euclidean distance (the method used in the standard nlmeans algorithm);
[0061] Method 2: Si = ∑|a i -b i |, Manhattan distance;
[0062] Method 3: Si=max(|a i -b i |), Chebyshev distance;
[0063] Method 4: Si = (1-α)∑|a i -b i |+αmax(|a i -b i |), Manhattan distance + Chebyshev distance linear superposition;
[0064] As shown in Figure 1, it can be seen that the results of method 4 are closest to those of method 1.
[0065] Module 3: Calculate weights based on similarity, Where σ is the image noise level, and a lookup table is created based on Si to obtain the w value. For example, if Si ranges from 0 to 100,000, since σ is a fixed value, the corresponding w values for 0 to 100,000 can be calculated and stored in a table. In actual use, the w value is looked up based on the Si value.
[0066] Module 4: The result after denoising the central pixel of the central block Q, Pi c is the center pixel of the i-th matching block;
[0067] Therefore, the original nlmeans process is simplified to make it more suitable for implementation on FPGA without greatly affecting the effect.
[0068] Method 1 is the original nlmeans effect, Method 2 is Manhattan distance, Method 3 is Chebyshev distance, and Method 4 is a combination of Manhattan distance and Chebyshev distance. Method 4 is closer to the original nlmeans effect and simplifies the square calculation. The specific effect is shown in Figure 2; Figure 2 (a) is the effect diagram of Method 1; Figure 2 (b) is the effect diagram of Method 2; Figure 2 (c) is the effect diagram of Method 3; Figure 2 (d) is the effect diagram of Method 4.
[0069] According to the present invention, a computer-readable storage medium storing a computer program is provided. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0070] According to the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The electronic device is characterized in that when the computer program is executed by the processor, the steps of the above-mentioned FPGA-based infrared image NLMeans denoising simplification method are implemented.
[0071] Those skilled in the art will appreciate that, in addition to implementing the system, device, and various modules provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, and the like by logically programming the method steps. Therefore, the system, device, and various modules provided by the present invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; the modules for implementing various functions can also be considered both software programs for implementing the method and structures within the hardware component.
[0072] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.
Claims
1. A simplified method of infrared image NLmeans denoising based on FPGA, characterized in that: include: Step S1: Determine the search window size and the matching window size; Step S2: The similarity between each matching block and the central block is calculated by linearly superposing the Manhattan distance and the Chebyshev distance; Step S3: Calculate the weight of each matching block according to the similarity, and calculate the current noise reduction result according to each matching block and the corresponding weight.
2. The FPGA-based infrared image nlmeans denoising simplification method according to claim 1, characterized in that: The step S1 adopts: determining a search window N*N; matching a window d*d; when N=11, d=3, there are 81 matching blocks in total.
3. The FPGA-based infrared image NLmeans denoising simplification method according to claim 1, characterized in that: The step S2 adopts: i =(1-a)∑|a i -b i |+a max(|a i -b i |) Among them, S i represents similarity; a represents parameter, a i and b i Both represent the pixel values of the image blocks; the subscript i represents the same position in the two image blocks.
4. An infrared image nlmeans denoising simplification system based on FPGA, characterized in that: include: Module M1: Determine the search window size and the matching window size; Module M2: Manhattan distance and Chebyshev distance are linearly superimposed to calculate the similarity between each matching block and the central block; Module M3: Calculate the weight of each matching block according to the similarity, and calculate the current noise reduction result according to each matching block and the corresponding weight.
5. The FPGA-based infrared image NLmeans denoising simplification system according to claim 4, characterized in that: The module M1 adopts: determining a search window N*N; matching a window d*d; when N=11, d=3, there are 81 matching blocks in total.
6. The FPGA-based infrared image NLmeans denoising and simplification system according to claim 4, characterized in that: The module M2 adopts: S i =(1-a)∑|a i -b i |+a max(|a i -b i |) Among them, S i represents similarity; a represents parameter, a i and b i Both represent the pixel values of the image blocks; the subscript i represents the same position in the two image blocks.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the FPGA-based infrared image NLmeans denoising simplification method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
FPGA-based image noise reduction processing method
CN107590783A
Multi-feature content-based image retrieval method and system
CN104298775A
Infrared image noise reduction method based on noise recognition
CN104463813A
Denoising enhancement device and method based on RGB-IR sensor
CN108391067A
Non-local average infrared image denoising method based on parameter optimization
CN113269687A