Method and system for processing sharpness of infrared image
By performing Gaussian filtering and multi-directional convolution operations on infrared images, weighting maps are generated and weighted processing is solved, and the problem of inaccurate repair of infrared images is achieved, effectively processing of directional noise and accurate repair of image sharpness is achieved.
Patent Information
- Application Number
- PCT/CN2024/101541
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-31
- Filing Date
- 2024-06-26
- Publication Date
- 2025-03-06
AI Technical Summary
The prior art cannot effectively handle directional noise, resulting in inaccurate repair of sharpness of infrared images.
After Gaussian filtering of the infrared image, convolution operations in width, height and diagonal directions are performed respectively to generate multiple direction weight maps, and superimpose them to generate a total position weight map. Combined with the convolutional gradient map, the sharpness of the image is calculated.
Effectively eliminate directional noise interference, avoid the problem of excessive sharpness repair, and avoid the problem of judging blurred pictures as clear, ensuring the accuracy of image sharpness repair.
Smart Images

Figure CN2024101541_06032025_PF_FP_ABST
Abstract
Description
A method and system for processing sharpness of infrared images Technical Field
[0001] The present invention relates to the field of infrared image processing, and in particular to a method and system for processing the sharpness of an infrared image. Background Art
[0002] Infrared image sharpness evaluation is a key metric for evaluating infrared image quality. It can be used to assess the clarity and detail of infrared images. In the field of infrared imaging, due to the unique characteristics of infrared images, such as low contrast, low resolution, and noise, infrared image sharpness evaluation is particularly important. Infrared image sharpness evaluation can help us better understand target information in infrared images and improve infrared image recognition and detection capabilities. For example, for access control or door lock infrared cameras, algorithms such as face recognition, detection, feature extraction, and anti-counterfeiting can only function effectively when the infrared image sharpness is high (generally speaking, the clearer the image, the better).
[0003] When infrared images are formed, vertical stripe noise generally appears due to the influence of noise such as circuit noise / sensor vibration / temperature changes in the infrared imaging system. These noises cannot be removed by traditional denoising methods. Therefore, when calculating the sharpness of these images based on traditional methods, these stripe noises will be added to the sharpness calculation process, resulting in the calculated sharpness being too large, and ultimately causing the blurred image to be judged as clear, resulting in inaccurate sharpness restoration of the output image.
[0004] Summary of the Invention
[0005] The purpose of the present invention is to solve the problem in the prior art that the conventional method cannot process directional noise, resulting in inaccurate image sharpness restoration, and proposes a sharpness processing method for infrared images, comprising: reading an infrared image to be processed, and performing Gaussian filtering on the infrared image to be processed to obtain a filtered processed image;
[0006] Performing convolution operations on the filtered image in several directions to obtain at least two directional weight maps; wherein the several directions include at least two directions: a width direction, a height direction, and a diagonal direction;
[0007] Superimposing the at least two directional weight maps to generate a total position weight map;
[0008] The image sharpness of the infrared image to be processed is calculated based on the weighted gradient map calculated based on the convolution gradient map and the total position weight map; wherein the convolution gradient map is obtained by performing a Laplace convolution operation on the filtered image.
[0009] The present invention provides a method for processing the sharpness of infrared images, which takes into account weight values in several directions, performs gradient convolution operations on the image at the same time, and then performs weighted processing on the processed image and the image after the gradient convolution operation. Through convolution gradient operations in multiple directions, the final restoration result is obtained by calculation. Not only when facing directional noise interference, the present invention uses multiple directional corrections and gradient weighted processing to ensure that the sharpness restoration of the image will not have the problem of unclear graphics caused by excessive restoration sharpness, but also will not have the problem of judging blurred images as clear, ultimately solving the problem of inaccurate output image sharpness restoration.
[0010] Furthermore, the convolution operation is performed on the filtered image in several directions to obtain at least two directional weight maps; wherein the several directions include at least two directions: width direction, height direction and diagonal direction, specifically:
[0011] According to the filtered image, a convolution kernel traverses the entire image in combination with a number of directional weight values. Whenever the convolution kernel traverses a pixel point, the completeness of the expanded interval of the pixel point is determined, and a pixel compensation scheme and directional weight matrix operation are performed to obtain at least two directional weight maps corresponding to the pixel point; wherein the expanded interval of the pixel point is a 3×3 interval centered on the pixel point, and the diagonal direction includes: a main diagonal direction and a sub-diagonal direction.
[0012] The present invention uses convolution operations in multiple directions to measure the infrared image to be processed from multiple angles when processing directional noise such as vertical stripe noise, and lays the foundation for eliminating noise from multiple angles.
[0013] Furthermore, whenever the convolution kernel traverses a pixel point, the interval position of the pixel point is determined, and the pixel point compensation scheme and direction weight matrix operation are performed, specifically:
[0014] When the pixel expansion is determined to be an incomplete 3×3 interval, a pixel compensation scheme is performed in which the data columns are filled with neighboring data and the data columns are filled with all 0s, and then a convolution operation is performed on the compensated pixel expansion interval matrix and at least two directional weight matrices;
[0015] When the pixel expansion is determined to be a 3×3 complete interval, a convolution operation of the pixel expansion interval matrix and at least two directional weight matrices is directly performed.
[0016] The present invention also takes into account the fact that when the convolution kernel enters the edge pixels of the image while traversing the entire image, the pixel expansion interval may be incomplete, resulting in deviation errors in the results after combining the position weight operation, which causes deviations in the sharpness repair of the edge pixels in the subsequent repair image sharpness calculation, resulting in blurred edges after image repair. Therefore, the pixel compensation scheme is used to ensure that the convolution operation of the edge pixels is at a reasonable level.
[0017] Furthermore, the at least two directional weight maps are superimposed to generate a total position weight map, specifically:
[0018] Performing a filtering calculation of the traversal weight map using rows and columns as coordinates on the at least two directional weight maps according to a statistical method to obtain a filtered weight coordinate map;
[0019] performing normalization calculation processing based on the filter weight coordinate map with the maximum value of the pixel value in the filter weight coordinate map as a base to obtain a normalized weight coordinate map;
[0020] According to the filtering weight coordinate map and the normalized weight coordinate map, weight coefficient assignment and superposition are performed to obtain a total position weight map.
[0021] Furthermore, the convolution gradient map is obtained by performing a Laplace convolution operation on the filtered image, specifically:
[0022] According to the filtered image, Gaussian kernels of different scales are collected, and a convolution operation is performed on the original Laplace operator and the Gaussian kernels of different scales to obtain Laplace operators of different scales;
[0023] Calculating the gradient of the image according to the Laplace operators of different scales to obtain Laplace gradient maps of different scales;
[0024] The Laplace gradient maps of different scales are merged and denoised to obtain the convolution gradient map.
[0025] Furthermore, the image sharpness of the infrared image to be processed is calculated based on the weighted gradient map calculated according to the convolution gradient map and the total position weight map, specifically:
[0026] Performing a matrix multiplication operation on corresponding points according to the convolution gradient map and the total position weight map to obtain a weighted gradient map;
[0027] Calculating the average value based on the weighted gradient map to obtain a weighted sharpness average value;
[0028] Performing variance calculation based on the weighted sharpness average value to obtain the image sharpness of the infrared image to be processed;
[0029] Furthermore, the infrared image to be processed is read, and Gaussian filtering is performed on the infrared image to be processed to obtain a filtered image, specifically:
[0030] Read the input infrared image to be processed;
[0031] According to the defined Gaussian kernel size and standard deviation, the Gaussian kernel is traversed over each pixel of the infrared image to be processed, and a weighted average calculation is performed to obtain a new value of each pixel;
[0032] Waiting for the Gaussian kernel to traverse the infrared image to be processed to obtain the filter processing image.
[0033] The present invention also proposes an infrared image sharpness processing system, comprising:
[0034] Filter processing module, Laplace convolution processing module, directional convolution processing module, overall image generation module, sharpness calculation module;
[0035] The filtering processing module is used to read the infrared image to be processed and perform Gaussian filtering on the infrared image to be processed to obtain a filtered processed image;
[0036] The Laplace convolution processing module is used to obtain a convolution gradient map after performing a Laplace convolution operation on the filtered image;
[0037] The directional convolution processing module is used to perform convolution operations on the filtered image in several directions to obtain at least two directional weight maps; wherein the several directions include at least two directions of width, height and diagonal directions;
[0038] The total map generation module is used to superimpose the at least two direction weight maps to generate a total position weight map;
[0039] The sharpness calculation module is used to calculate the image sharpness of the infrared image to be processed based on the weighted gradient map calculated from the convolution gradient map and the total position weight map.
[0040] The present invention provides an infrared image sharpness processing system, in which each module is interconnected and responds quickly to each other. By filtering the image, directional weighted processing and convolution gradient processing are performed on the image to repair the image, the interference of directional noise in the image is eliminated, the problem of excessive sharpness is reduced, and the problem of inaccurate image sharpness restoration is solved.
[0041] Furthermore, the directional convolution processing module is used to perform convolution operations on the filtered image in several directions to obtain at least two directional weight maps; wherein the several directions include at least two directions: width direction, height direction and diagonal direction, specifically:
[0042] According to the filtered image, a convolution kernel is traversed over the entire image in combination with a plurality of directional weight values. Whenever the convolution kernel traverses a pixel point, the completeness of the expanded interval of the pixel point is determined, and a pixel compensation scheme and a directional weight matrix operation are performed to obtain at least two directional weight maps corresponding to the pixel point.
[0043] The expanded interval of the pixel point is a 3×3 interval centered on the pixel point, and the diagonal direction includes: a main diagonal direction and a sub-diagonal direction.
[0044] Furthermore, whenever the convolution kernel traverses a pixel point, the interval position of the pixel point is determined, and the pixel point compensation scheme and direction weight matrix operation are performed, specifically:
[0045] When the pixel expansion is determined to be an incomplete 3×3 interval, a pixel compensation scheme is performed in which the data columns are filled with neighboring data and the data columns are filled with all 0s, and then a convolution operation is performed on the compensated pixel expansion interval matrix and at least two directional weight matrices;
[0046] When the pixel expansion is determined to be a 3×3 complete interval, a convolution operation of the pixel expansion interval matrix and at least two directional weight matrices is directly performed.
[0047] Furthermore, the total map generation module is used to superimpose the at least two directional weight maps to generate a total position weight map, specifically:
[0048] Performing a filtering calculation of the traversal weight map using rows and columns as coordinates on the at least two directional weight maps according to a statistical method to obtain a filtered weight coordinate map;
[0049] performing normalization calculation processing based on the filter weight coordinate map with the maximum value of the pixel value in the filter weight coordinate map as a base to obtain a normalized weight coordinate map;
[0050] According to the filtering weight coordinate map and the normalized weight coordinate map, weight coefficient assignment and superposition are performed to obtain a total position weight map.
[0051] Furthermore, the Laplace convolution processing module is used to obtain a convolution gradient map after performing a Laplace convolution operation on the filtered image, specifically:
[0052] According to the filtered image, Gaussian kernels of different scales are collected, and a convolution operation is performed on the original Laplace operator and the Gaussian kernels of different scales to obtain Laplace operators of different scales;
[0053] Calculating the gradient of the image according to the Laplace operators of different scales to obtain Laplace gradient maps of different scales;
[0054] The Laplace gradient maps of different scales are merged and denoised to obtain the convolution gradient map.
[0055] Furthermore, the sharpness calculation module is used to calculate the image sharpness of the infrared image to be processed based on the weighted gradient map calculated from the convolution gradient map and the total position weight map, specifically:
[0056] Performing a matrix multiplication operation on corresponding points according to the convolution gradient map and the total position weight map to obtain a weighted gradient map;
[0057] Calculating the average value based on the weighted gradient map to obtain a weighted sharpness average value;
[0058] A variance calculation is performed based on the weighted sharpness average value to obtain the image sharpness of the infrared image to be processed.
[0059] Furthermore, the filtering processing module is used to read the infrared image to be processed and perform Gaussian filtering on the infrared image to be processed to obtain a filtered image, specifically:
[0060] Read the input infrared image to be processed;
[0061] According to the defined Gaussian kernel size and standard deviation, the Gaussian kernel is traversed over each pixel of the infrared image to be processed, and a weighted average calculation is performed to obtain a new value of each pixel;
[0062] Waiting for the Gaussian kernel to traverse the infrared image to be processed to obtain the filter processing image. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] FIG1 is a flowchart of a method for processing sharpness of an infrared image provided by an embodiment of the present invention;
[0064] FIG2 is a block diagram of a system for processing sharpness of infrared images according to an embodiment of the present invention;
[0065] FIG3 is a block diagram of a directional convolution processing module provided by an embodiment of the present invention;
[0066] FIG4 is a block diagram of a general diagram generation module provided by an embodiment of the present invention;
[0067] FIG5 is a block diagram of a Laplace convolution processing module provided by an embodiment of the present invention;
[0068] FIG6 is a block diagram of a sharpness calculation module provided by an embodiment of the present invention;
[0069] FIG7 is a block diagram of a filtering processing module provided by an embodiment of the present invention;
[0070] FIG8 is a schematic diagram of an image after 8×8 filtering provided by an embodiment of the present invention;
[0071] FIG9 is a schematic diagram of a widthwise convolution operation provided by an embodiment of the present invention;
[0072] FIG10 is a schematic diagram of a height-direction convolution operation provided by an embodiment of the present invention;
[0073] FIG11 is a schematic diagram of a convolution operation in a main diagonal direction provided by an embodiment of the present invention;
[0074] FIG12 is a schematic diagram of a sub-diagonal convolution operation provided by an embodiment of the present invention;
[0075] FIG13 is a schematic diagram of a pixel compensation solution provided by an embodiment of the present invention;
[0076] FIG14 is a schematic diagram of Laplace gradient calculation provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0077] The following, in conjunction with specific embodiments and accompanying drawings, clearly and completely describes the technical solutions of a method and system for processing infrared image sharpness according to the present invention. It should be understood that the embodiments described herein are merely a portion of the embodiments of the present invention, and not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.
[0078] Example 1
[0079] Referring to FIG1 , the present invention proposes a method for processing sharpness of infrared images, which is specifically as follows:
[0080] S101 , reading an infrared image to be processed, and performing Gaussian filtering on the infrared image to be processed to obtain a filtered image.
[0081] As an example of this embodiment, referring to FIG8 , taking an 8×8 image as an example, the input infrared image to be processed is read; Gaussian filtering is performed according to the defined Gaussian kernel size and standard deviation, the Gaussian kernel is traversed over each pixel point of the infrared image to be processed, and a weighted average calculation is performed to obtain a new value of each pixel point; and the Gaussian kernel is waited for to traverse the infrared image to be processed to obtain a filtering processing image with each pixel point as a new value.
[0082] S102, performing convolution operations on the filtered image in several directions to obtain at least two directional weight maps; wherein the several directions include at least two directions: a width direction, a height direction, and a diagonal direction;
[0083] As an example of this embodiment, referring to Figures 9, 10, 11 and 12, according to the filtered image, the entire image is traversed by the convolution kernel in combination with the directional weight value, and each time a pixel point is traversed, the pixel point is matrix-expanded and a directional weight matrix operation is performed to obtain at least two directional weight maps corresponding to the pixel point, wherein the width direction convolution operation is as shown in Figure 9, and the height direction convolution operation is as shown in Figure 10; the pixel point is matrix-expanded into: a 3×3 interval centered on the pixel point, and the diagonal direction also includes a main diagonal direction and a sub-diagonal direction, the main diagonal direction convolution operation is as shown in Figure 11, and the sub-diagonal direction convolution operation is as shown in Figure 12.
[0084] The present invention uses convolution operations in multiple directions to measure the infrared image to be processed from multiple angles when processing directional noise such as vertical stripe noise, and lays the foundation for eliminating noise from multiple angles.
[0085] As another example of this embodiment, referring to FIG13 , each time the convolution kernel traverses a pixel point, the pixel point is expanded into a matrix and the completeness of the expanded interval is judged. When traversing the edge pixel point as shown in FIG13 , the pixel point expanded interval is an incomplete 3×3 interval. Therefore, a pixel point compensation scheme is adopted in which data columns are filled with neighboring data and columns without data are filled with 0 to compensate the pixel point. After the expanded interval is judged to be a complete 3×3 interval, the directional weight matrix operation is performed.
[0086] The present invention also takes into account the fact that when the convolution kernel enters the edge pixels of the image while traversing the entire image, the pixel expansion interval may be incomplete, resulting in deviation errors in the results after combining the position weight operation, which causes deviations in the sharpness repair of the edge pixels in the subsequent repair image sharpness calculation, resulting in blurred edges after image repair. Therefore, the pixel compensation scheme is used to ensure that the convolution operation of the edge pixels is at a reasonable level.
[0087] S103, superimposing the at least two directional weight maps to generate a total position weight map;
[0088] As an example of this embodiment, according to a statistical method, filtering calculation of the traversal weight map with rows and columns as coordinates is performed on the at least two directional weight maps to obtain a filtering weight coordinate map, and the specific method is as follows:
[0089] Traverse the weight graph according to the following formula:
[0090] Here, weight map filtering is performed sequentially for the four weight maps shown in Figures 9, 10, 11, and 12. The same steps are repeated for each weight map. Take the width direction (W) weight as an example:
[0091] Where E is the mean, w is the image width, h is the image height, W0 (i,j) is the weight value at the coordinate (i, j) of the weight map in the width direction (W), that is, the standard deviation of the pixel value σ, W1 (i,j) is the weight value at the coordinate (i, j) after filtering the width direction (W) weight map, that is, the pixel value.
[0092] According to the filter weight coordinate map, a normalization calculation process is performed with the maximum value of the pixel value in the filter weight coordinate map as the base to obtain a normalized weight coordinate map, specifically:
[0093] Traverse the filtered weight graph according to the following formula:
[0094] The weight map normalization here is performed sequentially on the four filtered weight maps calculated by the statistical filtering method above. The same steps are repeated for each of them. Take the weight map after filtering in the width direction (W) as an example:
[0095] Where W1 (i,j) is the weight value at the coordinate (i, j) after filtering the weight map in the width direction (W), i.e., the pixel value; W2 (i,j) is the weight value at the coordinate (i, j) of the normalized weight map in the width direction (W), that is, the pixel value; MAX(W1 (i,j) ) is the maximum weight value in the weight map coordinate map after filtering in the width direction (W), that is, the maximum value in the data.
[0096] According to the filtering weight coordinate map and the normalized weight coordinate map, weight coefficient assignment and superposition are performed to obtain a total position weight map, specifically:
[0097] The total position weight map is generated according to the following formula: W (i,j) =β w ×W w2 (i,j) +β h ×Wh2 (i,j) +β md ×Wmd2 (i,j) +β sd ×Wsd2 (i,j)
[0098] Where:
[0099] W (i,j) is the weight value of the position (i, j) in the total position weight graph, β w is the width direction weight coefficient, β h is the height direction weight coefficient, β md is the weight coefficient for the main diagonal direction, β sd is the weight coefficient in the sub-diagonal direction, and: w +β h +β md +β sd =1, the coefficient can be adjusted according to actual conditions; Ww2 (i,j) is the weight value of the width weight map (i, j) position after normalization, Wh2 (i,j) is the weight value of the normalized width weight map (i, j) position, Wmd2 (i,j) is the weight value of the position (i, j) of the normalized main diagonal weight map, Wsd2 (i,j) is the weight value of the position (i, j) in the sub-diagonal weight map after normalization.
[0100] S104, calculating the image sharpness of the infrared image to be processed based on the weighted gradient map calculated from the convolution gradient map and the total position weight map; wherein the convolution gradient map is obtained by performing a Laplace convolution operation on the filtered image.
[0101] As an example of this embodiment, referring to FIG14 , according to the filtered image, Gaussian kernels of different scales are collected, and the original Laplace operator is convolved with the Gaussian kernels of different scales to obtain Laplace operators of different scales; the gradient of the image is calculated according to the Laplace operators of different scales to obtain Laplace gradient maps of different scales; and the Laplace gradient maps of different scales are merged and denoised to obtain the convolution gradient map, which is specifically:
[0102] Step 1: Define Gaussian kernels of different scales: In order to obtain Laplace operators of different scales, it is necessary to define Gaussian kernels of different scales. The size and standard deviation of the Gaussian kernel determine the effect and scale of the Gaussian blur.
[0103] Step 2: Convolve the original Laplace operator: Convolve the original Laplace operator with Gaussian kernels of different scales to obtain Laplace operators of different scales. You can use the cv::filter2D function in OpenCV to implement the convolution operation.
[0104] Step 3: Output Laplace operators of different scales: After Gaussian blur processing, Laplace operators of different scales can be obtained.
[0105] Step 4: Use different Laplace operators to calculate the gradient of the image: Use different Laplace operators to perform the Laplace gradient map generation calculation in the original step above on the image.
[0106] Step 5: Laplace gradient map merging: Merge the gradients of the different Laplace gradient maps in step 4. The merging methods can be (mean method, weighted average method, maximum method, wavelet transform method, etc.). Here, wavelet transform method is used for merging (using wavelet transform to decompose and reconstruct Laplace gradient maps of different scales to obtain a merged gradient map. Wavelet transform method can retain edge information and remove noise at the same time). The details are as follows:
[0107] (1) Perform wavelet decomposition on the Laplace gradient images of different scales: Use wavelet transform to decompose the Laplace gradient images of different scales to obtain low-frequency and high-frequency coefficients of different scales.
[0108] (2) Weighted averaging of low-frequency coefficients: The low-frequency coefficients of different scales are weighted averaged to obtain a weighted average low-frequency coefficient. Different weights can be set according to the importance of Laplace gradient maps of different scales to retain edge information.
[0109] (3) Threshold processing of high-frequency coefficients: Threshold processing is performed on high-frequency coefficients of different scales to remove noise.
[0110] (4) Reconstructing the weighted average low-frequency coefficients and the high-frequency coefficients after threshold processing: Use wavelet transform to reconstruct the weighted average low-frequency coefficients and the high-frequency coefficients after threshold processing to obtain a merged gradient map.
[0111] As another example of this embodiment, according to the convolution gradient map and the total position weight map, a matrix corresponding point multiplication operation is performed to obtain a weighted gradient map, and the formula is as follows: G (i,j) =W (i,j) ×L (i,j)
[0112] According to the weighted gradient map, an average value is calculated to obtain the weighted sharpness average value, which is as follows:
[0113] According to the weighted average sharpness, variance calculation is performed to obtain the image sharpness of the infrared image to be processed, and the formula is as follows:
[0114] The present invention provides a method for processing the sharpness of infrared images, which takes into account weight values in several directions, performs gradient convolution operations on the image at the same time, and then performs weighted processing on the processed image and the image after the gradient convolution operation. Through convolution gradient operations in multiple directions, the final restoration result is obtained by calculation. Not only when facing directional noise interference, the present invention uses multiple directional corrections and gradient weighted processing to ensure that the sharpness restoration of the image will not have the problem of unclear graphics caused by excessive restoration sharpness, but also will not have the problem of judging blurred images as clear, ultimately solving the problem of inaccurate output image sharpness restoration.
[0115] Example 2
[0116] Referring to FIG2 , the present invention further provides an infrared image sharpness processing system, comprising:
[0117] Filter processing module 205, Laplace convolution processing module 203, directional convolution processing module 201, overall image generation module 202, sharpness calculation module 204;
[0118] The filtering processing module is used to read the infrared image to be processed and perform Gaussian filtering on the infrared image to be processed to obtain a filtered processed image;
[0119] As an example of this embodiment, referring to FIG7 , the image acquisition module 701 reads the input infrared image to be processed; according to the Gaussian kernel size and standard deviation defined and stored in the second Gaussian kernel storage module 702, the Gaussian kernel is traversed over each pixel point of the infrared image to be processed, and the weighted mean calculation module 703 performs weighted average calculation to obtain new values of each pixel point; wait for the Gaussian kernel to traverse the infrared image to be processed, and obtain the filtering processing image from the image output module 704.
[0120] The Laplace convolution processing module is used to obtain a convolution gradient map after performing a Laplace convolution operation on the filtered image;
[0121] As an example of this embodiment, referring to FIG5 , the second filtered image acquisition module 501 obtains the filtered image, the first Gaussian kernel storage module 502 acquires defined Gaussian kernels of different scales, and the convolution operation module 503 performs convolution operation on the original Laplace operator and the defined Gaussian kernels of different scales to obtain Laplace operators of different scales.
[0122] According to the Laplace operators of different scales, the gradient calculation module 504 performs gradient calculation on the image to obtain Laplace gradient maps of different scales;
[0123] The merging and denoising module 505 performs merging and denoising based on the Laplace gradient maps of different scales to obtain the convolution gradient map.
[0124] The directional convolution processing module is used to perform convolution operations on the filtered image in several directions to obtain at least two directional weight maps; wherein the several directions include at least two directions of width, height and diagonal directions;
[0125] As an example of this embodiment, referring to Figure 3, according to the filtered processed image collected by the first filtered image acquisition module 301, the convolution kernel traverses the entire image in combination with several directional weight values. Whenever the convolution kernel traverses a pixel point, the expansion interval judgment module 303 judges the completeness of the expansion interval of the pixel point. When the pixel point expansion is determined to be a 3×3 incomplete interval, the pixel point compensation module 304 performs a pixel point compensation scheme in which the data columns are filled with neighboring data and the data columns are filled with 0. The directional weight matrix operation module 305 then performs a convolution operation on the compensated pixel point expansion interval matrix and at least two directional weight matrices; when the pixel point expansion is determined to be a 3×3 complete interval, the directional weight matrix operation module directly performs a convolution operation on the pixel point expansion interval matrix and at least two directional weight matrices to obtain at least two directional weight maps corresponding to the pixel point; wherein, the expansion interval of the pixel point in the convolution kernel expansion module 302 is a 3×3 interval centered on the pixel point, and the diagonal direction also includes: a main diagonal direction and a sub-diagonal direction.
[0126] The total map generation module is used to superimpose the at least two direction weight maps to generate a total position weight map;
[0127] As an example of this embodiment, referring to FIG4 , the filtering module 402 performs filtering calculations on the at least two directional weight maps collected by the first weight map collection module 401 using rows and columns as coordinates according to a statistical method to obtain a filtered weight coordinate map.
[0128] According to the filter weight coordinate map, the normalization processing module 403 performs normalization calculation processing based on the maximum value of the pixel value in the filter weight coordinate map to obtain a normalized weight coordinate map;
[0129] According to the filtering weight coordinate map and the normalized weight coordinate map, the total position weight map generation module 404 performs weight coefficient assignment and superposition to obtain a total position weight map.
[0130] The sharpness calculation module is used to calculate the image sharpness of the infrared image to be processed based on the weighted gradient map calculated from the convolution gradient map and the total position weight map.
[0131] As an example of this embodiment, referring to FIG6 , the total position weight map collected by the second weight map collection module 601 and the convolution gradient map collected by the gradient map collection module 602 are sent to the multiplication weighting module 603 to perform a matrix multiplication operation on corresponding points to obtain a weighted gradient map;
[0132] According to the weighted gradient map, the mean calculation module 604 performs average calculation to obtain a weighted sharpness average value;
[0133] The variance calculation module 605 performs variance calculation based on the weighted sharpness average value to obtain the image sharpness of the infrared image to be processed.
[0134] The present invention provides an infrared image sharpness processing system, in which each module is interconnected and responds quickly to each other. By filtering the image, directional weighted processing and convolution gradient processing are performed on the image to repair the image, the interference of directional noise in the image is eliminated, the problem of excessive sharpness is reduced, and the problem of inaccurate image sharpness restoration is solved.
[0135] In the description of this specification, the reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless they are mutually inconsistent.
[0136] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the description of this application, "plurality" means two or more, unless otherwise specifically defined.
[0137] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing sharpness of an infrared image, characterized in that: include: Reading the infrared image to be processed, and performing Gaussian filtering on the infrared image to be processed to obtain a filtered processed image; Perform convolution operations on the filtered image in several directions respectively to obtain at least two directional weight maps; wherein the several directions include: at least two directions of width direction, height direction and diagonal direction; Superimposing the at least two directional weight maps to generate a total position weight map; The image sharpness of the infrared image to be processed is calculated based on the weighted gradient map calculated according to the convolution gradient map and the total position weight map; wherein the convolution gradient map is obtained by performing a Laplace convolution operation on the filtered processed image.
2. The infrared image sharpness processing method according to claim 1, characterized in that: The convolution operation is performed on the filtered image in several directions to obtain at least two directional weight maps; wherein the several directions include at least two directions of width direction, height direction and diagonal direction, specifically: According to the filtered image, a convolution kernel traverses the entire image in combination with a number of directional weight values. Whenever the convolution kernel traverses a pixel point, the completeness of the expanded interval of the pixel point is determined, and a pixel compensation scheme and directional weight matrix operation are performed to obtain at least two directional weight maps corresponding to the pixel point; wherein the expanded interval of the pixel point is a 3×3 interval centered on the pixel point, and the diagonal direction includes: a main diagonal direction and a sub-diagonal direction.
3. The method for processing infrared image sharpness according to claim 2, characterized in that: Whenever the convolution kernel traverses a pixel point, the interval position of the pixel point is determined, and the pixel point compensation scheme and directional weight matrix operation are performed, specifically: When the pixel expansion is determined to be a 3×3 incomplete interval, a pixel compensation scheme is performed in which neighboring data are filled in the data columns and all zeros are filled in the data columns, and then a convolution operation is performed on the compensated pixel expansion interval matrix and at least two directional weight matrices; When the pixel expansion is determined to be a 3×3 complete interval, a convolution operation of the pixel expansion interval matrix and at least two directional weight matrices is directly performed.
4. The infrared image sharpness processing method according to claim 1, characterized in that: The at least two directional weight maps are superimposed to generate a total position weight map, specifically: According to a statistical method, filtering calculation of the traversal weight map with rows and columns as coordinates is performed on the at least two directional weight maps to obtain a filtering weight coordinate map; According to the filter weight coordinate map, a normalization calculation process is performed with the maximum value of the pixel value in the filter weight coordinate map as the base to obtain a normalized weight coordinate map; According to the filtering weight coordinate map and the normalized weight coordinate map, weight coefficient assignment and superposition are performed to obtain a total position weight map.
5. The infrared image sharpness processing method according to claim 1, characterized in that: The convolution gradient map is obtained by performing Laplace convolution operation on the filtered image, specifically: According to the filtered processed image, Gaussian kernels of different scales are collected, and the original Laplace operator is convolved with the Gaussian kernels of different scales to obtain Laplace operators of different scales; Calculating the gradient of the image according to the Laplace operators of different scales to obtain Laplace gradient maps of different scales; The Laplace gradient maps of different scales are merged and denoised to obtain the convolution gradient map.
6. The infrared image sharpness processing method according to claim 1, characterized in that: The weighted gradient map calculated according to the convolution gradient map and the total position weight map is used to calculate the image sharpness of the infrared image to be processed, specifically: According to the convolution gradient map and the total position weight map, performing a matrix corresponding point multiplication operation to obtain a weighted gradient map; Calculating the average value according to the weighted gradient map to obtain a weighted sharpness average value; According to the weighted sharpness average value, variance calculation is performed to obtain the image sharpness of the infrared image to be processed.
7. The infrared image sharpness processing method according to claim 1, characterized in that: The reading of the infrared image to be processed and performing Gaussian filtering on the infrared image to be processed to obtain a filtered processed image is specifically as follows: Read the input infrared image to be processed; According to the defined Gaussian kernel size and standard deviation, the Gaussian kernel is traversed to each pixel point of the infrared image to be processed, and a weighted average value is calculated to obtain a new value of each pixel point; Waiting for the Gaussian kernel to traverse the infrared image to be processed to obtain the filter processing image.
8. A sharpness processing system for infrared images, characterized in that: include: Filter processing module, Laplace convolution processing module, directional convolution processing module, overall image generation module, sharpness calculation module; The filtering processing module is used to read the infrared image to be processed, and perform Gaussian filtering on the infrared image to be processed to obtain a filtered processed image; The Laplace convolution processing module is used to obtain a convolution gradient map after performing a Laplace convolution operation on the filtered image; The directional convolution processing module is used to perform convolution operations on the filtered processed image in several directions respectively to obtain at least two directional weight maps; wherein the several directions include: at least two directions of width direction, height direction and diagonal direction; The total map generation module is used to perform superposition processing on the at least two directional weight maps to generate a total position weight map; The sharpness calculation module is used to calculate the image sharpness of the infrared image to be processed according to the weighted gradient map calculated by the convolution gradient map and the total position weight map.
9. The infrared image sharpness processing system according to claim 8, characterized in that: The directional convolution processing module is used to perform convolution operations on the filtered processed image in several directions respectively to obtain at least two directional weight maps; wherein the several directions include: at least two directions of width direction, height direction and diagonal direction, specifically: According to the filtered image, a convolution kernel traverses the entire image in combination with a plurality of directional weight values, and whenever the convolution kernel traverses a pixel point, determines the completeness of the expansion interval of the pixel point, executes a pixel point compensation scheme and a directional weight matrix operation, and obtains at least two directional weight maps corresponding to the pixel point; The expanded interval of the pixel point is a 3×3 interval centered on the pixel point, and the diagonal direction includes: a main diagonal direction and a sub-diagonal direction.
10. The infrared image sharpness processing system according to claim 9, characterized in that: Whenever the convolution kernel traverses a pixel point, the interval position of the pixel point is determined, and the pixel point compensation scheme and directional weight matrix operation are performed, specifically: When the pixel expansion is determined to be a 3×3 incomplete interval, a pixel compensation scheme is performed in which neighboring data are filled in the data columns and all zeros are filled in the data columns, and then a convolution operation is performed on the compensated pixel expansion interval matrix and at least two directional weight matrices; When the pixel expansion is determined to be a 3×3 complete interval, a convolution operation of the pixel expansion interval matrix and at least two directional weight matrices is directly performed.
11. The infrared image sharpness processing system according to claim 8, characterized in that: The total map generation module is used to perform superposition processing on the at least two directional weight maps to generate a total position weight map, specifically: According to a statistical method, filtering calculation of the traversal weight map with rows and columns as coordinates is performed on the at least two directional weight maps to obtain a filtering weight coordinate map; According to the filter weight coordinate map, a normalization calculation process is performed with the maximum value of the pixel value in the filter weight coordinate map as the base to obtain a normalized weight coordinate map; According to the filtering weight coordinate map and the normalized weight coordinate map, weight coefficient assignment and superposition are performed to obtain a total position weight map.
12. The infrared image sharpness processing system according to claim 8, characterized in that: The Laplace convolution processing module is used to obtain a convolution gradient map after performing a Laplace convolution operation on the filtered image, specifically: According to the filtered processed image, Gaussian kernels of different scales are collected, and the original Laplace operator is convolved with the Gaussian kernels of different scales to obtain Laplace operators of different scales; Calculating the gradient of the image according to the Laplace operators of different scales to obtain Laplace gradient maps of different scales; The Laplace gradient maps of different scales are merged and denoised to obtain the convolution gradient map.
13. The infrared image sharpness processing system according to claim 8, characterized in that: The sharpness calculation module is used to calculate the image sharpness of the infrared image to be processed according to the weighted gradient map calculated from the convolution gradient map and the total position weight map, specifically: According to the convolution gradient map and the total position weight map, performing a matrix corresponding point multiplication operation to obtain a weighted gradient map; Calculating the average value according to the weighted gradient map to obtain a weighted sharpness average value; According to the weighted sharpness average value, variance calculation is performed to obtain the image sharpness of the infrared image to be processed.
14. The infrared image sharpness processing system according to claim 8, characterized in that: The filtering processing module is used to read the infrared image to be processed and perform Gaussian filtering on the infrared image to be processed to obtain a filtered processed image, specifically: Read the input infrared image to be processed; According to the defined Gaussian kernel size and standard deviation, the Gaussian kernel is traversed to each pixel point of the infrared image to be processed, and a weighted average value is calculated to obtain a new value of each pixel point; Waiting for the Gaussian kernel to traverse the infrared image to be processed to obtain the filter processing image.
Citation Information
Patent Citations
Remote sensing image quality definition comprehensive evaluation module and evaluation method
CN112001904A
Novel image sharpness method for automatic focusing
CN115861440A
Sharpness calculation device and method
CN116228588A
Infrared image sharpness processing method and system
CN117078557A
Calculating a sharpness value
US9633445B1