Image processing method, electronic equipment and storage medium

By using a rectangular search box to adjust the image denoising method, the problem of imbalance between image denoising effect and hardware resource consumption is solved, a balance between denoising effect and resource consumption is achieved, and computing efficiency and denoising quality are improved.

CN120707424APending Publication Date: 2025-09-26HUNAN GOKE MICROELECTRONICS CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510819293.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing technology, it is difficult to strike a balance between image noise reduction effect and hardware resource consumption. In particular, when using the non-local mean filtering algorithm, the large window range leads to excessive hardware resource consumption.

Method used

A rectangular search box is used instead of a square search box. The vertical half-length of the rectangular search box is smaller than the horizontal half-length. By adjusting the shape and size of the search box, the computational complexity and hardware resource consumption are reduced while retaining sufficient image redundancy information.

Benefits of technology

While ensuring the noise reduction effect, it significantly reduces hardware resource consumption, achieving a balance between image noise reduction effect and hardware resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707424A_ABST
    Figure CN120707424A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method, electronic equipment and a storage medium, and relates to the technical field of image processing, and the method comprises the following steps: determining a rectangular search box in a to-be-processed image; performing similarity analysis on a central frame in the rectangular search frame and each similar frame relative to the central frame to obtain an analysis result; and carrying out noise reduction processing on the pixels in the central frame based on the analysis result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an image processing method, electronic equipment, and storage medium. Background Art

[0002] With the continuous development of imaging technology, how to effectively reduce image noise is becoming increasingly important. Common image denoising techniques include the non-local means filtering algorithm, whose core idea is to use redundant information in the entire image to remove noise while preserving as much image detail as possible.

[0003] When the non-local mean filtering algorithm is actually used, a search box of a certain range is often selected. The Euclidean distance between the central pixel block and similar pixel blocks in the search box is calculated as the similarity to obtain the final denoised pixel value.

[0004] Generally speaking, a larger window size yields more image redundancy and better noise reduction, but this also increases hardware resource consumption. Therefore, achieving a balance between image noise reduction effectiveness and hardware resource consumption has become a pressing issue in the industry. Summary of the Invention

[0005] The present invention provides an image processing method, an electronic device and a storage medium, which are used to solve the problem in the prior art of how to achieve a balance between image noise reduction effect and hardware resource consumption.

[0006] The present invention provides an image processing method, comprising the following steps: Determine a rectangular search box in the image to be processed; Performing similarity analysis on a central frame within the rectangular search frame and similar frames relative to the central frame to obtain an analysis result; Noise reduction processing is performed on the pixels within the center frame based on the analysis result.

[0007] According to an image processing method provided by the present invention, the half length of the rectangular search box in the vertical direction is R1, and the half length in the horizontal direction is R2. <R2。

[0008] According to an image processing method provided by the present invention, the R1 is positively correlated with the R2 and negatively correlated with the half-length of the center frame.

[0009] According to an image processing method provided by the present invention, the rectangular search box includes a first edge area, a center area, and a second edge area, and the first edge area, the center area, and the second edge area are arranged in sequence along a vertical direction; The performing similarity analysis on the central frame within the rectangular search frame and the similar frames relative to the central frame to obtain the analysis result includes: Selecting a square center frame, a first rectangular frame, and a second rectangular frame from the center area, wherein the first rectangular frame corresponds to the first edge area, the second rectangular frame corresponds to the second edge area, and the center frame includes the square center frame, the first rectangular frame, and the second rectangular frame; performing a similarity analysis using the first rectangular frame and each similar frame in the corresponding first edge region relative to the first rectangular frame to obtain a first analysis result; performing a similarity analysis using the second rectangular frame and each similar frame in the corresponding second edge region relative to the second rectangular frame to obtain a second analysis result; The analysis results include the first analysis results and the second analysis results.

[0010] According to an image processing method provided by the present invention, after selecting the square center frame, the first rectangular frame, and the second rectangular frame from the central area, the method further includes: A similarity analysis is performed using the square center frame and each similar frame in the rectangular search frame relative to the square center frame to obtain a third analysis result, which also includes the third analysis result.

[0011] According to an image processing method provided by the present invention, performing similarity analysis on a central frame within the rectangular search frame and similar frames relative to the central frame to obtain an analysis result includes: In the rectangular search box, SAD operations are performed on the central box and each similar box relative to the central box to obtain various analysis results.

[0012] According to an image processing method provided by the present invention, performing noise reduction processing on pixels within the center frame based on the analysis result includes: determining a central brightness value based on each pixel within the central frame; Obtaining a corresponding noise reduction intensity and a corresponding noise level according to the central brightness value; Determining a similarity weight corresponding to each similar frame according to the noise reduction intensity and noise level and each of the analysis results; Noise reduction processing is performed on the central pixel in the central frame based on the similarity weights corresponding to the similar frames.

[0013] According to an image processing method provided by the present invention, determining the similarity weight corresponding to each similar frame based on the noise reduction intensity and noise level and each of the analysis results includes: Obtaining the basic noise reduction strength of the pixels in the rectangular search box under the corresponding color channel; multiplying the basic noise reduction strength by the noise reduction strength and the noise level to obtain a first operation result; Subtract each of the analysis results from the first operation result to obtain a similarity weight corresponding to each similar frame.

[0014] The present invention also provides an image processing device, comprising: A determination module, used for determining a rectangular search box in the image to be processed; an analysis module, configured to perform similarity analysis on a central frame within the rectangular search frame and similar frames relative to the central frame to obtain an analysis result; A processing module is used to perform noise reduction processing on the pixels in the central frame based on the analysis result.

[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described image processing methods when executing the computer program.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements any of the above-mentioned image processing methods when executed by a processor.

[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned image processing methods.

[0018] The image processing method, electronic device, and storage medium provided by the present invention employ a rectangular search box with varying heights and widths. This allows filtering algorithms to capture sufficient redundant image information for effective noise reduction while avoiding resource waste caused by an overly large search range. While maintaining effective noise reduction, hardware resource consumption is significantly reduced, achieving a balance between image noise reduction and hardware resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1It is a flowchart of the image processing method provided by the present invention.

[0021] Figure 2 Optional schematic diagram of the search box of the prior art and the present solution during image processing.

[0022] Figure 3 for Figure 2 Detailed diagram of the search box in this solution.

[0023] Figure 4 This is a structural diagram of the image processing device provided by the present invention.

[0024] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0025] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0026] Figure 1 This is a flow chart of the image processing method provided by the present invention. Figure 1 As shown, the method includes the following: Step 110, determining a rectangular search box in the image to be processed; Step 120, performing similarity analysis on the central frame within the rectangular search frame and each similar frame relative to the central frame to obtain an analysis result; Step 130: Perform noise reduction processing on the pixels within the center frame based on the analysis result.

[0027] In this invention, in order to achieve a balance between image noise reduction effect and hardware resource consumption, a rectangular search box is innovatively used to replace the original square search box. Compared with the square search box commonly used in related technologies, this saves more hardware resources.

[0028] In one embodiment, the selection or adjustment of the rectangular search box can be achieved through simple geometric transformations based on the original square search box. For example, the height of the search box can be changed by adjusting its upper and lower boundaries while maintaining the same width. This adjustment does not alter the original data of a single row of the image; it only changes the width and overall size of the search box. This can save the row buffer occupied by the search box and simplify subsequent filtering calculations.

[0029] More specifically, in the present invention, the adjustment of the rectangular search box mainly depends on the half-length of the central box, for example, depending on the half-length of the central box in the original square search box or the rectangular search box to be formed. Specifically, please refer to Figure 2 , if the half-length of the original square search box is R, and the half-lengths of the central box and the similar box are r, for example, please refer to Figure 2 On the left side, at this time, the half-length of each side in the square search box in the related art is R = 8, the half-length of the inner central box is r = 2, and the size of the square search box is 17 * 17. It should be noted that the half-length R of the square search box does not represent half of the side length size of the square search box, but is the integer obtained after halving the side length size of the square search box. For example, in this embodiment, the side length size of the square search box is 17, and after halving it is 8.5, and then taking the integer to get 8, which is the half-length R of the square search box.

[0030] The width direction is reduced by the half-length r of the central box to form a new rectangular search box. The length of the new rectangular search box is 2R + 1, for example, please refer to Figure 2 On the right side, it shows the rectangular search box involved in the present application, where the length is 2R + 1 = 17. When represented by the half-length of the square search box, the width is 2R + 1 - 2r = 2 * 8 + 1 - 2 * 2 = 13, which is equivalent to the half-length in the width direction / vertical direction being updated from R = 8 to R = 6 at this time, and the half-length R in the length direction / horizontal direction remains 8. Subsequently, row scanning can be performed in this rectangular search box in steps of 1.

[0031] In one embodiment, the width and height of the rectangular search box can also be directly set according to the rules and beneficial effects that conform to this solution. For example, the width is W and the height is H. For example, H < W.

[0032] If referring to the description of the half-length, that is, when setting the size of the rectangular search box, the half-length of the rectangular search box in the vertical direction can be set as R1, and the half-length in the horizontal direction can be set as R2, where the half-length of the rectangular search box in the vertical direction is less than the half-length in the horizontal direction, that is, R1 < R2. Through this setting, the pixel data for calculation and processing in the search box can be relatively reduced in the vertical direction, saving the row Buffer and helping to simplify the overall calculation amount of non-local means filtering.

[0033] In the case of directly setting the width and height as described above, the set rectangular search box can reduce the width of the search box on the upper and lower sides compared to the original square search box, or the search box can be reduced in all directions, but the reduction size in the vertical direction is more than that in the horizontal direction.

[0034] In some embodiments, in actual applications, the cropping sizes on both sides are typically kept consistent. However, in some special scenarios, it may be necessary to crop the two sides to different sizes. For example, when there are significant differences in noise characteristics between the upper and lower boundaries of the image, the cropping sizes on both sides can be adjusted based on actual needs.

[0035] It should be noted that, since the pixel size cropped when the search box is adjusted is related to the half-length of the center search box, the longer the half-length of the center search box, the more pixel content is cropped, and the corresponding half-length in the width direction is shorter. For example, the adjusted half-length of the rectangular search box in the vertical direction is R1, and the half-length in the horizontal direction is R2. It can be found that R1 is negatively correlated with the half-length of the center box. Similarly, when the search box is longer, the width of the rectangular search box formed in the end is also wider, that is, R1 is positively correlated with R2. In addition, the vertical half-length R1 of the rectangular search box does not represent half of the vertical size of the rectangular search box (the width of the rectangular search box), but is the vertical size of the rectangular search box halved and rounded up, for example Figure 2 The vertical size of the rectangular search box in the embodiment in the right figure is 13, which is halved to 6.5, and then rounded to 6, which is the half-length R1 of the rectangular search box; similarly, the horizontal half-length R2 of the rectangular search box does not represent half of the horizontal size of the rectangular search box (the length of the rectangular search box), but is the horizontal size of the rectangular search box halved and rounded up. For example, the horizontal size of the rectangular search box in this embodiment is 17, which is halved to 8.5, and then rounded to 8, which is the half-length R2 of the rectangular search box.

[0036] For example, to reduce the size of the center box in the rectangular search box, please continue to see Figure 2 , that is, the upper and lower sides of the rectangular search box are reduced by r. Overall, the half-length R1 of the rectangular search box in the vertical direction and the half-length R2 in the horizontal direction satisfy the following mathematical relationship: R1=R2-r, where r is a positive integer.

[0037] In some embodiments, 2 lines of pixel data or 4 lines of pixel data can be reduced on both the upper and lower sides of the rectangular search box. This reduction reduces the amount of processed data while maintaining the integrity of image features.

[0038] In the present invention, reducing the number of pixel rows in the vertical direction means that fewer pixels need to be processed in the subsequent similarity analysis. When calculating the similarity, the amount of calculation is proportional to the number of pixel rows. Therefore, reducing the number of pixel rows can reduce the calculation complexity and improve the processing speed.

[0039] This design ensures that sufficient image redundant information can be obtained for effective denoising. At the same time, by adjusting the shape and size of the search box, the number of pixels required to be searched is reduced, thereby reducing the consumption of hardware resources.

[0040] In the present invention, the center box is a pixel block located at the geometric center of the rectangular search box. It is the core area that needs to be denoised. The center box is usually a square area whose size is determined by the half-length r, specifically (2r+1)×(2r+1) pixels. For example, see Figure 3 , where r=2, the size of the center box is 5×5 pixels, and so on.

[0041] In this invention, a similar box refers to a pixel block located within the rectangular search box relative to the center box. These pixel blocks are potentially similar to the center box. The similar box has the same size as the center box. For example, the similar box is typically (2r+1)×(2r+1) pixels.

[0042] However, at the upper and lower boundaries of the rectangular search box, due to incomplete pixel blocks, the similarity boxes are resized to rectangular boxes. For example, the rectangular box size is (r+1)×(2r+1), which means it is vertically reduced to accommodate the boundary conditions. Correspondingly, the center areas corresponding to these similarity boxes that require filtering are also adjusted. Specifically, a portion of the pixel blocks at the corresponding positions in the center box can be selected as the "center boxes" corresponding to these reduced similarity boxes. This process will be described in detail later.

[0043] In the present invention, similarity analysis is performed on the center box and similar boxes relative to the center box in a rectangular search box to evaluate their similarity with the center box. The analysis results are obtained, and similar boxes with high similarity will be given higher weights, thereby having a greater impact on the pixel value of the center box during the denoising process, achieving a more effective denoising effect while retaining the details of the image as much as possible.

[0044] This embodiment uses a rectangular search box with different heights and widths. This allows the filtering algorithm to capture sufficient redundant image information to achieve good noise reduction while avoiding resource waste caused by an overly large search range. While maintaining effective noise reduction, hardware resource consumption is significantly reduced, achieving a balance between image noise reduction and hardware resource consumption.

[0045] It should also be noted that the similarity evaluation and the noise reduction processing after the evaluation in the present invention is a cyclic process. After completing the noise reduction processing of the center box in a single search box, the search box can be moved to perform noise reduction processing on the next center box.

[0046] For example, for each pixel in an image, a rectangular search box is defined with that pixel as the center. Then, within that rectangular search box, the center box is determined using the current center pixel as the center for similarity analysis and noise reduction. Once processing is complete, the process is repeated for the next pixel until all pixels in the image are processed. This completes the full-image filtering and noise reduction process for the image being processed.

[0047] In some embodiments of the present invention, considering that the search box is optimized to a rectangular search box, please refer to Figure 3 When performing similarity analysis, the center box and the similar boxes relative to the center box can be adapted and optimized.

[0048] The rectangular search box as a whole may include a first edge area 310, a central area, and a second edge area 320. The first edge area 310, the central area, and the second edge area 320 are arranged in sequence along a vertical direction.

[0049] It should be noted that the above rectangular search box is not actually divided into regions. It is only because different "center boxes" and "similar boxes" relative to these "center boxes" are generated during the similarity analysis that classification and structural distinction are made for the convenience of description.

[0050] Based on this, this solution uses three types of center frames for similarity analysis: the square center frame 330, the first rectangular frame 331 (i.e., the blue dashed rectangle within the square center frame), and the second rectangular frame 332 (i.e., the green dashed rectangle within the square center frame). In terms of physical location, the first rectangular frame 331 and the second rectangular frame 332 are located within the square center frame 330. The first rectangular frame 331 corresponds to the first edge region 310, and the second rectangular frame 332 corresponds to the second edge region 320.

[0051] Correspondingly, in step 120, similarity analysis is performed on the central frame within the rectangular search frame and the similar frames relative to the central frame, and the analysis results obtained include: Step 121, selecting a square center frame, a first rectangular frame, and a second rectangular frame from the central area; Step 122, performing similarity analysis using the first rectangular frame and each similar frame in the corresponding first edge region relative to the first rectangular frame to obtain a first analysis result; Step 123 , performing similarity analysis using the second rectangular frame and each similar frame in the corresponding second edge region relative to the second rectangular frame to obtain a second analysis result; wherein the analysis result includes the first analysis result and the second analysis result.

[0052] The process of step 121 may not be performed. The process of obtaining the first analysis result and the second analysis result may be performed sequentially, or the order may be adjusted, for example, performed simultaneously.

[0053] In some embodiments, the above analysis results also include a third analysis result. Correspondingly, after the above step 121, similarity analysis can be performed using the square center box and each similar box in the rectangular search box relative to the square center box to obtain a third analysis result.

[0054] The process of obtaining the third analysis result and the aforementioned step 122 and step 123 may be executed sequentially, synchronously, or out of order, etc.

[0055] In this embodiment, it is only necessary to determine various types of center boxes in the rectangular search box and similar boxes relative to the various types of center boxes, and thereby perform similarity analysis.

[0056] More specifically, the size of the square center frame is (2r+1)×(2r+1) pixels. For example, if r=2, the size is 5×5 pixels.

[0057] The size of the first rectangular frame and the second rectangular frame is (r+1)×(2r+1) pixels. Taking r=2 as an example, the size is 3×5 pixels.

[0058] The size of the similar frame is the same as that of the corresponding rectangular frame; for example, the size of the similar frame in the first edge region is the same as that of the first rectangular frame, which is (r+1)×(2r+1) pixels.

[0059] In the present invention, a similarity analysis is performed on the first rectangular frame and its similar frames in the first edge region to obtain a first analysis result, and a similarity analysis is performed on the second rectangular frame and its similar frames in the second edge region to obtain a second analysis result.

[0060] Please continue to see Figure 3 , and please refer to Figure 2 , taking the size of the first rectangular frame 331 as (r+1)×(2r+1) pixels as an example. In the first edge area 310, there are multiple similar frames corresponding to the positions of the first rectangular frame 331. Figure 3The two blue dashed boxes shown in the example are similar boxes corresponding to the position of first rectangular box 331. Due to the reduction in the search box area, these similar boxes have reduced pixel data by r rows above compared to the similar boxes in the original square search box. The size of first rectangular box 331 is also (r+1)×(2r+1) pixels. The position of first rectangular box 331 in the center frame is also similar to the similar boxes in first edge region 310, with pixel data reduced by r rows above. Within first edge region 310, similarity analysis is performed by scanning the rows with a step of 1. It can be understood that there are actually seven similar boxes corresponding to the position of first rectangular box 331.

[0061] A similarity analysis can be performed between the first rectangular frame and each similar frame to calculate the similarity between them. This similarity can be calculated using the Sum of Absolute Differences (SAD) algorithm. This algorithm calculates the absolute difference between the pixel values ​​at corresponding pixel positions within the two frames and then adds all the absolute differences to obtain the SAD value. The smaller the SAD value, the higher the similarity between the two frames. In this solution, the SAD algorithm is used for similarity analysis, which is simple and easy to implement.

[0062] This embodiment combines a rectangular search box with a SAD operation, which significantly improves computational efficiency and reduces hardware resource consumption while ensuring a noise reduction effect.

[0063] In other examples, methods such as Euclidean distance can also be considered for pixel degree calculation analysis.

[0064] Similarly, in Figure 3 There are also 7 similar frames in the second edge region 320 relative to the second rectangular frame 332. There are 14 similar rectangular frames in total, and 14 related SAD operations need to be completed.

[0065] For the square center box, the size is (2r+1)×(2r+1) pixels. A pixel block similar to it is searched in the entire rectangular search box as a similar box relative to the square center box, and the similarity between the pixel data therein is calculated to obtain the corresponding third analysis result.

[0066] This result reflects the similarity between the square center frame and each similar frame, providing a basis for subsequent noise reduction processing. Figure 3 The overall population has 35 similar boxes of 5*5 size, and 35 related SAD operations need to be completed.

[0067] The third analysis result is combined with the previously obtained first analysis result (the analysis results of the first rectangular box and its similar boxes) and the second analysis result (the analysis results of the second rectangular box and its similar boxes). This results in a comprehensive similarity analysis result that includes information about the center area, the first edge area, and the second edge area.

[0068] According to the integrated analysis results, each similar box can be assigned a similar weight with the central box, and then the pixels of the central box can be weighted filtered in combination with the similar weights.

[0069] In some embodiments, considering that the SAD operation alone is used to measure the similarity, only the absolute difference between the pixel block in the center frame and the pixel block in the similar frame is considered, which has the technical problem of insufficient accuracy. Therefore, as a supplement, the image brightness and the noise level of the pixel block can be introduced to participate in the weight calculation on the basis of the SAD operation, thereby introducing the correlation analysis between the pixel blocks.

[0070] The brightness level can be obtained by calculating the average value of the same-channel pixel values ​​of the current center block, and the noise level can be determined based on the current brightness, black level, calibration parameters (k and b) and the lookup table.

[0071] The similarity analysis results are combined with factors such as brightness and noise levels to calculate a similarity weight between each similar frame and its corresponding center frame. This weight reflects the contribution of the similar frame to the center frame's noise reduction process. The higher the similarity, the closer the brightness and noise levels, and the larger the weight, the greater the similarity. This calculated similarity weight is then used to perform a weighted average of the pixels within the center frame to achieve pixel noise reduction.

[0072] In some optional implementations, the process of performing noise reduction processing based on the similarity analysis result of the SAD operation, the brightness level, and the noise level, i.e., the step of performing noise reduction processing on the pixels in the center frame based on the analysis result in step 130, may include: Step 131, determining a central brightness value based on each pixel in the central frame; Step 132, obtaining a corresponding noise reduction intensity and a corresponding noise level according to the center brightness value; Step 133: determining a similarity weight corresponding to each similar frame based on the noise reduction strength and noise level and each of the analysis results; Step 134 : performing noise reduction processing on the central pixel in the central frame based on the similarity weights corresponding to the similar frames.

[0073] In the present invention, the central brightness value is calculated based on the values ​​of each pixel in the central frame, which can be achieved by averaging all the pixel values ​​of the same channel in the central frame.

[0074] For example, you can calculate the average of the pixels of the four channels R, G (odd), G (even), and B in the current center frame to obtain four center brightness values. Figure 3 As shown, the red pixels in the square center box can be averaged.

[0075] Right now in, Center_luma is the central brightness value of the red pixel, M is the number of red pixels in the square center frame, and I (x, y) is the pixel value of each red pixel in the square center frame.

[0076] In addition, before this, a lookup table may be constructed according to brightness division, so that after the center brightness value is obtained, the lookup table may be used to obtain the center brightness value as the noise reduction intensity corresponding to the current brightness level.

[0077] Right now in, Luma_str is the noise reduction strength found.

[0078] It should also be noted that, for the noise level, a lookup table can be constructed before this by combining different brightness divisions, calibration parameters and black levels, so that the noise level can be obtained using the lookup table after the center brightness value is obtained.

[0079] Right now in, BLC is the black level, k,b is the calibration parameter, LUT is the corresponding lookup table, std is the noise level.

[0080] After obtaining the noise level and noise reduction strength, the similarity weights corresponding to each similar frame can be determined in combination with the analysis results of each similar frame relative to the center frame, and then the noise reduction processing of the central pixel in the center frame can be achieved by performing weighted averaging based on the similarity weights corresponding to each similar frame.

[0081] It should be noted that in the above embodiment, the corresponding noise reduction strength is obtained from a preset lookup table (LUT) based on the center brightness value. Different brightness values ​​correspond to different noise reduction strengths because different brightness regions of an image have different sensitivities to noise. For example, darker areas may require stronger noise reduction processing. Similarly, based on the center brightness value, combined with the black level and calibration parameters (k and b), the noise level of the current area can be calculated. The noise level reflects the degree to which the area is affected by noise.

[0082] In the present invention, based on the similarity weights corresponding to each similar frame, a weighted average process can be performed to achieve filtering and noise reduction of the center pixel within the center frame. Specifically, the corresponding pixel values ​​in the similar frames can be multiplied by their respective weights, and then these weighted pixel values ​​can be summed and finally divided by the sum of all weights to obtain the final denoised pixel value.

[0083] The process of weighted average to obtain the pixel value after noise reduction can refer to the following is the pixel value in the similar box of the same channel in the rectangular search box, The corresponding weight is Figure 3 , there are 49 similar boxes of red pixels, so there are 49 weights in total.

[0084] This process can effectively remove noise while retaining image details.

[0085] It should also be noted that the above-mentioned noise reduction process can actually be understood as sequentially performing the above-mentioned similarity analysis and weighted average noise reduction process on the R, G, G, and B channels of the image. This ensures that each color channel of the image is effectively denoised, improving the noise reduction effect and quality of the entire image.

[0086] Optionally, the determining of the similarity weight corresponding to each similar frame by using the noise reduction intensity and the noise level and each of the analysis results includes: Obtaining the basic noise reduction strength of the pixels in the rectangular search box under the corresponding color channel; multiplying the basic noise reduction strength by the noise reduction strength and the noise level to obtain a first operation result; Subtract each of the analysis results from the first operation result to obtain a similarity weight corresponding to each similar frame.

[0087] Similarity weight Among them, Base_strgh is the basic noise reduction strength, Luma_str is the noise reduction strength found, std is the noise level, and SAD is the analysis result obtained by SAD operation.

[0088] This solution introduces a base noise reduction strength, allowing you to set four basic noise reduction intensities (R / G / G / B) based on different color channels. Within this base noise reduction level, the similarity weights are determined based on different noise reduction intensities and noise levels at the center brightness value. This noise reduction solution incorporates more information about image characteristics, building on the simple and efficient SAD algorithm. This allows the similarity weights to more accurately reflect the actual similarity between the similar boxes and the center box, thereby better integrating pixel values ​​during the weighted averaging process, achieving higher-quality, more intelligent image noise reduction.

[0089] The image processing device provided by the present invention is described below. The image processing device described below and the image processing method described above can be referenced to each other.

[0090] Figure 4 A schematic diagram of the structure of the image processing device provided by the present invention is shown in FIG. Figure 4 As shown, including: The determination module 410 is used to determine a rectangular search box in the image to be processed; The analysis module 420 is configured to perform similarity analysis on the central frame within the rectangular search frame and the similar frames relative to the central frame to obtain an analysis result; The processing module 430 is configured to perform noise reduction processing on the pixels within the center frame based on the analysis result.

[0091] Figure 5 An example of a physical structure diagram of an electronic device is shown below. Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540. The processor 510, the communications interface 520, and the memory 530 communicate with each other via the communications bus 540. The processor 510 may invoke logic instructions in the memory 530 to execute an image processing method, which includes: determining a rectangular search box in an image to be processed; performing a similarity analysis on a central box within the rectangular search box and similar boxes relative to the central box to obtain an analysis result; and performing noise reduction processing on pixels within the central box based on the analysis result.

[0092] Furthermore, the logic instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion 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 for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0093] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the image processing method provided by the above methods, which includes: determining a rectangular search box in the image to be processed; performing similarity analysis on the center box within the rectangular search box and each similar box relative to the center box to obtain an analysis result; and performing noise reduction processing on the pixels within the center box based on the analysis result.

[0094] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the image processing method provided by the above-mentioned methods, the method including: determining a rectangular search box in the image to be processed; performing similarity analysis on the central box within the rectangular search box and each similar box relative to the central box to obtain an analysis result; and performing noise reduction processing on the pixels within the central box based on the analysis result.

[0095] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0096] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. An image processing method, characterized in that: include: Determine a rectangular search box in the image to be processed; Performing similarity analysis on a central frame within the rectangular search frame and similar frames relative to the central frame to obtain an analysis result; Noise reduction processing is performed on the pixels within the center frame based on the analysis result.

2. The image processing method according to claim 1, wherein: The half length of the rectangular search box in the vertical direction is R1, and the half length in the horizontal direction is R2. <R2。 3. The image processing method according to claim 2, wherein: The R1 is positively correlated with the R2 and negatively correlated with the half-length of the central frame.

4. The image processing method according to claim 1, wherein: The rectangular search box includes a first edge area, a central area, and a second edge area, wherein the first edge area, the central area, and the second edge area are arranged in sequence along a vertical direction; The performing similarity analysis on the central frame within the rectangular search frame and the similar frames relative to the central frame to obtain the analysis result includes: Selecting a square center frame, a first rectangular frame, and a second rectangular frame from the center area, wherein the first rectangular frame corresponds to the first edge area, the second rectangular frame corresponds to the second edge area, and the center frame includes the square center frame, the first rectangular frame, and the second rectangular frame; performing a similarity analysis using the first rectangular frame and each similar frame in the corresponding first edge region relative to the first rectangular frame to obtain a first analysis result; performing a similarity analysis using the second rectangular frame and each similar frame in the corresponding second edge region relative to the second rectangular frame to obtain a second analysis result; The analysis results include the first analysis results and the second analysis results.

5. The image processing method according to claim 4, wherein: After selecting the square center frame, the first rectangular frame and the second rectangular frame from the central area, the method further includes: A similarity analysis is performed using the square center frame and each similar frame in the rectangular search frame relative to the square center frame to obtain a third analysis result, which also includes the third analysis result.

6. The image processing method according to any one of claims 1 to 5, characterized in that: The performing similarity analysis on the central frame within the rectangular search frame and the similar frames relative to the central frame to obtain analysis results includes: In the rectangular search box, SAD operations are performed on the central box and each similar box relative to the central box to obtain various analysis results.

7. The image processing method according to claim 1, wherein: The performing noise reduction processing on the pixels within the central frame based on the analysis result includes: determining a central brightness value based on each pixel within the central frame; Obtaining a corresponding noise reduction intensity and a corresponding noise level according to the central brightness value; Determining a similarity weight corresponding to each of the similar frames according to the noise reduction intensity and the noise level and each of the analysis results; Noise reduction processing is performed on the central pixel in the central frame based on the similarity weights corresponding to the similar frames.

8. The image processing method according to claim 7, wherein: The determining, based on the noise reduction intensity and the noise level and the analysis results, a similarity weight corresponding to each of the similar frames includes: Obtaining the basic noise reduction strength of the pixels in the rectangular search box under the corresponding color channel; multiplying the basic noise reduction strength by the noise reduction strength and the noise level to obtain a first operation result; Subtract each of the analysis results from the first operation result to obtain a similarity weight corresponding to each similar frame.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the image processing method according to any one of claims 1 to 8 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • A digital image noise reduction method and device

    CN101123681A

  • Noise reduction method, device and equipment for non-local mean filtering

    CN109785246A

  • Trilateral filtering image processing method and device

    CN111724325A

  • Self-adaptive non-local mean image denoising method

    CN113643201A

  • MEMS-based stripe structured light image noise reduction method and device

    CN114170109A