Image noise removal method, device and storage medium
By detecting noise pixels and using a full variational model for repair, combined with dynamic threshold repeated denoising, the problem of insufficient protection capability of image detail structure in the prior art is solved, and a better image denoising effect is achieved.
Patent Information
- Application Number
- CN202011302010.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-19
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2040-11-19
AI Technical Summary
Existing image noise removal methods, such as median filtering and switch median filtering, have weak protection capabilities for image detail structures, especially when the noise density is high, it will filter out important details such as edges and textures in the image. This results in poor noise removal effect.
By detecting noise pixels, using a full variation model for repair, and using dynamic thresholds to repeatedly detect and remove the denoised image to ensure better denoising effect.
Effectively protect the detailed structure of the image, improve the image noise removal effect, especially in the case of high noise density, significantly improve the image quality and signal-to-noise ratio.
Smart Images

Figure CN113256505B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an image noise removal method, device and storage medium. Background Art
[0002] In the process of image acquisition, transmission and storage, the image is often disturbed and affected by various noises, which degrades the image quality. For example, in the acquisition process, the sensor is often affected by various factors, causing noise in the image. In the transmission process, the image is polluted by noise due to the interference of the transmission channel used. De-noising technology can remove useless information in the image, effectively improve the image quality, increase the signal-to-noise ratio, and better reflect the information carried by the original image.
[0003] The inventor of the present invention has found in research that median filtering is widely used to remove impulse noise, but median filtering processes all pixels of an image indiscriminately, so that the values of pixels not contaminated by noise are also changed, which will lead to over-smoothing of image detail structures. Improved algorithms based on median filtering, such as switch median filtering, distinguish noise pixels from source pixels through detection, and process the detected noise pixels to improve performance, but these algorithms have weak protection capabilities for image detail structures and will filter out important details such as edges and textures in the image, especially when the noise density is large, which is more obvious. Summary of the invention
[0004] In view of this, the present disclosure provides an image noise removal method, device and storage medium to first detect noise pixels, then use a total variation model to remove noise, and use a dynamic threshold to repeatedly perform noise detection and noise removal on the denoised image to achieve a better denoising effect.
[0005] Specifically, the present disclosure is achieved through the following technical solutions:
[0006] In a first aspect, an embodiment of the present disclosure provides a method for removing image noise, the method comprising:
[0007] S1, determining the noise density interval to which the target image to be subjected to noise removal belongs;
[0008] S2, performing noise pixel detection according to a noise pixel determination method that matches the noise density interval;
[0009] S3, repairing all detected noise pixels in the target image according to the overall variational model to obtain the denoised target image;
[0010] S4, repeatedly performing the above steps S1-S3 for a specified number of times using a dynamic threshold on the denoised target image to obtain the final denoised target image.
[0011] In a second aspect, an embodiment of the present disclosure provides a random noise pulse removal device, the device comprising:
[0012] A determination module, used to determine the noise density interval to which the target image to be subjected to noise removal belongs;
[0013] A detection module, used for performing noise pixel detection according to a noise pixel determination method matching the noise density interval;
[0014] A correction module, used for correcting all detected noise pixels in the target image according to the overall variational model to obtain the denoised target image;
[0015] The iterative module is used to repeatedly execute the functions of the above modules for a specified number of times on the denoised target image using a dynamic threshold to obtain the final denoised target image.
[0016] In a third aspect, an embodiment of the present disclosure provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed, the method described in the first aspect is implemented.
[0017] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising: a machine-readable storage medium and a processor, wherein the machine-readable storage medium stores instruction codes, and the processor communicates with the machine-readable storage medium, reads and executes the instruction codes in the machine-readable storage medium, and implements the method described in the first aspect.
[0018] The disclosed embodiments provide an image noise removal method, device and storage medium, which first determines the noise density interval to which the target image to be noise-removed belongs; performs noise pixel detection on the target image according to the noise pixel determination method that matches the noise density interval; repairs all detected noise pixels in the target image according to the overall variational model to obtain a denoised target image, and repeats the process of noise pixel detection and noise pixel repair on the denoised target image. Furthermore, in this embodiment, noise pixels are first detected, and then the total variational model is used to remove noise, and a dynamic threshold is used to repeatedly perform noise detection and noise removal on the denoised image to achieve a better image denoising effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1a It is a flowchart of an image noise removal method;
[0020] Figure 1b is a neighborhood diagram of the point to be repaired;
[0021] Figure 2ais a schematic diagram of a noise image at a density of 0.2 shown in an exemplary embodiment of the present disclosure;
[0022] Figure 2b is a schematic diagram of a denoised image at a density of 0.2 shown in an exemplary embodiment of the present disclosure;
[0023] Figure 3a is a schematic diagram of a noise image at a density of 0.4 shown in an exemplary embodiment of the present disclosure;
[0024] Figure 3b is a schematic diagram of a 0.4 density de-noised image shown in an exemplary embodiment of the present disclosure;
[0025] Figure 4a is a schematic diagram of a noise image at a density of 0.6 shown in an exemplary embodiment of the present disclosure;
[0026] Figure 4b is a schematic diagram of a denoised image at a density of 0.6 shown in an exemplary embodiment of the present disclosure;
[0027] Figure 5 is a schematic diagram of an original grayscale image shown in an exemplary embodiment of the present disclosure;
[0028] Figure 6 FIG. 4 is a schematic diagram of an image noise removal device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0030] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0031] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0032] FIG. 1 is a flow chart of a method for removing image noise; as shown in FIG. 1 , the method comprises the following steps S10-S30:
[0033] S1. Determine the noise density interval to which the target image to be subjected to noise removal belongs.
[0034] The grayscale values of pixels in an image are not much different in a small local area, but the grayscale values of noise are random and have a large difference from the grayscale values of surrounding pixels. The difference between the grayscale value of a pixel and the grayscale values of surrounding pixels is used to determine whether the pixel is noise.
[0035] Exemplarily, the low-density interval is an image with a density less than or equal to 20% noise, and a 3×3 neighborhood window is used.
[0036] The medium density interval is an image with a density greater than 20% and less than or equal to 40% noise, using a 5×5 neighborhood window.
[0037] The high-density interval is an image with a density greater than 40% of the noise, using a 7 × 7 neighborhood window. Due to the high noise density, a detection method different from low-density noise and medium-density noise needs to be used.
[0038] S2. Perform noise pixel detection according to a noise pixel determination method that matches the noise density interval.
[0039] In one embodiment of the present application, for a low-density interval, that is, the noise density interval to which the target image belongs is less than or equal to 20%, a 3×3 neighborhood window is used to perform noise pixel detection according to the following steps A10-A20:
[0040] Step A10: For any pixel in the target image, calculate the absolute value of the difference between the grayscale value of the pixel and the grayscale values of the surrounding 8 adjacent pixels. If the sum of the smallest 3 absolute values is less than or equal to a given threshold T, the pixel is determined to be a non-noise pixel; otherwise, the pixel is preliminarily determined to be a noise pixel to be confirmed.
[0041] For the noise pixel to be confirmed, further detection and confirmation are required, and then the noise pixel to be confirmed determined according to the above step A10 is detected again according to the following step A20:
[0042] Step A20, for the above-mentioned noise pixel to be confirmed, assuming that its grayscale value is v, calculate the average value of non-noise pixels in its 3×3 neighborhood window, recorded as v1; calculate the average value of non-noise pixels in its 5×5 neighborhood window, recorded as v2; if it satisfies: the absolute value of the difference between v and v1 is less than or equal to 20, or there is a similar non-noise pixel in the 5×5 neighborhood window of the first pixel, and the absolute value of the difference between the grayscale value and v is less than or equal to 20, then the first pixel is judged to be a non-noise pixel.
[0043] In one embodiment of the present application, for a medium density interval, that is, the noise density interval of the target image is a density greater than 20% and less than or equal to 40%, a 5×5 neighborhood window is used to perform noise pixel detection according to the following steps B10-B20:
[0044] Step B10: for any pixel in the target image, calculate the absolute value of the difference between the grayscale value of the pixel and the grayscale values of the surrounding 24 adjacent pixels; if the sum of the corresponding minimum 3 absolute values in the 3×3 neighborhood window is less than or equal to the given threshold value T, or the sum of the corresponding minimum 5 absolute values in the 5×5 neighborhood window is less than or equal to the given threshold value T+16, then the pixel is determined to be a non-noise pixel; otherwise, the pixel is preliminarily determined to be a noise pixel to be confirmed;
[0045] The noise pixel to be confirmed determined according to the above step B10 is detected again according to the following step B20:
[0046] Step B20, for the noise pixel to be confirmed, assuming that its grayscale value is v, calculate the average value of non-noise pixels in its 3×3 neighborhood window, recorded as v1; calculate the average value of non-noise pixels in its 5×5 neighborhood window, recorded as v2; if it satisfies: the absolute value of the difference between v and v1 is less than or equal to T1, or the absolute value of the difference between v and v2 is less than or equal to T2, or there is a similar non-noise pixel in the 5×5 neighborhood window of the noise pixel to be confirmed, and the absolute value of the difference between the grayscale value and v is less than or equal to 20, then the first pixel is determined to be a non-noise pixel;
[0047] The above parameters T1 and T2 are given and calculated as follows:
[0048] Calculate the variance of non-noise pixels in the 3×3 neighborhood window of the noise pixel to be confirmed. If the variance value is greater than the first predetermined value, T1 is taken as 32, otherwise T1 is taken as 16; calculate the variance of non-noise pixels in the 5×5 neighborhood window of the noise pixel to be confirmed. If the variance value is greater than the second predetermined value, T2 is taken as 32, otherwise T2 is taken as 16.
[0049] In one embodiment of the present application, for a high-density interval, that is, a noise density interval to which the target image belongs has a density greater than 40%, a neighborhood window with a neighborhood window size of 7×7 is used to perform noise pixel detection according to the following steps C10-C20:
[0050] Step C10: for any pixel P in the target image, calculate the absolute value of the difference between the grayscale value of the pixel and the grayscale values of the surrounding 48 points. If the sum of the corresponding 3 smallest absolute values in the 3×3 neighborhood window is greater than the given threshold T, or the sum of the corresponding 5 smallest absolute values in the 5×5 neighborhood window is greater than the given threshold T+16, or the sum of the corresponding 7 smallest absolute values in the 7×7 neighborhood window is greater than the given threshold T+32, then the pixel P is determined to be a noise pixel to be confirmed; otherwise, the pixel P is determined to be a non-noise pixel.
[0051] Step C20, re-detecting the noise pixel to be confirmed obtained according to the above step C10 according to the above step B20.
[0052] S3. Repair all detected noise pixels in the target image according to the overall variational model to obtain the denoised target image.
[0053] Assume that the image is a two-dimensional function u(x, y), where x and y are spatial coordinates. The basic formula for TV model repair adopted in the present disclosure is as follows:
[0054]
[0055] in, is the gradient of u(x,y), ε is a constant introduced to prevent the denominator from being too small during calculation.
[0056] It should be noted that the above-mentioned TV model can adopt the existing technology in this field. For details, please refer to the published document "Shao Xiaowei, Liu Zhengkai, Song Bi. An adaptive image restoration method based on TV model [J]". This application does not make a specific introduction to this.
[0057] Assume that the position of the target pixel O is (i, j), and the set of the corresponding neighboring points above, below, left, and right around it is ∧ = {W, E, N, S} = {(i-1, j), (i+1, j), (i, j-1), (i, j+1)}, as Figure 1bshown.
[0058] Among them, w, e, s, and n are the midpoints of W and O, E and O, S and O, and N and O, respectively. The pixel values corresponding to these four points are unknown. Let the parameters Its divergence is:
[0059]
[0060] Among them, the horizontal gradient and
[0061]
[0062] Similarly, we can get v w 1 , Vertical gradient v n 2 , Vertical gradient v s 2 , Substituting (2) into (1), we can obtain:
[0063]
[0064] If the neighboring points above, below, left, and right of the target pixel O are all non-noise pixels, then repair is performed according to formula (3); if there are noise pixels, then formula (3) is modified as follows:
[0065]
[0066] Among them, m(p) = 1, if point p is a non-noise pixel point; m(p) = 0, if point p is a noise pixel point. This can reduce the interference of noise on restoration.
[0067] S4, repeatedly performing the above steps S1-S3 for a specified number of times using a dynamic threshold on the denoised target image to obtain the final denoised target image.
[0068] Exemplarily, the image denoising method provided in the embodiment of the present application first sets the initial threshold value to 40-48, and the number of low-density, medium-density and high-density iterations are 3-5 times, 5-7 times and 7-9 times respectively;
[0069] For low-density, medium-density and high-density random value impulse noise images, the method in the above embodiment is used to detect noise pixels; the detected noise pixels are repaired according to formula (4), and the repaired pixels are marked as non-noise pixels; finally, the threshold is updated with the number of iterations, and the noise pixel detection is repeated until the set number of iterations is completed.
[0070] In the above embodiment, MATLAB R2018a is used as a development tool to implement random pulse noise removal based on the TV model under the Windows 10 platform. Figure 5 As shown, the width is 512mm and the height is 512mm.
[0071] The peak signal-to-noise ratio is used as an objective criterion for measurement. For noises of different densities: p = 0.2, 0.4, 0.6, the corresponding images are obtained for reference. Figure 2a-Figure 4b .
[0072] Figure 6 is a schematic diagram of an image noise removal device shown in an exemplary embodiment of the present disclosure; Figure 6 As shown, the device comprises:
[0073] The determination module 601 is used to determine the noise density interval to which the target image to be subjected to noise removal belongs; the detection module 602 is used to perform noise pixel detection according to the noise pixel determination method matching the noise density interval;
[0074] A correction module 603 is used to correct all detected noise pixels in the target image according to the overall variational model to obtain the denoised target image;
[0075] The iteration module 604 is used to repeatedly execute the functions of the above modules for a specified number of times on the denoised target image to obtain the final denoised target image.
[0076] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0077] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0078] Computers suitable for executing computer programs include, for example, general and / or special microprocessors, or any other type of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, the computer will also include one or more large-capacity storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or the computer will be operably coupled to this large-capacity storage device to receive data from it or to transmit data to it, or both. However, the computer does not necessarily have such a device. In addition, the computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0079] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, for example, semiconductor memory devices (e.g., EPROM, EEPROM and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD ROM and DVD-ROM disks. The processor and memory may be supplemented by, or incorporated in, special purpose logic circuitry.
[0080] Although this specification includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of the specific embodiments of specific inventions. Certain features described in multiple embodiments in this specification may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claim protection, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.
[0081] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that these operations be performed in the particular order shown or performed sequentially, or requiring that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged into multiple software products.
[0082] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.
[0083] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. A method for removing image noise, characterized in that: The method comprises: S1, determining the noise density interval to which the target image to be subjected to noise removal belongs; S2, performing noise pixel detection according to a noise pixel determination method that matches the noise density interval; S3, repairing all detected noise pixels in the target image according to the overall variational model to obtain the denoised target image; S4, repeatedly performing the above steps S1-S3 for a specified number of times using a dynamic threshold on the denoised target image to obtain the final denoised target image; The detecting of noise pixels according to the noise pixel determination method matching the noise density interval includes: If the noise density interval to which the target image belongs is less than or equal to 20%, a 3×3 neighborhood window is used to perform noise pixel detection according to the following steps A10-A20: Step A10: for any pixel in the target image, calculate the absolute value of the difference between the grayscale value of the pixel and the grayscale values of the surrounding 8 adjacent pixels; if the sum of the smallest 3 absolute values is less than or equal to a given threshold T, the pixel is determined to be a non-noise pixel; otherwise, the pixel is preliminarily determined to be a noise pixel to be confirmed; The noise pixel to be confirmed determined in step A10 is detected again in step A20 as follows: Step A20, for the noise pixel to be confirmed, assume that its grayscale value is v, calculate the average value of the non-noise pixels in its 3×3 neighborhood window, recorded as v1; if it satisfies: the absolute value of the difference between v and v1 is less than or equal to 20, or there is a similar non-noise pixel in the 5×5 neighborhood window of the noise pixel to be confirmed, and the absolute value of the difference between the grayscale value of v and the grayscale value of v is less than or equal to 20, then the noise pixel to be confirmed is judged to be a non-noise pixel.
2. The method according to claim 1, characterized in that The detecting of noise pixels according to the noise pixel determination method matching the noise density interval includes: If the noise density interval of the target image is greater than 20% and less than or equal to 40%, a 5×5 neighborhood window is used to perform noise pixel detection according to the following steps B10-B20: Step B10: for any pixel in the target image, calculate the absolute value of the difference between the grayscale value of the pixel and the grayscale values of the surrounding 24 adjacent pixels; if the sum of the corresponding 3 smallest absolute values in the 3×3 neighborhood window is less than or equal to a given threshold value T, or the sum of the corresponding 5 smallest absolute values in the 5×5 neighborhood window is less than or equal to a given threshold value T+16, then the pixel is determined to be a non-noise pixel; otherwise, the pixel is preliminarily determined to be a noise pixel to be confirmed; The noise pixel to be confirmed determined according to the above step B10 is detected again according to the following step B20: Step B20, for the noise pixel to be confirmed, assuming that its grayscale value is v, calculate the average value of non-noise pixels in its 3×3 neighborhood window, recorded as v1; calculate the average value of non-noise pixels in its 5×5 neighborhood window, recorded as v2; if it satisfies: the absolute value of the difference between v and v1 is less than or equal to T1, or the absolute value of the difference between v and v2 is less than or equal to T2, or there is a similar non-noise pixel in the 5×5 neighborhood window of the noise pixel to be confirmed, and the absolute value of the difference between the grayscale value and v is less than or equal to 20, then the noise pixel to be confirmed is judged to be a non-noise pixel; Among them, the parameters T1 and T2 are given as follows: calculate the variance of non-noise pixels in the 3×3 neighborhood window of the noise pixel to be confirmed, if the variance value is greater than the first predetermined value, T1 is taken as 32, otherwise T1 is taken as 16; calculate the variance of non-noise pixels in the 5×5 neighborhood window of the noise pixel to be confirmed, if the variance value is greater than the second predetermined value, T2 is taken as 32, otherwise T2 is taken as 16.
3. The method according to claim 2, characterized in that The detecting of noise pixels according to the noise pixel determination method matching the noise density interval further includes: If the noise density interval to which the target image belongs is greater than 40%, a neighborhood window with a neighborhood window size of 7×7 is used to perform noise pixel detection according to the following steps C10-C20: Step C10: for any pixel P in the target image, calculate the absolute value of the difference between the grayscale value of the pixel and the grayscale values of the surrounding 48 points; if the sum of the corresponding three smallest absolute values in the 3×3 neighborhood window is greater than a given threshold value T, or the sum of the corresponding five smallest absolute values in the 5×5 neighborhood window is greater than a given threshold value T+16, or the sum of the corresponding seven smallest absolute values in the 7×7 neighborhood window is greater than a given threshold value T+32, then the pixel P is determined to be a noise pixel to be confirmed; otherwise, the pixel P is determined to be a non-noise pixel; C20, re-detecting the noise pixel to be confirmed obtained according to the above step C10 according to the above step B20.
4. The method according to claim 1, characterized in that The step of repairing all detected noise pixels in the target image according to the overall variational model to obtain the denoised target image includes: Assuming the image is u(x,y), the basic formula of the overall variational model patching is as follows: in, is the gradient of u(x,y), ε is a constant introduced to prevent the denominator from being too small during calculation; Assume the position of the target pixel O is (i, j), and the set of the corresponding neighboring points above, below, left and right around it is ∧ = {W, E, N, S} = {(i-1, j), (i+1, j), (i, j-1), (i, j+1)}; Among them, w, e, s, and n are the midpoints of W and O, E and O, S and O, and N and O, respectively. The pixel values corresponding to these four midpoints are unknown. Let Its divergence is: in, Similarly, v w 1 , v n 2 , v s 2 , Substituting (2) into (1), we can obtain: If the neighboring points above, below, left, and right of the target pixel O are all non-noise pixels, then repair is performed according to formula (3); if there are noise pixels, then formula (3) is modified as follows: Wherein m(p)=1, if point p is a non-noise pixel; m(p)=0, if point p is a noise pixel.
5. A random noise pulse removal device, characterized in that: The device comprises: A determination module, used to determine the noise density interval to which the target image to be subjected to noise removal belongs; A detection module, used for performing noise pixel detection according to a noise pixel determination method matching the noise density interval; A correction module, used for correcting all detected noise pixels in the target image according to the overall variational model to obtain the denoised target image; An iterative module, used for repeatedly executing the functions of the above modules for a specified number of times using a dynamic threshold value on the denoised target image to obtain the final denoised target image; The detection module is also used to: If the noise density interval to which the target image belongs is less than or equal to 20%, a 3×3 neighborhood window is used to perform noise pixel detection according to the following steps: For any pixel in the target image, the absolute value of the difference between the grayscale value of the pixel and the grayscale values of the surrounding 8 adjacent pixels is calculated. If the sum of the smallest 3 absolute values is less than or equal to a given threshold T, the pixel is determined to be a non-noise pixel; otherwise, the pixel is preliminarily determined to be a noise pixel to be confirmed; The noise pixels to be confirmed determined according to the above steps are detected again according to the following steps: For the noise pixel to be confirmed, assume that its grayscale value is v, calculate the average value of the non-noise pixels in its 3×3 neighborhood window, and record it as v1; if: the absolute value of the difference between v and v1 is less than or equal to 20, or there is a similar non-noise pixel in the 5×5 neighborhood window of the noise pixel to be confirmed, and the absolute value of the difference between the grayscale value of v and the grayscale value of v is less than or equal to 20, then the noise pixel to be confirmed is judged to be a non-noise pixel.
6. A machine-readable storage medium having a plurality of computer instructions stored thereon, wherein when the computer instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.