Image processing method, device and equipment for fast denoising, and storage medium

By confirming the direction and starting position of push-sweep in image processing, building a push-sweep window for cell comparison and smoothing, the problem of large amount of image denoising calculation and poor effect in the prior art is solved, and the rapid , accurate noise denoising, suitable for real-time wavefront detection.

CN119251075APending Publication Date: 2025-01-03CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310786211.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing image denoising methods have large calculation volume and poor results, which cannot meet the real-time processing needs of wavefront detection and application, especially when the noise is in the extended image, which affects the wavefront calculation accuracy.

Method used

By confirming the direction and starting position of the push-scan on the original image, a push-scan window is built to cover the cells to be determined and the control cells, and the cell values ​​of the control cells are used for smoothing, and the windows are moved row by row or column by row to row by row to go Noise processing until all cells are completed.

Benefits of technology

It realizes fast and simple noise denoising processing, reduces the calculation amount, is suitable for real-time processing environments, retains the original image information, accurately determines the noise coordinates and restores the cell value at the noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251075A_ABST
    Figure CN119251075A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method, device and equipment for quickly removing noise points and a storage medium. The method comprises the following steps: confirming a push-scan direction and an initial position on an original image; constructing a small push-scan window at the initial position, wherein the small push-scan window covers one pixel to be judged and at least one contrast pixel without noise points; comparing the to-be-judged pixel with the contrast pixel, when the to-be-judged pixel is a noisy point, smoothing the to-be-judged pixel by using the pixel value of the contrast pixel, and taking the denoised to-be-judged pixel as a new contrast pixel; moving the small push-broom window by one pixel along the push-broom direction to cover a new to-be-judged pixel, and performing denoising processing on the new to-be-judged pixel; and repeatedly executing the operation until all the pixels are denoised. According to the method, the noise point coordinates can be accurately judged and the pixel value at the noise point can be restored on the basis of reserving the non-noise point image information with less calculation amount, and the original image information can be reserved as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, device, equipment and storage medium for rapid noise removal. Background Art

[0002] At present, the wavefront detection means of telescope systems have gradually developed from the traditional Shack-Hartmann sensor based on image point displacement to the wavefront sensor based on extended image calculation and processing, such as the tetrahedron sensor and the curvature wavefront sensor. The aforementioned sensor calculates the wavefront of the entire pupil surface by decomposing the extended pupil image or the defocused pupil image. Since the pupil image used for calculation is an extended image, the accuracy of the brightness information of the pixels in the image area directly affects the accuracy of the wavefront calculation. Due to the image acquisition equipment, there will be noise on the captured image. When the noise is located in the extended image, it will affect the wavefront calculation. Therefore, for the captured image, the noise needs to be processed first. Due to the needs of wavefront detection and application, the processing needs to be simple and fast, taking as little time as possible; at the same time, the brightness information of the target image area is the basic information for wavefront calculation, and the original image information needs to be retained as much as possible, and the noise position determination and denoising processing should be performed correctly.

[0003] In order to meet the technical requirements of further processing images, a variety of image denoising methods have emerged in this field, such as: BM3D based on filtering, DNCNN based on deep learning, WNNM based on prior models and other denoising methods. However, the above denoising methods all have their own defects that cannot be overcome: the denoising method based on filtering is designed for Gaussian white noise, and the noise model it adopts does not match the actual image noise distribution. Therefore, there will be a large number of noise points and pseudo-color residues in the denoising result, resulting in poor denoising effect. The denoising method based on deep learning can meet the needs of real-time image processing with the support of GPU, but the image information it processes is seriously lost, resulting in a loss of details in the denoising image, which also leads to poor denoising effect. For the denoising method based on the prior model, its computational complexity and time consumption are large, and it cannot meet the needs of real-time processing. Summary of the invention

[0004] In view of this, the present application provides an image processing method, device, equipment and storage medium for rapid denoising to solve the problems of large amount of calculation and poor effect in existing image denoising methods.

[0005] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide an image processing method for fast denoising, which includes: S101, confirming the push-scan direction and the starting position on the original image; S102, constructing a push-scan window at the starting position, the push-scan window covering a pixel to be determined and at least one reference pixel, the reference pixel including a noise-free filling pixel filled based on a preset method; S103, comparing the pixel to be determined and the reference pixel, and when it is confirmed that the pixel to be determined is a noise point according to the comparison result, smoothing the pixel to be determined using the pixel value of the reference pixel, and using the denoised pixel to be determined as a new reference pixel; S104, moving the push-scan window by one pixel along the push-scan direction to cover a new pixel to be determined, and denoising the new pixel to be determined; repeating steps S103 to S104, denoising the pixels row by row or column by column until all pixels are denoised.

[0006] As a further improvement of the present application, the push-scan window covers one pixel to be determined and three control pixels; the noise-free filling pixels are filled based on a preset method, including: filling a row of pixels and a column of pixels on the edges adjacent to the starting position respectively, the pixel value of the filling pixel is calculated based on the pixel value of a row of pixels or a column of pixels adjacent to the filling pixel on the original image, and the pixel value of the filling pixel at the intersection of a row of pixels and a column of pixels is calculated based on the pixel values ​​of the two adjacent filling pixels.

[0007] As a further improvement of the present application, the push-scanning window covers a pixel to be determined and a control pixel; the noise-free filling pixels are filled based on a preset method, including: when the push-scanning direction is a horizontal push-scanning direction, a row of pixels is filled on the horizontal edge adjacent to the starting position, and the pixel value of the filling pixel is calculated based on the pixel value of a row of pixels adjacent to the filling pixel on the original image; when the push-scanning direction is a vertical push-scanning direction, a column of pixels is filled on the vertical edge adjacent to the starting position, and the pixel value of the filling pixel is calculated based on the pixel value of a column of pixels adjacent to the filling pixel on the original image.

[0008] As a further improvement of the present application, the pixel value of the filling pixel is calculated based on the pixel values ​​of a row of pixels or a column of pixels adjacent to the filling pixel on the original image, including: when the filling pixel is one of the filled pixels in a row, confirm a row of target pixels adjacent to the filling pixel on the original image, and select the pixel values ​​of a preset number of target pixels closest to the row of target pixels to calculate the pixel value of the filling pixel; when the filling pixel is one of the filled pixels in a column, confirm a column of target pixels adjacent to the filling pixel on the original image, and select the pixel values ​​of a preset number of target pixels closest to the column of target pixels to calculate the pixel value of the filling pixel.

[0009] As a further improvement of the present application, the push-sweep direction and the starting position are confirmed on the original image, including: dividing the original image into a plurality of rectangular areas to be processed; and confirming the pre-set starting position and push-sweep direction of each rectangular area to be processed.

[0010] As a further improvement of the present application, the pixel to be determined is compared with the reference pixel. When the pixel to be determined is confirmed to be a noise point according to the comparison result, the pixel to be determined is smoothed using the pixel value of the reference pixel, including: calculating the pixel difference between the pixel value of the pixel to be determined and the average pixel value of at least one reference pixel; judging whether the pixel difference exceeds a pixel difference threshold, the pixel difference threshold is preset or calculated in real time based on the pixel value of the reference pixel in the push-scan window; when the pixel difference exceeds the pixel difference threshold, replacing the pixel value of the pixel to be determined with the average pixel value of at least one reference pixel.

[0011] As a further improvement of the present application, the pixel difference threshold is calculated in real time based on the pixel value of the comparison pixel in the push-scan window, and the calculation method is:

[0012] T = (Ma) * +;

[0013] Wherein, T represents the pixel difference threshold, M represents the maximum theoretical pixel value, a represents the average pixel value of all comparison pixels in the push-scan window, and r represents the preset adaptive coefficient.

[0014] In order to solve the above technical problems, another technical solution adopted by the present application is: to provide an image processing device for fast denoising, which includes: a confirmation module, used to confirm the push-scan direction and the starting position on the original image, and divide the original image into multiple pixels to be determined; a construction module, used to construct a push-scan window at the starting position, the push-scan window covers a pixel to be determined and at least one comparison pixel, and the comparison pixel includes a noise-free filling pixel filled based on a preset method; a comparison module, used to compare the pixel to be determined and the comparison pixel, when it is confirmed that the pixel to be determined is a noise point according to the comparison result, the pixel to be determined is smoothed by using the pixel value of the comparison pixel, and the denoised pixel to be determined is used as a new comparison pixel; a moving module, used to move the push-scan window along the push-scan direction by one pixel to cover a new pixel to be determined, and denoise the new pixel to be determined; the comparison module and the moving module repeatedly perform the above operations, denoising the pixels row by row or column by column until all pixels are denoised.

[0015] To solve the above technical problems, another technical solution adopted in the present application is: to provide a computer device, which includes a processor and a memory coupled to the processor, wherein program instructions are stored in the memory, and when the program instructions are executed by the processor, the processor executes the steps of the image processing method for fast denoising as described in any of the above items.

[0016] In order to solve the above technical problems, another technical solution adopted by the present application is: to provide a storage medium storing program instructions of an image processing method for rapid denoising that can implement any of the above items.

[0017] The beneficial effects of the present application are as follows: the image processing method for fast denoising of the present application confirms the push-scan direction and the starting position on the original image, and then constructs a push-scan window at the starting position, the push-scan window covers a pixel to be determined and at least one comparison pixel, the comparison pixel includes a noise-free filling pixel filled based on a preset method, and then the pixel to be determined and the comparison pixel are compared. When the pixel to be determined is a noise point, the pixel value of the comparison pixel is used to smooth the pixel to be determined, and the denoised pixel to be determined is used as a new comparison pixel, and then the push-scan window is moved along the push-scan direction. A pixel covers a new pixel to be determined, and the new pixel to be determined is denoised. The above operation is repeated to denoise the pixels row by row or column by column until all pixels are denoised. It uses the pixel value of the control pixel to smooth the noise pixel. Compared with the denoising method based on deep learning and prior models, its calculation content is simple and fast, and the amount of calculation is greatly reduced. It is suitable for real-time processing environment, and on the basis of retaining the non-noise image information, it accurately determines the coordinates of the noise point and restores the pixel value at the noise point, retaining the original image information as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a schematic flow chart of an image processing method for rapid noise removal according to an embodiment of the present invention;

[0019] Figure 2 is a schematic diagram of a push-scanning window and a push-scanning direction according to an embodiment of the present invention;

[0020] Figure 3 is another schematic diagram of the push-scanning window and the push-scanning direction according to an embodiment of the present invention;

[0021] Figure 4 is another schematic diagram of the push-sweep small window and the push-sweep direction according to an embodiment of the present invention;

[0022] Figure 5 is a schematic diagram of an embodiment of the present invention in which an original image is divided into two rectangular areas to be processed;

[0023] Figure 6 is a schematic diagram of an embodiment of the present invention in which an original image is divided into three rectangular areas to be processed;

[0024] Figure 7 is a schematic diagram of an embodiment of the present invention in which an original image is divided into four rectangular areas to be processed;

[0025] Figure 8 is a schematic diagram of functional modules of an image processing device for fast denoising according to an embodiment of the present invention;

[0026] Fig. 9 is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;

[0027] Fig.10 It is a schematic diagram of the structure of the storage medium of an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0029] The terms "first", "second", "third" in this application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", "third" can expressly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the embodiments of this application, all directional indications (such as up, down, left, right, front, back...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0030] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0031] Figure 1 FIG. 1 is a flow chart of an image processing method for rapid noise reduction according to a first embodiment of the present invention. It should be noted that the method of the present invention is not limited to the method of FIG. 1 if substantially the same results are achieved. Figure 1 The process sequence shown is limited. Figure 1 As shown, the image processing method for rapid noise removal includes the steps of:

[0032] Step S101: confirm the sweep direction and starting position on the original image.

[0033] It should be noted that the original image is a rectangular image. After obtaining the original image to be denoised, the push-sweep direction and the starting position are confirmed on the original image. Among them, the starting position is located at one of the four vertices of the original image. In this embodiment, noise point determination and denoising are performed on each pixel in the original image starting from the starting position. The push-sweep direction points from the starting position to a vertex adjacent to the starting position, that is, the push-sweep direction can be a horizontal push-sweep direction or a vertical push-sweep direction. For example, the starting position can be set at the upper left corner of the original image, and the push-sweep direction can be set to a left-to-right direction or a top-to-bottom direction.

[0034] Step S102: construct a push-scan window at the starting position, the push-scan window covers a pixel to be determined and at least one reference pixel, the reference pixel includes a noise-free filling pixel filled in a preset manner.

[0035] Specifically, the push-scan window can cover at least two pixel areas. It should be understood that all pixels on the original image are pixels to be determined and cannot be directly used as reference pixels. Therefore, pixels without noise points need to be filled at the starting position, so that the push-scan window constructed at the starting position includes a pixel to be determined and at least one reference pixel without noise points, and the reference pixel is used to determine and denoise the pixel to be determined.

[0036] Step S103: Compare the pixel to be determined with the reference pixel. When the pixel to be determined is confirmed to be a noise point according to the comparison result, smooth the pixel to be determined using the pixel value of the reference pixel, and use the denoised pixel to be determined as a new reference pixel.

[0037] Specifically, for the area covered by the push-scan window, the pixel values ​​of the pixels to be determined and the pixel values ​​of the reference pixels are compared and analyzed. When the pixel value of the pixel to be determined is confirmed to be abnormal, the pixel to be determined can be considered to be a noise point. At this time, the pixel value of the pixel to be determined is smoothed according to the pixel value of the reference pixel in the push-scan window to complete the denoising of the pixel to be determined. After that, the denoised pixel to be determined is used as a reference pixel to perform noise point determination and denoising on other pixels to be determined.

[0038] The step of comparing the pixel to be determined with the reference pixel, and when the pixel to be determined is confirmed to be a noise point according to the comparison result, using the pixel value of the reference pixel to perform smoothing processing on the pixel to be determined specifically includes:

[0039] 1. Calculate the pixel difference between the pixel value of the pixel to be determined and the average pixel value of at least one comparison pixel.

[0040] 2. Determine whether the pixel difference exceeds a pixel difference threshold, where the pixel difference threshold is preset or calculated in real time based on the pixel value of the comparison pixel in the push-scan window.

[0041] 3. When the pixel difference exceeds the pixel difference threshold, the pixel value of the pixel to be determined is replaced by the average pixel value of at least one comparison pixel.

[0042] Specifically, firstly, the average pixel value of at least one comparison pixel is calculated, and then the pixel difference value is calculated between the average pixel value and the pixel value of the pixel to be determined, and then the pixel difference value and the pixel difference threshold value are judged. When the pixel difference value exceeds the pixel difference threshold value, the pixel to be determined is a noise point, and at this time, the pixel value of the pixel to be determined is replaced with the average pixel value of at least one comparison pixel, so as to realize smoothing processing of the pixel to be determined; when the pixel difference value does not exceed the pixel difference threshold value, the pixel to be determined is not a noise point and does not need to be processed.

[0043] In some embodiments, the pixel difference threshold can be preset by the user. By setting a fixed pixel difference threshold, it is not necessary to calculate the pixel difference threshold in real time, which further reduces the amount of calculation, so that the push-scan determination of the image can be completed at the fastest speed in this embodiment, ensuring timeliness.

[0044] Furthermore, in order to ensure the rationality of the pixel difference threshold and improve the accuracy of noise point determination, in another embodiment of the present invention, the pixel difference threshold is calculated in real time based on the pixel value of the comparison pixel in the push-scan window, and the calculation method is:

[0045] T = (Ma) * +;

[0046] Wherein, T represents the pixel difference threshold, M represents the maximum theoretical pixel value (usually 255 or 65535), a represents the average pixel value of all comparison pixels in the push-scan window, and r represents the preset adaptive coefficient. The value range of r is (0,1), and the value is generally around 0.5, for example, r = 0.6.

[0047] Specifically, the pixel difference threshold calculated in real time based on the pixel value of the comparison pixel in the push-scan window is closer to the actual application situation, making the calculated pixel difference threshold more reasonable, further improving the accuracy of noise point judgment.

[0048] Furthermore, after comparing the pixel to be determined and the reference pixel, the method further includes: when it is confirmed according to the comparison result that the pixel to be determined is not a noise point, using the pixel to be determined as a new reference pixel.

[0049] Specifically, when a pixel to be determined is determined to be a non-noise pixel, it is not necessary to process the pixel to be determined, and the pixel to be determined is directly used as a new comparison pixel to perform noise determination and denoising on other pixels to be determined.

[0050] Step S104: Move the push-scan window by one pixel along the push-scan direction to cover a new pixel to be determined, and perform denoising on the new pixel to be determined.

[0051] Steps S103 to S104 are repeatedly executed to perform denoising on pixels row by row or column by column until denoising of all pixels is completed.

[0052] Specifically, after the current pixel to be determined in the push-scan window is determined and denoised, the push-scan pixel is moved one pixel along the push-scan direction so that the push-scan window covers a new pixel to be determined and at least one reference pixel, and steps S103 to S104 are repeated to perform noise determination and denoising on a row or a column of pixels to be determined in the original image in turn. Then, the push-scan window is moved to the end of the next row or the next column opposite to the push-scan direction, and the push-scan is performed again along the push-scan direction until all pixels to be determined in the original image are processed.

[0053] Preferably, in some embodiments, in order to improve the accuracy of noise determination, Figure 2 As shown, the push-scan window is a rectangular frame that can cover one pixel to be determined and three comparison pixels. The pixel to be determined is subjected to noise determination and denoising by three comparison pixels adjacent to the pixel to be determined. It should be noted that the push-scan window constructed at the starting position needs to cover three filling pixels as comparison pixels. Therefore, in this embodiment, the filling pixels without noise points are filled based on the preset method, including:

[0054] A row of pixels and a column of pixels are filled on the edges adjacent to the starting position respectively. The pixel value of the filled pixel is calculated according to the pixel value of a row of pixels or a column of pixels adjacent to the filled pixel on the original image. The pixel value of the filled pixel at the intersection of a row of pixels and a column of pixels is calculated according to the pixel values ​​of the two adjacent filled pixels.

[0055] See also Figure 2, this embodiment takes the upper left corner of the original image as an example for explanation. When the push-scan window covers one pixel to be determined and three comparison pixels, for the first row of pixels and the first column of pixels in the original image, when performing noise determination, the push-scan window needs to cover the pixel to be determined and at least two filling pixels, and three filling pixels need to be covered at the first pixel to be determined. Therefore, when filling pixels, it is necessary to fill a row of pixels and a column of pixels on the edges adjacent to the starting position. Among them, the pixel value of the filling pixel is calculated based on the pixel value of a row of pixels or a column of pixels adjacent to the filling pixel on the original image. Specifically, it is calculated using the pixel values ​​of the preset number of pixels closest to the row of pixels or the column of pixels adjacent to the filling pixel. When the filling pixel is one of the filled pixels in a row, a row of target pixels adjacent to the filling pixel on the original image is confirmed, and the pixel values ​​of the preset number of target pixels closest to the row of target pixels are selected to calculate the pixel value of the filling pixel; when the filling pixel is one of the filled pixels in a column, a column of target pixels adjacent to the filling pixel on the original image is confirmed, and the pixel values ​​of the preset number of target pixels closest to the column of target pixels are selected to calculate the pixel value of the filling pixel. The preset number is preferably 10. For the pixel at the intersection of a row of filled pixels and a column of filled pixels, its pixel value is obtained by taking the average of the pixel values ​​of the two pixels adjacent to the pixel at the intersection.

[0056] Specifically, when the push-scan window is constructed at the starting position, the push-scan window covers the first pixel to be determined and three filling pixels of the original image. Assuming that the push-scan direction is from left to right of the original image, after the first pixel to be determined is processed, the push-scan window is moved one pixel to the right. At this time, the push-scan window covers two filling pixels, one processed pixel and one pixel to be determined. The pixel to be determined is processed again until the last pixel to be determined in the first row of the original image. Then the push-scan window is moved to the leftmost side of the pixels in the second row of the original image and noise determination and processing are performed. This process is deduced by analogy until all pixels to be processed in the original image are processed.

[0057] Preferably, in other embodiments, in order to reduce the amount of calculation, the push-scan window can cover a pixel to be determined and a reference pixel. The reference pixel is used to perform noise determination and denoising on the pixel to be determined. It should be noted that the push-scan window constructed at the starting position needs to cover a filling pixel as a reference pixel. Therefore, in this embodiment, filling the filling pixel without noise based on the preset method includes:

[0058] 1. When the sweep direction is horizontal, a row of pixels is filled on the horizontal edge adjacent to the starting position, and the pixel values ​​of the filled pixels are calculated based on the pixel values ​​of a row of pixels adjacent to the filled pixels on the original image.

[0059] See also Figure 3, this embodiment is explained by taking the upper left corner of the original image as the starting position as an example. When the push-scan window covers a pixel to be determined and a comparison pixel, for the first row of pixels in the original image, when performing noise determination, the push-scan window needs to cover the pixel to be determined and a filling pixel. Therefore, when filling pixels, it is necessary to fill a row of pixels on the horizontal edge adjacent to the starting position. Among them, the pixel value of the filling pixel is calculated based on the pixel value of a row of pixels adjacent to the filling pixel on the original image. Specifically, it is calculated using the pixel values ​​of the preset number of pixels closest to a row of pixels adjacent to the filling pixel. When the filling pixel is one of the pixels in a row of pixels to be filled, a row of target pixels adjacent to the filling pixel on the original image is confirmed, and the pixel values ​​of the preset number of target pixels closest to the row of target pixels are selected from the row of target pixels to calculate the pixel value of the filling pixel. The preset number is preferably 10.

[0060] Specifically, when the push-scan window is constructed at the starting position, the push-scan window covers the first pixel to be determined and a filling pixel of the original image. Assuming that the push-scan direction is from left to right, after the first pixel to be determined is processed, the push-scan window is moved one pixel to the right. At this time, the push-scan window covers a filling pixel and a pixel to be determined. The pixel to be determined is processed again until the last pixel to be determined in the first row of the original image. The push-scan window is moved to the leftmost side of the pixels in the second row of the original image. At this time, the push-scan window covers a pixel to be determined and a pixel that has been determined and processed. Noise determination and processing continue, and so on, until all pixels to be processed in the original image are processed.

[0061] 2. When the sweeping direction is vertical, a column of pixels is filled on the vertical side adjacent to the starting position, and the pixel values ​​of the filled pixels are calculated based on the pixel values ​​of a column of pixels adjacent to the filled pixels on the original image.

[0062] See also Figure 4 , this embodiment is explained by taking the upper left corner of the original image as the starting position as an example. When the push-scan window covers a pixel to be determined and a comparison pixel, for the first column of pixels in the original image, when performing noise determination, the push-scan window needs to cover the pixel to be determined and a filling pixel. Therefore, when filling pixels, it is necessary to fill a column of pixels on the vertical edge adjacent to the starting position. Among them, the pixel value of the filling pixel is calculated based on the pixel value of a column of pixels adjacent to the filling pixel on the original image. Specifically, it is calculated using the pixel values ​​of the preset number of pixels closest to the column of pixels adjacent to the filling pixel. When the filling pixel is one of the pixels in the filled column, a column of target pixels adjacent to the filling pixel on the original image is confirmed, and the pixel values ​​of the preset number of target pixels closest to the column of target pixels are selected to calculate the pixel value of the filling pixel. The preset number is preferably 10.

[0063] Specifically, when the push-scan window is constructed at the starting position, the push-scan window covers the first pixel to be determined and a filling pixel of the original image. Assuming that the push-scan direction is from top to bottom of the original image, after the first pixel to be determined is processed, the push-scan window is moved down one pixel grid. At this time, the push-scan window covers a filling pixel and a pixel to be determined. The pixel to be determined is processed again until the last pixel to be determined in the first column of the original image. The push-scan window is moved to the top of the pixels in the second column of the original image. At this time, the push-scan window covers a pixel to be determined and a pixel that has been determined and processed. Noise determination and processing continue, and so on, until all pixels to be processed in the original image are processed.

[0064] Furthermore, in this embodiment, when determining and processing noise points on the original image, the original image can be evenly divided into multiple rectangular areas, each rectangular area is used as a sub-image of the original image, and the noise point determination and processing of each sub-image are processed in parallel based on a multi-threaded manner, thereby further improving the efficiency of noisy image processing. Therefore, the step of confirming the push-scan direction and starting position on the original image specifically includes:

[0065] 1. Divide the original image into multiple rectangular areas to be processed;

[0066] 2. Confirm the pre-set starting position and sweeping direction of each rectangular area to be processed.

[0067] Specifically, in this embodiment, the original image may be divided into a plurality of rectangular areas to be processed, such as dividing the original image into two, three, or four rectangular areas to be processed.

[0068] See also Figure 5 When the original image is divided into two rectangular areas to be processed, a row of pixels can be filled on the original image, and then the original image is equally divided into two rectangular areas to be processed in parallel on the left and right. The starting position of the left rectangular area to be processed can be set to the upper left corner of the left rectangular area to be processed, and the sweep direction is set from left to right; the starting position of the right rectangular area to be processed can be set to the upper right corner of the right rectangular area to be processed, and the sweep direction is set from right to left. When performing noise judgment, noise judgment is performed on the two rectangular areas to be processed at the same time.

[0069] See also Figure 6 When the original image is divided into three rectangular areas to be processed, a row of pixels can be filled on the original image, and then the original image is evenly divided into three rectangular areas to be processed in parallel on the left, middle and right sides. The starting position of each rectangular area to be processed can be set to the upper left corner of the rectangular area to be processed, and the sweep direction can be set to be from left to right. When performing noise determination, noise determination is performed on the three rectangular areas to be processed at the same time.

[0070] See also Figure 7, when dividing the original image into four rectangular regions to be processed, add a row of pixels or a column of pixels to the four sides of the original image respectively, then divide the original image into four rectangular regions to be processed in a "field" shape, and then set the four corners of the original image as the starting positions of the four rectangular regions to be processed. Set the push - sweep direction of the two rectangular regions to be processed in the left - hand column as from left to right, and set the push - sweep direction of the two rectangular regions to be processed in the right - hand column as from right to left. When performing noise determination, perform noise determination on the four rectangular regions to be processed simultaneously.

[0071] The image - processing method for quickly removing noise points in the embodiment of the present invention confirms the push - sweep direction and the starting position on the original image, divides the original image into multiple pixels to be determined, then constructs a push - sweep small window at the starting position. The push - sweep small window covers a pixel to be determined and at least one reference pixel. The reference pixels include noise - free filled pixels filled based on a preset method. Then, compare the pixel to be determined with the reference pixels. When the pixel to be determined is a noise point, use the pixel value of the reference pixel to perform smoothing processing on the pixel to be determined, and use the denoised pixel to be determined as a new reference pixel. Then, move the push - sweep small window one pixel along the push - sweep direction to cover a new pixel to be determined, and perform denoising processing on the new pixel to be determined. Repeat the above operations to perform denoising processing on pixels row by row or column by column until all pixels are denoised. It uses the pixel value of the reference pixel to perform smoothing processing on the noise - point pixel. Compared with the denoising methods based on deep learning and prior models, its calculation content is simple and fast, the amount of calculation is greatly reduced, it is suitable for real - time processing environments, and on the basis of retaining non - noise image information, it accurately determines the noise - point coordinates and restores the pixel value at the noise point, and retains the original image information as much as possible.

[0072] Figure 8 It is a schematic diagram of the functional modules of the image - processing device for quickly removing noise points in the embodiment of the present invention. As Figure 8 shown, the image - processing device 20 for quickly removing noise points includes a confirmation module 21, a construction module 22, a comparison module 23, and a movement module 24.

[0073] The confirmation module 21 is used to confirm the push - sweep direction and the starting position on the original image;

[0074] The construction module 22 is used to construct a push - sweep small window at the starting position. The push - sweep small window covers a pixel to be determined and at least one reference pixel. The reference pixels include noise - free filled pixels filled based on a preset method;

[0075] The comparison module 23 is used to compare the pixel to be determined with the reference pixels. When it is confirmed according to the comparison result that the pixel to be determined is a noise point, use the pixel value of the reference pixel to perform smoothing processing on the pixel to be determined, and use the denoised pixel to be determined as a new reference pixel;

[0076] A moving module 24 is used to move the push-scan window by one pixel along the push-scan direction to cover a new pixel to be determined, and to perform denoising on the new pixel to be determined;

[0077] The comparison module and the movement module repeatedly perform the above operations to perform denoising on the pixels row by row or column by column until all the pixels are denoised.

[0078] Optionally, the push-scan window covers one pixel to be determined and three reference pixels; the construction module 22 performs an operation of filling noise-free filling pixels based on a preset method, including: filling a row of pixels and a column of pixels on the edges adjacent to the starting position, respectively, the pixel value of the filling pixel is calculated based on the pixel value of a row of pixels or a column of pixels adjacent to the filling pixel on the original image, and the pixel value of the filling pixel at the intersection of a row of pixels and a column of pixels is calculated based on the pixel values ​​of the two adjacent filling pixels.

[0079] Optionally, the push-scan window covers a pixel to be determined and a reference pixel; the construction module 22 performs an operation of filling noise-free filling pixels based on a preset method, including: when the push-scan direction is a horizontal push-scan direction, a row of pixels is filled on the horizontal edge adjacent to the starting position, and the pixel value of the filling pixel is calculated based on the pixel value of a row of pixels adjacent to the filling pixel on the original image; when the push-scan direction is a vertical push-scan direction, a column of pixels is filled on the vertical edge adjacent to the starting position, and the pixel value of the filling pixel is calculated based on the pixel value of a column of pixels adjacent to the filling pixel on the original image.

[0080] Optionally, the construction module 22 performs an operation of calculating the pixel value of the filling pixel based on the pixel values ​​of a row of pixels or a column of pixels adjacent to the filling pixel on the original image, specifically including: when the filling pixel is one of the filled pixels in a row, confirming a row of target pixels adjacent to the filling pixel on the original image, and selecting the pixel values ​​of a preset number of target pixels closest to the row of target pixels to calculate the pixel value of the filling pixel; when the filling pixel is one of the filled pixels in a column, confirming a column of target pixels adjacent to the filling pixel on the original image, and selecting the pixel values ​​of a preset number of target pixels closest to the column of target pixels to calculate the pixel value of the filling pixel.

[0081] Optionally, the confirmation module 21 performs an operation of confirming the sweep direction and the starting position on the original image, specifically including: dividing the original image into a plurality of rectangular areas to be processed; and confirming a preset starting position and sweep direction of each rectangular area to be processed.

[0082] Optionally, the comparison module 23 performs a comparison between the pixel to be determined and the control pixel. When the pixel to be determined is confirmed to be a noise point according to the comparison result, the pixel to be determined is smoothed by using the pixel value of the control pixel, specifically including: calculating the pixel difference between the pixel value of the pixel to be determined and the average pixel value of at least one control pixel; judging whether the pixel difference exceeds a pixel difference threshold, the pixel difference threshold is preset or calculated in real time based on the pixel value of the control pixel in the push-scan window; when the pixel difference exceeds the pixel difference threshold, replacing the pixel value of the pixel to be determined with the average pixel value of at least one control pixel.

[0083] Optionally, the pixel difference threshold is calculated in real time based on the pixel value of the comparison pixel in the push-scan window, and the calculation method is:

[0084] T = (Ma) * +;

[0085] Wherein, T represents the pixel difference threshold, M represents the maximum theoretical pixel value, a represents the average pixel value of all comparison pixels in the push-scan window, and r represents the preset adaptive coefficient.

[0086] For other details about the technical solutions for implementing each module in the image processing device for fast denoising in the above embodiment, please refer to the description of the image processing method for fast denoising in the above embodiment, which will not be repeated here.

[0087] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0088] See also Fig. 9 , Fig. 9 FIG. 1 is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Fig. 9 As shown, the computer device 30 includes a processor 31 and a memory 32 coupled to the processor 31. The memory 32 stores program instructions. When the program instructions are executed by the processor 31, the processor 31 executes the steps of the image processing method for rapid denoising described in any of the above embodiments.

[0089] The processor 31 may also be referred to as a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip having signal processing capabilities. The processor 31 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0090] See also Fig.10 , Fig.10 It is a schematic diagram of the structure of the storage medium of the embodiment of the present invention. The storage medium of the embodiment of the present invention stores program instructions 41 that can implement the above-mentioned image processing method of fast denoising, wherein the program instructions 41 can be stored in the above-mentioned storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes, or computer devices such as computers, servers, mobile phones, tablets, etc.

[0091] In the several embodiments provided in the present application, it should be understood that the disclosed computer equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0092] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units. The above is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the contents of the specification and drawings of this application, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present application.

Claims

1. A method for rapidly removing noise from an image, characterized in that: It includes: S101, confirming the sweep direction and starting position on the original image; S102, constructing a push-scan window at the starting position, wherein the push-scan window covers a pixel to be determined and at least one reference pixel, wherein the reference pixel includes a noise-free filling pixel filled in a preset manner; S103, comparing the pixel to be determined with the reference pixel, and when the pixel to be determined is confirmed to be a noise point according to the comparison result, smoothing the pixel to be determined using the pixel value of the reference pixel, and using the denoised pixel to be determined as a new reference pixel; S104, moving the push-scan window by one pixel along the push-scan direction to cover a new pixel to be determined, and performing denoising on the new pixel to be determined; Steps S103 to S104 are repeatedly executed to perform denoising on pixels row by row or column by column until denoising of all pixels is completed.

2. The image processing method for rapid denoising according to claim 1, characterized in that: The push-scan window covers one pixel to be determined and three comparison pixels; Fills noise-free pixels based on preset methods, including: A row of pixels and a column of pixels are filled on the edges adjacent to the starting position respectively, the pixel value of the filled pixel is calculated based on the pixel value of a row of pixels or a column of pixels adjacent to the filled pixel on the original image, and the pixel value of the filled pixel at the intersection of a row of pixels and a column of pixels is calculated based on the pixel values ​​of the two adjacent filled pixels.

3. The image processing method for rapid denoising according to claim 1, characterized in that: The push-scan small window covers a pixel to be determined and a comparison pixel; Fills noise-free pixels based on preset methods, including: When the sweep direction is a horizontal sweep direction, a row of pixels is filled on a horizontal edge adjacent to the starting position, and the pixel values ​​of the filled pixels are calculated based on the pixel values ​​of a row of pixels adjacent to the filled pixels on the original image; When the sweeping direction is a vertical sweeping direction, a column of pixels is filled on the vertical side adjacent to the starting position, and the pixel values ​​of the filled pixels are calculated based on the pixel values ​​of a column of pixels adjacent to the filled pixels on the original image.

4. The image processing method for rapid denoising according to claim 2 or 3, characterized in that: The pixel value of the filling pixel is calculated according to the pixel values ​​of a row of pixels or a column of pixels adjacent to the filling pixel on the original image, including: When the filling pixel is one of a row of filled pixels, a row of target pixels adjacent to the filling pixel on the original image is identified, and pixel values ​​of a preset number of target pixels closest to the row of target pixels are selected to calculate the pixel value of the filling pixel; When the filling pixel is one of a column of pixels to be filled, a column of target pixels adjacent to the filling pixel on the original image is confirmed, and the pixel values ​​of a preset number of target pixels closest to the column of target pixels are selected to calculate the pixel value of the filling pixel.

5. The image processing method for rapid denoising according to claim 1, characterized in that: Confirming the push-sweep direction and the starting position on the original image includes: Divide the original image into multiple rectangular areas to be processed; Confirm the pre-set starting position and sweep direction of each rectangular area to be processed.

6. The image processing method for rapid noise removal according to claim 1, characterized in that: The step of comparing the pixel to be determined with the reference pixel, and when the pixel to be determined is confirmed to be a noise point according to the comparison result, smoothing the pixel to be determined by using the pixel value of the reference pixel, comprises: Calculating a pixel difference between a pixel value of the pixel to be determined and an average pixel value of at least one comparison pixel; Determining whether the pixel difference exceeds a pixel difference threshold, wherein the pixel difference threshold is preset or calculated in real time based on the pixel value of the comparison pixel in the push-scan window; When the pixel difference value exceeds the pixel difference value threshold, the pixel value of the pixel to be determined is replaced by the average pixel value of the at least one comparison pixel.

7. The image processing method for rapid noise removal according to claim 6, characterized in that: The pixel difference threshold is calculated in real time based on the pixel value of the comparison pixel in the push-scan window, and the calculation method is: T = (Ma) * r + a; Wherein, T represents the pixel difference threshold, M represents the maximum theoretical pixel value, a represents the average pixel value of all comparison pixels in the push-scan window, and r is a preset adaptive coefficient.

8. An image processing device for rapid noise removal, characterized in that: It includes: Confirmation module, used to confirm the push-sweep direction and starting position on the original image; A construction module, used for constructing a push-scan small window at a starting position, wherein the push-scan small window covers a pixel to be determined and at least one reference pixel, wherein the reference pixel includes a filling pixel without noise points filled in a preset manner; A comparison module is used to compare the pixel to be determined with the reference pixel. When the pixel to be determined is confirmed to be a noise point according to the comparison result, the pixel to be determined is smoothed by using the pixel value of the reference pixel, and the denoised pixel to be determined is used as a new reference pixel. A moving module is used to move the push-scan window by one pixel along the push-scan direction to cover a new pixel to be determined, and to perform denoising on the new pixel to be determined; The comparison module and the movement module repeatedly perform the above operations to perform denoising on the pixels row by row or column by column until all the pixels are denoised.

9. A computer device, characterized in that: The computer device includes a processor and a memory coupled to the processor, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the processor executes the steps of the image processing method for fast denoising as described in any one of claims 1 to 7.

10. A storage medium, characterized in that: The device stores program instructions capable of implementing the image processing method for rapid denoising as described in any one of claims 1 to 7.