CN112508810A - Non-local mean blind image denoising method, system and device - Google Patents

Non-local mean blind image denoising method, system and device Download PDF

Info

Publication number
CN112508810A
CN112508810A CN202011371948.XA CN202011371948A CN112508810A CN 112508810 A CN112508810 A CN 112508810A CN 202011371948 A CN202011371948 A CN 202011371948A CN 112508810 A CN112508810 A CN 112508810A
Authority
CN
China
Prior art keywords
image
pixel
pixel point
neighborhood
noise image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011371948.XA
Other languages
Chinese (zh)
Inventor
陈叶飞
王达君
梁俊文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Yunconghuilin Artificial Intelligence Technology Co ltd
Original Assignee
Shanghai Yunconghuilin Artificial Intelligence Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Yunconghuilin Artificial Intelligence Technology Co ltd filed Critical Shanghai Yunconghuilin Artificial Intelligence Technology Co ltd
Priority to CN202011371948.XA priority Critical patent/CN112508810A/en
Publication of CN112508810A publication Critical patent/CN112508810A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image denoising, and particularly provides a non-local mean blind image denoising method. The method aims to solve the technical problem of accurately estimating the Gaussian noise level to automatically determine the noise level parameter. To this end, the method of the invention comprises the following steps: acquiring the Gaussian noise level of a noise image to be processed, and determining corresponding filtering parameters according to the Gaussian noise level; calculating similarity between a pixel point to be processed in the noise image and a neighborhood pixel point in a search window with the pixel point to be processed as a center so as to denoise the pixel point to be processed; and calculating the pixel values of all pixel points in the denoised image and outputting the image of calculating the pixel values of all pixel points. Under the condition of adopting the method, the invention can accurately estimate the Gaussian noise level without manually setting the noise level parameter; and the execution efficiency of the algorithm is improved by using the fast Fourier transform optimization algorithm.

Description

Non-local mean blind image denoising method, system and device
Technical Field
The invention relates to the technical field of image denoising, in particular to a non-local mean blind image denoising method, system and device.
Background
In the process of collecting, coding, transmitting and decoding digital images, the digital images are more or less interfered by different noises, most of the actual noises can be approximate to white Gaussian additive noises, and the subjective visual quality of the images is influenced to a great extent. Meanwhile, noise is also an obstacle to correctly identify image information, and before detecting, identifying, positioning or segmenting an image, denoising processing is often required to be performed on a noise image to provide a clear and accurate high-quality image.
In recent years, a Non-local Means (NLM) image denoising algorithm is used as a classical algorithm in the image denoising field, and the purpose of denoising is achieved by measuring the similarity degree between an image neighborhood block taking a pixel point to be processed as a center and other image neighborhood blocks in a search region and performing weighted averaging on the pixel points with similar neighborhood structures by utilizing the redundancy of image content information and the self-similarity of image structure information.
The non-local mean algorithm well maintains the detail information of the original undistorted image while removing noise, but the non-local mean algorithm still has some defects in practical application:
(1) the traditional non-local mean algorithm usually needs to manually preset a corresponding noise level (namely, a gaussian noise level) before denoising a noise image, however, in an actual application scene, the gaussian noise level of the noise image cannot be known in advance, so that a method for performing noise estimation on an image with unknown noise level is needed.
(2) Meanwhile, in the process of measuring the similarity of the image neighborhood blocks, the non-local mean algorithm needs to search in the whole noise image, so that the time complexity is high, and the non-local mean algorithm is difficult to apply to an actual application scene, so that a method for improving the algorithm execution efficiency needs to be researched.
Therefore, there is a need for an improved fast non-local mean blind image denoising scheme, which can more accurately estimate the gaussian noise level without manually setting noise level parameters in the whole process.
Disclosure of Invention
In order to overcome the above-mentioned drawbacks, the present invention is proposed to solve or at least partially solve the technical problem of how to estimate the magnitude of the gaussian noise level more accurately in the whole process to automatically determine the noise level parameter. The invention provides a non-local mean blind image denoising method, a system and a device for solving the technical problems.
In a first aspect, a non-local mean blind image denoising method is provided, and the method includes the following steps:
acquiring the Gaussian noise level of the noise image to be processed according to the pixel mean value of the noise image to be processed, and determining corresponding filtering parameters according to the Gaussian noise level;
denoising each pixel point to be processed in the noise image based on the filtering parameter;
calculating the pixel values of all pixel points in the noise image after denoising;
and reconstructing the noise image according to the pixel values of all the pixel points after denoising.
The method includes the steps of obtaining a Gaussian noise level of a noise image to be processed, and determining corresponding filtering parameters according to the Gaussian noise level, and specifically includes the following steps:
dividing the noise image into a plurality of noise image sub-blocks;
calculating the pixel mean value of the corresponding position of each noise image sub-block;
calculating a covariance matrix for each of the noise image sub-blocks based on the pixel mean;
calculating the eigenvalue of the covariance matrix of each noise image subblock, and sorting the eigenvalues from large to small to extract the first r eigenvalues;
solving the mean value tau of all covariance matrix eigenvalues;
gaussian noise level of the noisy image
Figure BDA0002806393390000021
The value interval of the pixel point coordinates of the noise image is [1,2,3, …, m ] × [1,2,3, …, n ], m and n respectively represent the height and width of the noise image, the unit is a pixel, and m and n are positive integers;
the setting window is a fixed window with fixed size of dxd;
dividing the noise image into a plurality of noise image sub-blocks, specifically comprising:
dividing the noise image into s noise image sub-blocks y by using the fixed window to perform overlapping line-by-line traversal by taking the upper left corner of the noise image as a starting point and the lower right corner of the noise image as an end pointtAnd sub-blocks y of these noisy imagestConverting into a one-dimensional column vector of d x d to form a set of noise image subblocks
Figure BDA0002806393390000031
Where t denotes the number of the image sub-block, and s ═ m-d +1) × (n-d + 1).
The obtaining of the pixel mean value of the corresponding position of each noise image sub-block specifically includes:
calculating the mean value mu of the pixel values of the corresponding positions of each noise image sub-block according to the following pixel mean value formula:
Figure BDA0002806393390000032
wherein y ist(i) Expressing the pixel value of the image subblock t at the pixel point i, wherein mu expresses the pixel mean value of the corresponding position of each image subblock;
calculating a covariance matrix of each noise image sub-block based on the pixel mean, specifically comprising:
calculating the covariance matrix sigma of each of the noise image sub-blocks from the mean μ of the pixel values of the noise image sub-block by the following covariance matrix formula:
Figure BDA0002806393390000033
wherein, ytRepresenting imagesThe pixel value of each pixel point in the block T, T represents a transposed symbol;
calculating the eigenvalue of the covariance matrix of each noise image subblock, and sorting the eigenvalues from large to small to extract the first r eigenvalues, which specifically comprises the following steps:
according to the covariance matrix sigma, calculating the eigenvalue of the covariance matrix of the noise image subblock, and obtaining:
Figure BDA0002806393390000034
wherein R ═ A, W]A represents subspace of dimension l (l < r), r is d × d, W represents matrix of (r-l) × r, and λθThe eigenvalues of the covariance matrix sigma are represented and simplified to obtain:
Figure BDA0002806393390000041
thus, the eigenvalue λ of the covariance matrix is solvedθ(1 is more than or equal to theta and less than or equal to r) and is sorted from big to small: lambda [ alpha ]1≥λ2≥λ3≥…≥λrWherein λ isrRepresenting the extracted r-th characteristic value;
and traversing and solving the mean value tau of the characteristic value of the covariance matrix through the index sequence number k:
Figure BDA0002806393390000042
judging whether the tau is equal to the first r characteristic values or not
Figure BDA0002806393390000043
Is equal, and if so, estimating the Gaussian noise level of the noise image
Figure BDA0002806393390000044
Setting the filter parameters of the non-local mean algorithm as
Figure BDA0002806393390000045
Where a is a constant.
Denoising each pixel point to be processed in the noise image based on the filtering parameter, specifically comprising:
calculating the square sum of the Gaussian weighted Euclidean distance between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center;
converting the square sum of the Gaussian weighted Euclidean distance into convolution of a Gaussian kernel function and the Euclidean distance, and optimizing by using fast Fourier transform;
and calculating the similarity between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center according to the optimized square sum of the Gaussian weighted Euclidean distance and the filtering parameter so as to denoise the pixel points to be processed.
The method includes the following steps of calculating the square sum of the Gaussian weighted Euclidean distance between a neighborhood block taking each pixel point to be processed as the center and a neighborhood block taking a neighborhood pixel point as the center, and specifically includes the following steps:
calculating an image neighborhood block Y centered on a pixel point i by the following formulaiAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares of the gaussian weighted euclidean distances of:
Figure BDA0002806393390000051
wherein, P { (P) { (P)1,p2)||p1|≤q,|p2Q ≦ q } represents the coordinate range of the image neighborhood block with radius size q, p ═ p (p)1,p2) Representing offset coordinates, p, in image neighborhood blocks1,p2Corresponding respectively to the value of the coordinate in the Gaussian kernel function, Yi,YjRespectively representing an image neighborhood block taking i as a center and an image neighborhood block taking j as a center, Y (i), Y (j) respectively representing the ith pixel point of the noise imageAnd the pixel value corresponding to the jth pixel point, Y (i-p), Y (j-p) respectively representing the pixel values corresponding to the (i-p) th pixel point and the (j-p) th pixel point of the noise image, and Gα(p) is a gaussian kernel with standard deviation α:
Figure BDA0002806393390000052
wherein α represents a standard deviation of a gaussian kernel function;
converting the square sum of the Gaussian weighted Euclidean distance into convolution of a Gaussian kernel function and the Euclidean distance, and optimizing by using fast Fourier transform, wherein the method specifically comprises the following steps:
image neighborhood block Y with pixel point i as centeriAnd the sum of squares d (i, j) of the gaussian weighted euclidean distances of the image neighborhood block Y centered at pixel point j is as follows:
Figure BDA0002806393390000053
converting the squared sum d (i, j) of the gaussian weighted euclidean distance into a convolution of a gaussian kernel function and the euclidean distance, as shown in the following formula:
Figure BDA0002806393390000054
wherein the content of the first and second substances,
Figure BDA0002806393390000055
denotes a convolution calculation, Δ (i) ═ Y (i-p) -Y (j-p)2
Will be provided with
Figure BDA0002806393390000056
The convolution of (a) is optimized by using a fourier forward transform and an fourier inverse transform, as shown in the following formula:
Figure BDA0002806393390000057
wherein F (-) is the Fourier transform, F-1(. is the inverse fourier transform;
according to the optimized square sum of the Gaussian weighted Euclidean distances and the filtering parameters, calculating the similarity degree between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center so as to denoise the pixel points to be processed, and the method specifically comprises the following steps:
according to image neighborhood block YiAnd image neighborhood block YjAnd the filter parameter h, calculating the similarity weight w of the similar neighborhood block taking the pixel point i to be processed and the neighborhood pixel point j as the centeri,jAs shown in the following formula:
Figure BDA0002806393390000061
wherein the content of the first and second substances,
Figure BDA0002806393390000062
wherein, a is a constant, and a is a constant,
Figure BDA0002806393390000063
for the estimated Gaussian noise level, d (i, j) is the image neighborhood block YiAnd image neighborhood block YjIs the sum of squares of the gaussian-weighted euclidean distances, wi,jIs a weight function for measuring the similarity of the similar neighborhood blocks with the pixel point i to be processed and the neighborhood pixel point j as the center;
denoising the pixel points to be processed, specifically comprising: according to the obtained weight wi,jAnd calculating the gray value of each pixel point to be processed after the non-local mean filtering by the gray value of each pixel point to be processed so as to finish denoising.
The calculating of the pixel values of all the pixels in the noise image after denoising specifically comprises:
based on the filter parameters, inCarrying out weighted average on pixel values of all pixel points in the noise image after denoising in the search window to obtain the pixel value of the image after denoising at the pixel point i
Figure BDA0002806393390000064
The specific mathematical expression is as follows:
Figure BDA0002806393390000065
wherein, wi,jIs a weight function for measuring the similarity of similar neighborhood blocks centered on the pixel point i to be processed and the neighborhood pixel point j respectively, SiRepresenting a search window or the whole image centred on i, Y (j) being a pixel point (j)1,j2)∈Si,j1≤m,j2Pixel values of n or less, m, n respectively representing the height and width of the noise image to be processed in pixels, WiIs a function of the normalized coefficient of the,
Figure BDA0002806393390000066
h is the filter parameter.
In a second aspect, a non-local mean blind image denoising system is provided, including:
the device comprises an acquisition module, a filtering module and a processing module, wherein the acquisition module is used for acquiring the Gaussian noise level of a noise image to be processed according to the pixel average value of the noise image to be processed and determining corresponding filtering parameters according to the Gaussian noise level;
the denoising module is used for denoising each pixel point to be processed in the noise image based on the filtering parameters;
the calculation module is used for calculating the pixel values of all the pixel points in the noise image after denoising;
and the reconstruction module is used for reconstructing the noise image according to the pixel values of all the pixel points after denoising.
The operation executed by the obtaining module specifically includes:
dividing the noise image into a plurality of noise image sub-blocks;
calculating the pixel mean value of the corresponding position of each noise image sub-block;
calculating a covariance matrix for each of the noise image sub-blocks based on the pixel mean;
calculating the eigenvalue of the covariance matrix of each noise image subblock, and sorting the eigenvalues from large to small to extract the first r eigenvalues;
solving the mean value tau of all covariance matrix eigenvalues;
gaussian noise level of the noisy image
Figure BDA0002806393390000071
The value interval of the pixel point coordinates of the noise image is [1,2,3, …, m ] × [1,2,3, …, n ], m and n respectively represent the height and width of the noise image, the unit is a pixel, and m and n are positive integers;
the setting window is a fixed window with fixed size of dxd;
dividing the noise image into a plurality of noise image sub-blocks, specifically comprising:
dividing the noise image into s noise image sub-blocks y by using the fixed window to perform overlapping line-by-line traversal by taking the upper left corner of the noise image as a starting point and the lower right corner of the noise image as an end pointtAnd sub-blocks y of these noisy imagestConverting into a one-dimensional column vector of d x d to form a set of noise image subblocks
Figure BDA0002806393390000072
Where t denotes the number of the image sub-block, and s ═ m-d +1) × (n-d + 1).
The obtaining of the pixel mean value of the corresponding position of each noise image sub-block specifically includes:
calculating the mean value mu of the pixel values of the corresponding positions of each noise image sub-block according to the following pixel mean value formula:
Figure BDA0002806393390000073
wherein y ist(i) Expressing the pixel value of the image subblock t at the pixel point i, wherein mu expresses the pixel mean value of the corresponding position of each image subblock;
calculating a covariance matrix of each noise image sub-block based on the pixel mean, specifically comprising:
calculating the covariance matrix sigma of each of the noise image sub-blocks from the mean μ of the pixel values of the noise image sub-block by the following covariance matrix formula:
Figure BDA0002806393390000081
wherein, ytExpressing the pixel value of each pixel point in the image sub-block T, wherein T expresses a transposed symbol;
calculating the eigenvalue of the covariance matrix of each noise image subblock, and sorting the eigenvalues from large to small to extract the first r eigenvalues, which specifically comprises the following steps:
according to the covariance matrix sigma, calculating the eigenvalue of the covariance matrix of the noise image subblock, and obtaining:
Figure BDA0002806393390000082
wherein R ═ A, W]A represents subspace of dimension l (l < r), r is d × d, W represents matrix of (r-l) × r, and λθThe eigenvalues of the covariance matrix sigma are represented and simplified to obtain:
Figure BDA0002806393390000083
thus, the eigenvalue λ of the covariance matrix is solvedθ(1 is more than or equal to theta and less than or equal to r) and is sorted from big to small: lambda [ alpha ]1≥λ2≥λ3≥…≥λrWherein λ isrRepresenting the extracted r-th characteristic value;
and traversing and solving the mean value tau of the characteristic value of the covariance matrix through the index sequence number k:
Figure BDA0002806393390000084
judging whether the tau is equal to the first r characteristic values or not
Figure BDA0002806393390000085
Is equal, and if so, estimating the Gaussian noise level of the noise image
Figure BDA0002806393390000091
Setting the filter parameters of the non-local mean algorithm as
Figure BDA0002806393390000092
Where a is a constant.
The operation executed by the denoising module specifically includes:
calculating the square sum of the Gaussian weighted Euclidean distance between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center;
converting the square sum of the Gaussian weighted Euclidean distance into convolution of a Gaussian kernel function and the Euclidean distance, and optimizing by using fast Fourier transform;
and calculating the similarity between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center according to the optimized square sum of the Gaussian weighted Euclidean distance and the filtering parameter so as to denoise the pixel points to be processed.
The method includes the following steps of calculating the square sum of the Gaussian weighted Euclidean distance between a neighborhood block taking each pixel point to be processed as the center and a neighborhood block taking a neighborhood pixel point as the center, and specifically includes the following steps:
calculating an image neighborhood block Y centered on a pixel point i by the following formulaiAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares of the gaussian weighted euclidean distances of:
Figure BDA0002806393390000093
wherein, P { (P) { (P)1,p2)||p1|≤q,|p2Q ≦ q } represents the coordinate range of the image neighborhood block with radius size q, p ═ p (p)1,p2) Representing offset coordinates, p, in image neighborhood blocks1,p2Corresponding respectively to the value of the coordinate in the Gaussian kernel function, Yi,YjRespectively representing an image neighborhood block taking i as a center and an image neighborhood block taking j as a center, Y (i), Y (j) respectively representing pixel values corresponding to the ith pixel point and the jth pixel point of the noise image, Y (i-p), Y (j-p) respectively representing pixel values corresponding to the (i-p) th pixel point and the (j-p) th pixel point of the noise image, and Gα(p) is a gaussian kernel with standard deviation α:
Figure BDA0002806393390000094
wherein α represents a standard deviation of a gaussian kernel function;
converting the square sum of the Gaussian weighted Euclidean distance into convolution of a Gaussian kernel function and the Euclidean distance, and optimizing by using fast Fourier transform, wherein the method specifically comprises the following steps:
image neighborhood block Y with pixel point i as centeriAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares d (i, j) of the gaussian-weighted euclidean distances of (a) is as follows:
Figure BDA0002806393390000101
converting the squared sum d (i, j) of the gaussian weighted euclidean distance into a convolution of a gaussian kernel function and the euclidean distance, as shown in the following formula:
Figure BDA0002806393390000102
wherein the content of the first and second substances,
Figure BDA0002806393390000103
denotes a convolution calculation, Δ (i) ═ Y (i-p) -Y (j-p)2
Will be provided with
Figure BDA0002806393390000104
The convolution of (a) is optimized by using a fourier forward transform and an fourier inverse transform, as shown in the following formula:
Figure BDA0002806393390000105
wherein F (-) is the Fourier transform, F-1(. is the inverse fourier transform;
according to the optimized square sum of the Gaussian weighted Euclidean distances and the filtering parameters, calculating the similarity degree between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center so as to denoise the pixel points to be processed, and the method specifically comprises the following steps:
according to image neighborhood block YiAnd image neighborhood block YjAnd the filter parameter h, calculating the similarity weight w of the similar neighborhood block taking the pixel point i to be processed and the neighborhood pixel point j as the centeri,jAs shown in the following formula:
Figure BDA0002806393390000106
wherein the content of the first and second substances,
Figure BDA0002806393390000107
wherein, a is a constant, and a is a constant,
Figure BDA0002806393390000108
for the estimated Gaussian noise level, d (i, j) is the image neighborhood block YiAnd image neighborhood block YjIs the sum of squares of the gaussian-weighted euclidean distances, wi,jIs a weight function for measuring the similarity of the similar neighborhood blocks with the pixel point i to be processed and the neighborhood pixel point j as the center;
denoising the pixel points to be processed, specifically comprising: according to the obtained weight wi,jAnd calculating the gray value of each pixel point to be processed after the non-local mean filtering by the gray value of each pixel point to be processed so as to finish denoising.
The operation executed by the computing module specifically includes: based on the filtering parameters, carrying out weighted average on pixel values of all pixel points in the noise image after denoising in the search window to obtain the pixel value of the image after denoising at the pixel point i
Figure BDA0002806393390000109
The specific mathematical expression is as follows:
Figure BDA0002806393390000111
wherein, wi,jIs a weight function for measuring the similarity of similar neighborhood blocks centered on the pixel point i to be processed and the neighborhood pixel point j respectively, SiRepresenting a search window or the whole image centred on i, Y (j) being a pixel point (j)1,j2)∈Si,j1≤m,j2Pixel values of n or less, m, n respectively representing the height and width of the noise image to be processed in pixels, WiIs a function of the normalized coefficient of the,
Figure BDA0002806393390000112
h is the filter parameter.
In a third aspect, a computer readable storage medium is provided, in which a plurality of program codes are stored, the program codes being adapted to be loaded and executed by a processor to perform the non-local mean blind image denoising method according to any one of the preceding claims.
In a fourth aspect, a processing apparatus is provided, comprising a processor and a memory, the memory being adapted to store a plurality of program codes, the program codes being adapted to be loaded and executed by the processor to perform the non-local mean blind image denoising method according to any of the preceding claims.
One or more technical schemes of the invention at least have one or more of the following beneficial effects:
firstly, inputting a noise image to be processed, estimating the Gaussian noise level of the noise image to set corresponding filtering parameters; respectively presetting a search window with fixed size and a neighborhood block with fixed size; then, based on the filtering parameters, calculating the similarity between the pixel point to be processed in the noise image and the neighborhood pixel point in the search window so as to denoise the pixel point to be processed; meanwhile, calculating pixel values of all pixel points in the denoised image; and finally, outputting the image of the pixel values of all the pixel points. From the perspective of algorithm self-adaptive capacity, aiming at an image with any unknown noise level, the method can accurately estimate the Gaussian noise level, and further does not need to manually set noise level parameters in the whole process, so that the self-adaptive capacity of the algorithm for images with different noise levels is improved; from the aspect of algorithm execution efficiency, the method optimizes the convolution calculation of the Gaussian kernel function and the Euclidean distance in the algorithm by using the fast Fourier transform, further accelerates the calculation of the distance between adjacent domains of the algorithm, and provides possibility for the landing of the non-local mean algorithm.
Drawings
Embodiments of the invention are described below with reference to the accompanying drawings, in which:
FIG. 1 is a main flow diagram of one embodiment of a non-local mean blind image denoising method according to the present invention;
FIG. 2 is a diagram illustrating an embodiment of a process for calculating pixel values of all points in a denoised image according to the present invention;
FIG. 3 is a block diagram of an embodiment of a non-local mean blind image denoising system according to the present invention;
FIG. 4 is a graph of experimental data tests of Cameraman, Airplane with a pixel size of 256 × 256 and Lena and Baboon with a pixel size of 512 × 512 according to the non-local mean blind image denoising method of the present invention;
FIG. 5a is an original undistorted image of Cameraman and FIG. 5b is a noisy image of Cameraman; FIG. 5c is a denoising map of the Cameraman's original method; FIG. 5d is a denoising map of Cameraman for the non-local mean blind image denoising method of the present invention.
FIG. 6a is an original undistorted image of Lena; FIG. 6b is a noise image of Lena; FIG. 6c is a de-noising graph of the original Lena method; FIG. 6d is a denoised image of Lena of the non-local mean blind image denoising method of the present invention.
FIG. 7a is a noise image of experimental data test pattern Building; FIG. 7b is a denoising map of Building of the non-local mean blind image denoising method of the present invention;
FIG. 8a is a noise image of experimental data test chart David _ Hilbert; FIG. 8b is a denoise graph of David _ Hilbert's method of the present invention.
Detailed Description
For the purpose of facilitating understanding of the present invention, the present invention will be described more fully and in detail below with reference to the accompanying drawings and examples, but it will be understood by those skilled in the art that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of the present invention.
In the description of the present invention, a "module" or "processor" may include hardware, software, or a combination of both. A module may comprise hardware circuitry, various suitable sensors, communication ports, memory, may comprise software components such as program code, or may be a combination of software and hardware. The processor may be a central processing unit, microprocessor, image processor, digital signal processor, or any other suitable processor. The processor has data and/or signal processing functionality. The processor may be implemented in software, hardware, or a combination thereof. Non-transitory computer readable storage media include any suitable medium that can store program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random-access memory, and the like. The term "a and/or B" denotes all possible combinations of a and B, such as a alone, B alone or a and B. The term "at least one A or B" or "at least one of A and B" means similar to "A and/or B" and may include only A, only B, or both A and B. The singular forms "a", "an" and "the" may include the plural forms as well.
In the process of collecting, coding, transmitting and decoding digital images, the digital images are more or less interfered by different noises, most of the actual noises can be approximate to white Gaussian additive noises, and the subjective visual quality of the images is influenced to a great extent. Noise reduction processing of noisy images is often required to provide clear, accurate, high quality images prior to manipulation of the images. In the prior art, a Non-local Means (NLM) image denoising algorithm is used as a classical algorithm in the image denoising field, and the purpose of denoising is achieved by measuring the similarity degree between an image neighborhood block with a pixel point to be processed as a center and other image neighborhood blocks in a search region by using the redundancy of image content information and the self-similarity of image structure information and performing weighted averaging on the pixel points with similar neighborhood structures. The non-local mean algorithm well maintains the detail information of the original undistorted image while removing noise, but the non-local mean algorithm still has some defects in practical application: the conventional non-local mean algorithm usually needs to manually preset a corresponding noise level (namely, a gaussian noise level) before denoising a noise image, but in an actual application scene, the noise level of the noise image cannot be known in advance, so that a method for performing noise estimation on an image with unknown noise level is needed. Meanwhile, in the process of measuring the similarity of the image neighborhood blocks, the non-local mean algorithm needs to search in the whole noise image, so that the time complexity is high, and the non-local mean algorithm is difficult to apply to an actual application scene, so that a method for improving the algorithm execution efficiency needs to be researched.
The following are definitions and explanations of some terms involved in the present invention:
blind image denoising: the method is characterized in that the noise of the noise image is directly removed without acquiring the Gaussian noise level of the noise image in advance.
Non-local Means (Non-local Means, NLM): is a novel denoising technology; the algorithm makes full use of redundant information in the image, and can furthest maintain the detail characteristics of the image while denoising; the basic idea is as follows: the estimated value of the current pixel point is obtained by weighted average of pixel values in the whole image which have similar neighborhood structures with the current pixel point.
Additive noise: a type of noise superimposed on a signal, and noise is always present regardless of the presence of the signal, and is therefore generally referred to as additive noise or additive interference.
White noise: the power spectral density of noise is constant at all frequencies, and such noise is referred to as white noise; such noise is said to be white gaussian if the probability distribution of white noise values obeys gaussian distribution.
White gaussian additive noise: white gaussian noise is said to be white gaussian noise because it is additive, follows a gaussian distribution, and is white noise.
Gaussian noise level of noise image: i.e. the standard deviation of the gaussian distribution function of the noise in the noisy image.
The following describes an implementation of the present invention with reference to a main flowchart of an embodiment of a non-local mean blind image denoising method shown in fig. 1.
Step S110, acquiring the Gaussian noise level of the noise image to be processed according to the pixel mean value of the noise image to be processed, and determining corresponding filtering parameters according to the Gaussian noise level;
in one embodiment, the noise image to be processed is divided into a plurality of noise image sub-blocks with the size of the set window in a set window traversal mode; calculating the pixel mean value of each noise image subblock and calculating a covariance matrix to obtain the characteristic value of the covariance matrix of the image subblock with the set window size; sorting the eigenvalues from big to small and taking the first r eigenvalues to solve the mean value tau of the eigenvalues of the covariance matrix; and respectively judging whether the variable tau obtained by each solving is the median of the first r characteristic values, and estimating the Gaussian noise level of the noise image so as to set a filtering parameter of a non-local mean algorithm.
Wherein, the value interval of the pixel point coordinate of the noise image is I ═ 1,2,3, …, m]×[1,2,3,…,n]M, n respectively represent the height and width of the noise image to be processed, the unit is pixel, and m, n are positive integers; the model of the noise image is Y-X + U, wherein Y is the noise image, X is the original undistorted image, and U is Gaussian additive white noise with the obedient mean value of 0 and the standard deviation of sigma; the setting window is of a fixed size of dxd; the method comprises the steps of taking the upper left corner of the noise image as a starting point, taking the lower right corner of the noise image as an end point, traversing line by line in an overlapping mode by using a fixed window with the size of d x d, dividing the noise image to be processed with the size of m x n into s sub-blocks, and dividing the image sub-blocks ytConverting into one-dimensional column vector of dxd to form image subblock set
Figure BDA0002806393390000151
Where t denotes the number of the image sub-block, and s ═ m-d +1) × (n-d + 1).
Calculating the mean value mu of the pixel value of the corresponding position of each noise image sub-block according to the following pixel mean value formula:
Figure BDA0002806393390000152
wherein y ist(i) Expressing the pixel value of the image subblock t at the pixel point i, wherein mu expresses the pixel mean value of the corresponding position of each image subblock; calculating the covariance matrix sigma of each of the noise image sub-blocks from the mean μ of the pixel values of the noise image sub-block by the following covariance matrix formula:
Figure BDA0002806393390000153
wherein T represents a transposed symbol; according to the covariance matrix, calculating the eigenvalue of the covariance matrix of the image subblock with the size of the set window dxd, namely performing eigenvalue decomposition on the covariance matrix of the image subblock with the size of dxd to obtain:
Figure BDA0002806393390000154
wherein R ═ A, W]A represents subspace of dimension l (l < r), r is d × d, W represents matrix of (r-l) × r, and λθThe eigenvalues of the covariance matrix sigma are represented, which can be further simplified to obtain:
Figure BDA0002806393390000155
thus, the eigenvalue λ of the covariance matrix is solvedθ(1 is not less than theta and not more than r) and is sorted from large to small, namely: lambda [ alpha ]1≥λ2≥λ3≥…≥λrWherein λ isrRepresenting the r-th characteristic value extracted, and judging whether the tau obtained by each solution is the first r characteristic values
Figure BDA0002806393390000156
Is equal, and if so, estimating the Gaussian noise level of the noise image
Figure BDA0002806393390000157
Setting the filter parameters of the non-local mean algorithm as
Figure BDA0002806393390000158
Where a is a constant and a ranges between 1 and 1.5.
For example, the input is a noise image, and the output is an estimated value of the gaussian noise level of the noise image. Input noise image
Figure BDA0002806393390000161
Firstly, a noise image is divided into 4 image sub-blocks by traversing line by using a fixed window of 3 multiplied by 3 from the upper left corner, and the sizes of the image sub-blocks are drawn into a one-dimensional column vector of 3 multiplied by 3, which is y respectively1,y2,y3,y4Wherein, in the step (A),
y1=[1 1 1 2 2 2 3 3 3]T,y2=[2 2 2 3 3 3 4 4 4]T
y3=[1 1 1 2 2 2 3 3 3]T,y4=[2 2 2 3 3 3 4 4 4]T
secondly, calculating the pixel mean value μ of the corresponding positions of the 4 image sub-blocks:
μ=[1.5 1.5 1.5 2.5 2.5 2.5 3.5 3.5 3.5]T
according to
Figure BDA0002806393390000162
Calculating a covariance matrix sigma;
Figure BDA0002806393390000163
then, the eigenvalue lambda of the covariance matrix sigma is solved by using eigenvalue decomposition of the matrixθ(1 is more than or equal to theta and less than or equal to 4) and is sorted from large to small by lambda1=2.25,λ2=λ3=…=λ9=0。
Finally, traversing and solving the mean value tau of the characteristic value of the covariance matrix through an index sequence number k:
Figure BDA0002806393390000164
the position equal to the median of the covariance matrix eigenvalue is obtained, thereby obtaining the estimated value of the Gaussian noise level of the noise image
Figure BDA0002806393390000165
Figure BDA0002806393390000166
Wherein, the value of r is dxd, k is index number, and tau is the mean value of the characteristic value of the covariance matrix.
Step S120, denoising each pixel point to be processed in the noise image based on the filtering parameters;
in one embodiment, the search window is a preset search window with a fixed pixel size; presetting a neighborhood block with a fixed pixel size; the size of the neighborhood block is smaller than the size of the search window. For example, an image neighborhood block of 7 × 7 pixels in size and a search window of 23 × 23 pixels in size are set. The image neighborhood block refers to an image block with a radius q and a to-be-processed pixel point in the noise image as a center, and the search window of the image refers to an image block with a radius b and a to-be-processed pixel point in the noise image as a center, and specifically, as shown in fig. 2, in general, the radius of the image neighborhood block should be smaller than the radius of the search window.
In one embodiment, the square sum of the gaussian weighted euclidean distances between the neighborhood blocks taking each pixel point to be processed and the neighborhood pixel point as the center is calculated, the square sum of the gaussian weighted euclidean distances is converted into convolution calculation of a gaussian kernel function and the euclidean distances, and fast fourier transform is used for optimization; and finally, calculating the similarity degree of the neighborhood block taking each pixel point to be processed and the neighborhood pixel point as the center according to the optimized square sum of the Gaussian weighted Euclidean distance and the filtering parameter. The non-local mean algorithm utilizes redundancy of image content information and self-similarity of image structure information, measures the similarity degree of an image neighborhood block taking a pixel point to be processed as a center and other image neighborhood blocks in a search window, and performs weighted average on the pixel points with similar neighborhood structures to achieve the purpose of denoising, and can be specifically shown in fig. 2.
Specifically, each pixel point of the noise image may be understood as a pixel point to be processed. In order to measure the similarity coefficient between the pixel point to be processed and the neighborhood pixel point in the search window, firstly, the image neighborhood block Y taking the pixel point i as the center is calculatediAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares of the gaussian weighted euclidean distances of (a) is shown as follows:
Figure BDA0002806393390000171
wherein, P { (P) { (P)1,p2)||p1|≤q,|p2Q ≦ q } represents the coordinate range of the image neighborhood block with radius size q, p ═ p (p)1,p2) Representing offset coordinates, p, in image neighborhood blocks1,p2Respectively corresponding to x and Y coordinates in the Gaussian kernel function, q represents the radius of the image neighborhood block, and Yi,YjRespectively representing an image neighborhood block taking i as a center and an image neighborhood block taking j as a center, Y (i), Y (j) respectively representing pixel values corresponding to the ith pixel point and the jth pixel point of the noise image, Y (i-p), Y (j-p) respectively representing pixel values corresponding to the (i-p) th pixel point and the (j-p) th pixel point of the noise image, and Gα(p) is a gaussian kernel with standard deviation α:
Figure BDA0002806393390000172
where α represents the standard deviation of the gaussian kernel function.
Further, since the conventional non-local mean algorithm searches for similar pixel points in the whole noise image, the algorithm has too high computational complexity. Therefore, in order to improve the execution speed of the non-local mean algorithm, the method optimizes the convolution calculation of the Gaussian kernel function and the Euclidean distance by using the fast Fourier transform, and further accelerates the calculation of the distance between adjacent blocks of the algorithm.
Specifically, the image neighborhood block Y centered on the pixel point i may be setiAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares d (i, j) of the gaussian weighted euclidean distances of (i, j), i.e.:
Figure BDA0002806393390000181
and (3) converting the data into convolution calculation of a Gaussian kernel function and a Euclidean distance, wherein the formula is as follows:
Figure BDA0002806393390000182
wherein the content of the first and second substances,
Figure BDA0002806393390000183
denotes a convolution calculation, Δ (i) ═ Y (i-p) -Y (j-p)2. At the same time, the user can select the desired position,
Figure BDA0002806393390000184
the convolution calculation of (a) can be implemented by using a fourier transform and an inverse fourier transform, as shown in the following formula:
Figure BDA0002806393390000185
wherein F (-) is a Fourier transform, F-1(. cndot.) is an inverse fourier transform. It is noted that F (G)α(p)) may be calculated off-line. Meanwhile, F (G)α(p)) represents a pair Gα(p) Fourier transform, and F (Δ (i)) denotes Fourier transform of Δ (i).
According to image neighborhood block YiAnd image neighborhood block YjAnd calculating a similarity weight w for measuring a similar neighborhood block with the pixel point i to be processed and the neighborhood pixel point j as the center, wherein the square sum d (i, j) of the Gaussian weighted Euclidean distance and the filtering parameter h are used for calculating and measuring the similarity weight w of the similar neighborhood block with the pixel point i to be processed and the neighborhood pixel point j as the centeri,jI.e. as shown in the following formula:
Figure BDA0002806393390000186
wherein the content of the first and second substances,
Figure BDA0002806393390000187
a is a constant, a ranges between 1 and 1.5,
Figure BDA0002806393390000188
for the estimated Gaussian noise level, d (i, j) is the image neighborhood block YiAnd image neighborhood block YjIs the sum of squares of the gaussian weighted euclidean distances, wi,jThe method is a weight function for measuring the similarity between a neighborhood block taking a pixel point to be processed as a center and the neighborhood block in a search window.
Step S130, calculating the pixel values of all pixel points in the noise image after denoising;
in one embodiment, the pixel values of all points in the denoised image are calculated
Figure BDA0002806393390000191
Fig. 2 shows a flow chart for calculating a denoised pixel value, wherein the left graph in fig. 2 represents a noise image to be processed, and the right graph represents a pixel value denoised by the method of the present invention. For any pixel point i ═ i1,i2) Carrying out weighted average on the pixel values of all the pixel points in the search window so as to obtain the pixel value of the denoised image at the pixel point i
Figure BDA0002806393390000192
Namely:
Figure BDA0002806393390000193
where h is the filter parameter, wi,jIs a weight function for measuring the similarity between the neighborhood block centered on the pixel point to be processed and the neighborhood block in the search window, SiRepresenting a search window centred on I or the entire image I, Y (j) being a pixel point (j)1,j2)∈Si,j1≤m,j2A value of n, m, n respectively representing the height and width (unit: pixel) of the noise image to be processed, WiIs a function of the normalized coefficient of the,
Figure BDA0002806393390000194
for example, the input is a noise image, and the output is a denoised image.
Assuming an input noisy image
Figure BDA0002806393390000195
Selecting a pixel point i to be processed as an example (2,2), selecting a neighborhood block with the radius of 1 and the image block with the radius of 2 and the center of (2,2) as a search window, wherein the pixel point i is as an example (2,2), and selecting the neighborhood block with the radius of 1 and the image block with the radius of 2 and the center of (2,2) as a search window. Wherein, the 4 neighborhood blocks are respectively
Figure BDA0002806393390000196
Gaussian kernel function
Figure BDA0002806393390000197
The pixel points of the neighborhood blocks in the 3 search windows are respectively
Figure BDA0002806393390000198
Wherein the content of the first and second substances,
Figure BDA00028063933900001913
the lower right-hand corner of 1 represents the abscissa, the upper right-hand corner of 1 represents the first neighborhood block,
Figure BDA0002806393390000199
2 in the lower right corner of (1) represents the ordinate, and 1 in the upper right corner represents the first neighborhood block;
Figure BDA00028063933900001910
representing a pixel (j) in the first neighborhood block1,j2) Is 3, and so on.
First, Y is calculatediAnd
Figure BDA00028063933900001911
and
Figure BDA00028063933900001912
and optimizing the calculation of the gaussian weighted euclidean distance using fast fourier transform to obtain:
Figure BDA0002806393390000201
then, Y is calculatediAnd
Figure BDA0002806393390000202
and
Figure BDA0002806393390000203
the similarity weight coefficients are respectively:
Figure BDA0002806393390000204
Figure BDA0002806393390000205
Figure BDA0002806393390000206
and step S140, reconstructing the noise image according to the pixel values of all the pixel points after denoising.
In one embodiment, the method comprises the step of denoising pixel values according to each pixel point of an image to be processed
Figure BDA0002806393390000207
And outputting the denoised reconstructed image.
The pixel value of the ith pixel point after being denoised is
Figure BDA0002806393390000208
Figure BDA0002806393390000209
And finally, outputting the image for calculating the pixel values of all the pixel points.
The following describes an implementation of the present invention with reference to fig. 3, which is a block diagram of an embodiment of a non-local mean blind image denoising system according to the present invention. The system at least comprises:
an obtaining module 310, configured to obtain a gaussian noise level of a noise image to be processed according to a pixel mean of the noise image to be processed, and determine a corresponding filtering parameter according to the gaussian noise level;
in one embodiment, the noise image to be processed is divided into a plurality of noise image sub-blocks with the size of the set window in a set window traversal mode; calculating the pixel mean value of each noise image subblock and calculating a covariance matrix to obtain the characteristic value of the covariance matrix of the image subblock with the set window size; sorting the eigenvalues from big to small and taking the first r eigenvalues to solve the mean value tau of the eigenvalues of the covariance matrix; and respectively judging whether the variable tau obtained by each solving is the median of the first r characteristic values, and estimating the Gaussian noise level of the noise image so as to set a filtering parameter of a non-local mean algorithm.
Wherein, the value interval of the pixel point coordinate of the noise image is I ═ 1,2,3, …, m]×[1,2,3,…,n]M, n respectively represent the height and width of the noise image to be processed, the unit is pixel, and m, n are positive integers; the model of the noise image is Y-X + U, wherein Y is the noise image, X is the original undistorted image, and U is Gaussian additive white noise with the obedient mean value of 0 and the standard deviation of sigma; the setting window is of a fixed size of dxd; the method comprises the steps of taking the upper left corner of the noise image as a starting point, taking the lower right corner of the noise image as an end point, traversing line by line in an overlapping mode by using a fixed window with the size of d x d, dividing the noise image to be processed with the size of m x n into s sub-blocks, and dividing the image sub-blocks ytConverting into one-dimensional column vector of dxd to form image subblock set
Figure BDA0002806393390000211
Where t denotes the number of the image sub-block, and s ═ m-d +1) × (n-d + 1).
Calculating the mean value mu of the pixel value of the corresponding position of each noise image sub-block according to the following pixel mean value formula:
Figure BDA0002806393390000212
wherein y ist(i) Expressing the pixel value of the image subblock t at the pixel point i, wherein mu expresses the pixel mean value of the corresponding position of each image subblock; passing the following covariance matrix according to the mean μ of the pixel values of the noisy image sub-blocksCalculating the covariance matrix sigma of each noise image sub-block by the formula:
Figure BDA0002806393390000213
wherein T represents a transposed symbol; according to the covariance matrix, calculating the eigenvalue of the covariance matrix of the image subblock with the size of the set window dxd, namely performing eigenvalue decomposition on the covariance matrix of the image subblock with the size of dxd to obtain:
Figure BDA0002806393390000214
wherein R ═ A, W]A represents subspace of dimension l (l < r), r is d × d, W represents matrix of (r-l) × r, and λθThe eigenvalues of the covariance matrix sigma are represented, which can be further simplified to obtain:
Figure BDA0002806393390000221
thus, the eigenvalue λ of the covariance matrix is solvedθ(1 is not less than theta and not more than r) and is sorted from large to small, namely: lambda [ alpha ]1≥λ2≥λ3≥…≥λrWherein λ isrRepresenting the r-th characteristic value extracted, and judging whether the tau obtained by each solution is the first r characteristic values
Figure BDA0002806393390000222
Is equal, and if so, estimating the Gaussian noise level of the noise image
Figure BDA0002806393390000223
Setting the filter parameters of the non-local mean algorithm as
Figure BDA0002806393390000224
Where a is a constant and a ranges between 1 and 1.5. .
For example, the input is a noise image, and the output is a Gaussian noise level of the noise imageAn estimate of (d). Input noise image
Figure BDA0002806393390000225
Firstly, a noise image is divided into 4 image sub-blocks by traversing line by using a fixed window of 3 multiplied by 3 from the upper left corner, and the sizes of the image sub-blocks are drawn into a one-dimensional column vector of 3 multiplied by 3, which is y respectively1,y2,y3,y4Wherein, in the step (A),
y1=[1 1 1 2 2 2 3 3 3]T,y2=[2 2 2 3 3 3 4 4 4]T
y3=[1 1 1 2 2 2 3 3 3]T,y4=[2 2 2 3 3 3 4 4 4]T
secondly, calculating the pixel mean value μ of the corresponding positions of the 4 image sub-blocks:
μ=[1.5 1.5 1.5 2.5 2.5 2.5 3.5 3.5 3.5]T
according to
Figure BDA0002806393390000226
Calculating a covariance matrix sigma;
Figure BDA0002806393390000231
then, the eigenvalue lambda of the covariance matrix sigma is solved by using eigenvalue decomposition of the matrixθ(1 is more than or equal to theta and less than or equal to 4) and is sorted from large to small by lambda1=2.25,λ2=λ3=…=λ9=0。
Finally, traversing and solving the mean value tau of the characteristic value of the covariance matrix through an index sequence number k:
Figure BDA0002806393390000232
the position equal to the median of the covariance matrix eigenvalue is obtained, thereby obtaining the estimated value of the Gaussian noise level of the noise image
Figure BDA0002806393390000234
Figure BDA0002806393390000233
Wherein, the value of r is dxd, k is index number, and tau is the mean value of the characteristic value of the covariance matrix.
A denoising module 320 for denoising each pixel point to be processed in the noise image based on the filtering parameter;
in one embodiment, the search window is a preset search window with a fixed pixel size; presetting a neighborhood block with a fixed pixel size; the size of the neighborhood block is smaller than the size of the search window. For example, an image neighborhood block of 7 × 7 pixels in size and a search window of 23 × 23 pixels in size are set. The image neighborhood block refers to an image block with a radius q and a to-be-processed pixel point in the noise image as a center, and the search window of the image refers to an image block with a radius b and a to-be-processed pixel point in the noise image as a center, and specifically, as shown in fig. 2, in general, the radius of the image neighborhood block should be smaller than the radius of the search window.
In one embodiment, the square sum of the gaussian weighted euclidean distances between the neighborhood blocks taking each pixel point to be processed and the neighborhood pixel point as the center is calculated, the square sum of the gaussian weighted euclidean distances is converted into convolution calculation of a gaussian kernel function and the euclidean distances, and fast fourier transform is used for optimization; and finally, calculating the similarity degree of the neighborhood block taking each pixel point to be processed and the neighborhood pixel point as the center according to the optimized square sum of the Gaussian weighted Euclidean distance and the filtering parameter. The non-local mean algorithm utilizes redundancy of image content information and self-similarity of image structure information, measures the similarity degree of an image neighborhood block taking a pixel point to be processed as a center and other image neighborhood blocks in a search window, and performs weighted average on the pixel points with similar neighborhood structures to achieve the purpose of denoising, and can be specifically shown in fig. 2.
Specifically, each pixel point of the noise image may be understood as a pixel point to be processed. In order to measure the similarity coefficient between the pixel point to be processed and the neighborhood pixel point in the search window, firstly, the pixel point i is calculated asCentral image neighborhood block YiAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares of the gaussian weighted euclidean distances of (a) is shown as follows:
Figure BDA0002806393390000241
wherein, P { (P) { (P)1,p2)||p1|≤q,|p2Q ≦ q } represents the coordinate range of the image neighborhood block with radius size q, p ═ p (p)1,p2) Representing offset coordinates, p, in image neighborhood blocks1,p2Respectively corresponding to x and Y coordinates in the Gaussian kernel function, q represents the radius of the image neighborhood block, and Yi,YjRespectively representing an image neighborhood block taking i as a center and an image neighborhood block taking j as a center, Y (i), Y (j) respectively representing pixel values corresponding to the ith pixel point and the jth pixel point of the noise image, Y (i-p), Y (j-p) respectively representing pixel values corresponding to the (i-p) th pixel point and the (j-p) th pixel point of the noise image, and Gα(p) is a gaussian kernel with standard deviation α:
Figure BDA0002806393390000242
where α represents the standard deviation of the gaussian kernel function.
Further, since the conventional non-local mean algorithm searches for similar pixel points in the whole noise image, the algorithm has too high computational complexity. Therefore, in order to improve the execution speed of the non-local mean algorithm, the method optimizes the convolution calculation of the Gaussian kernel function and the Euclidean distance by using the fast Fourier transform, and further accelerates the calculation of the distance between adjacent blocks of the algorithm.
Specifically, the image neighborhood block Y centered on the pixel point i may be setiAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares d (i, j) of the gaussian weighted euclidean distances of (i, j), i.e.:
Figure BDA0002806393390000243
and (3) converting the data into convolution calculation of a Gaussian kernel function and a Euclidean distance, wherein the formula is as follows:
Figure BDA0002806393390000244
wherein the content of the first and second substances,
Figure BDA0002806393390000245
denotes a convolution calculation, Δ (i) ═ Y (i-p) -Y (j-p)2. At the same time, the user can select the desired position,
Figure BDA0002806393390000251
the convolution calculation of (a) can be implemented by using a fourier transform and an inverse fourier transform, as shown in the following formula:
Figure BDA0002806393390000252
wherein F (-) is a Fourier transform, F-1(. cndot.) is an inverse fourier transform. It is noted that F (G)α(p)) may be calculated off-line. Meanwhile, F (G)α(p)) represents a pair Gα(p) Fourier transform, and F (Δ (i)) denotes Fourier transform of Δ (i).
According to image neighborhood block YiAnd image neighborhood block YjAnd calculating a similarity weight w for measuring a similar neighborhood block with the pixel point i to be processed and the neighborhood pixel point j as the center, wherein the square sum d (i, j) of the Gaussian weighted Euclidean distance and the filtering parameter h are used for calculating and measuring the similarity weight w of the similar neighborhood block with the pixel point i to be processed and the neighborhood pixel point j as the centeri,jI.e. as shown in the following formula:
Figure BDA0002806393390000253
wherein the content of the first and second substances,
Figure BDA0002806393390000254
a is a constant and a rangesBetween 1 and 1.5 of the total weight of the composition,
Figure BDA0002806393390000255
for the estimated Gaussian noise level, d (i, j) is the image neighborhood block YiAnd image neighborhood block YjIs the sum of squares of the gaussian weighted euclidean distances, wi,jThe method is a weight function for measuring the similarity between a neighborhood block taking a pixel point to be processed as a center and the neighborhood block in a search window.
A calculating module 330, configured to calculate denoised pixel values of all pixel points in the noise image;
in one embodiment, the pixel values of all points in the denoised image are calculated
Figure BDA0002806393390000256
Fig. 2 shows a flow chart for calculating a denoised pixel value, wherein the left graph in fig. 2 represents a noise image to be processed, and the right graph represents a pixel value denoised by the method of the present invention. For any pixel point i ═ i1,i2) Carrying out weighted average on the pixel values of all the pixel points in the search window so as to obtain the pixel value of the denoised image at the pixel point i
Figure BDA0002806393390000257
Namely:
Figure BDA0002806393390000258
where h is the filter parameter, wi,jIs a weight function for measuring the similarity between the neighborhood block centered on the pixel point to be processed and the neighborhood block in the search window, SiRepresenting a search window centred on I or the entire image I, Y (j) being a pixel point (j)1,j2)∈Si,j1≤m,j2A value of n, m, n respectively representing the height and width (unit: pixel) of the noise image to be processed, WiIs a function of the normalized coefficient of the,
Figure BDA0002806393390000259
for example, the input is a noise image, and the output is a denoised image.
Assuming an input noisy image
Figure BDA0002806393390000261
Selecting a pixel point i to be processed as an example (2,2), and selecting a neighborhood block with the radius size of 1 and the image block with the radius size of 2 and the pixel point i as the center (22) as a search window. Wherein, the 4 neighborhood blocks are respectively
Figure BDA0002806393390000262
Gaussian kernel function
Figure BDA0002806393390000263
The pixel points of the neighborhood blocks in the 3 search windows are respectively
Figure BDA0002806393390000264
Wherein the content of the first and second substances,
Figure BDA0002806393390000265
the lower right-hand corner of 1 represents the abscissa, the upper right-hand corner of 1 represents the first neighborhood block,
Figure BDA0002806393390000266
2 in the lower right corner of (1) represents the ordinate, and 1 in the upper right corner represents the first neighborhood block;
Figure BDA0002806393390000267
representing a pixel (j) in the first neighborhood block1,j2) Is 3, and so on.
First, Y is calculatediAnd
Figure BDA0002806393390000268
and
Figure BDA0002806393390000269
and optimizing the gaussian weighted euclidean distance using fast fourier transformThereby obtaining:
Figure BDA00028063933900002610
then, Y is calculatediAnd
Figure BDA00028063933900002611
and
Figure BDA00028063933900002612
the similarity weight coefficients are respectively:
Figure BDA00028063933900002613
Figure BDA00028063933900002614
Figure BDA00028063933900002615
a reconstructing module 340, configured to reconstruct the noise image according to the denoised pixel values of all the pixel points.
In one embodiment, the method comprises the step of denoising pixel values according to each pixel point of an image to be processed
Figure BDA00028063933900002616
And outputting the denoised reconstructed image.
The pixel value of the ith pixel point after being denoised is
Figure BDA00028063933900002617
Figure BDA0002806393390000271
And finally, outputting the image for calculating the pixel values of all the pixel points.
Further, in one embodiment of a computer-readable storage medium of the present invention, includes: the storage medium stores a plurality of program codes adapted to be loaded and executed by a processor to perform the aforementioned non-local mean blind image denoising method.
Further, in an embodiment of a processing apparatus of the present invention, the processing apparatus comprises a processor and a memory, the memory being adapted to store a plurality of program codes, the program codes being adapted to be loaded and executed by the processor to perform the aforementioned non-local mean blind image denoising method.
An example of an experimental application scenario of the technical solution of the present invention is described below to further illustrate the implementation of the present invention:
(1) configuration of the experimental operating environment: inter (R) core (TM) i7-6700CPU and 8GB RAM notebook computer, the programming software used Matlab R2015 b.
(2) Evaluation indexes of the experiment: the denoising result is evaluated by adopting a peak Signal to Noise ratio (PSNR) (Peak Signal to Noise radio) of a subjective visual effect and an objective evaluation index, wherein the PSNR is specifically defined as follows:
Figure BDA0002806393390000272
wherein the content of the first and second substances,
Figure BDA0002806393390000273
m, n represent positive integers, respectively representing the height and width (unit: pixel) of the noise image to be processed,
Figure BDA0002806393390000274
representing the pixel value of the denoised image at pixel point i, and x (i) representing the pixel value of the original undistorted image at pixel i. In a general sense, the larger the PSNR value is, the better the image denoising effect is;
(3) experimental data set: four classical gray-scale images (as shown in fig. 4) were taken, namely Cameraman, airplan, with a pixel size of 256 × 256, Lena and babon, with a pixel size of 512 × 512, and two true noise images (unknown gaussian noise levels), namely Building and David _ Hilbert images.
(4) Comparative mode of experiment: considering that different denoising results can be caused by different parameter settings, in order to keep the experimental result objective as much as possible, the same setting is performed on the size of the algorithm neighborhood block, the size of the search window and the filtering parameters. Taking the original method, i.e., the non-local mean algorithm, as an example, the size of the neighborhood block is 7 × 7 (unit: pixel), and the size of the search window is 23 × 23 (unit: pixel). Because the denoising effect of the original method NLM is superior to that of most algorithms, the non-local mean blind image denoising method provided by the invention is utilized to be compared with the original method NLM.
TABLE 1 comparison of the inventive method with the original method
Figure BDA0002806393390000281
TABLE 2 De-noising time (seconds) of 256X 256 gray noise images for the original method and the method of the present invention
Figure BDA0002806393390000282
Figure BDA0002806393390000291
TABLE 3 De-noising time (seconds) of the original method and the method of the present invention in the size of 512 x 512 gray noise image
Figure BDA0002806393390000292
(5) The experimental results are as follows: from the perspective of the algorithm denoising effect, in the aspect of objective evaluation indexes, as shown in table 1, the method can more accurately estimate the Gaussian noise level for the noise images with real Gaussian noise levels of 10, 15, 20, 25 and 50 respectively, and the PSNR of the denoising result is larger than that of the original method; in terms of subjective visual effect, such as fig. 5 a-5 d and fig. 6 a-6 d, compared with the original method, the method of the present invention not only improves the subjective visual quality of the image, but also well retains the texture and detail information of the image. Further, the method of the present invention can also perform denoising on a true noise image with unknown noise level, as shown in fig. 7a and 7b, and fig. 8a and 8b, so that the adaptive capability of the algorithm for images with different noise levels is improved to a certain extent. From the perspective of the algorithm denoising speed, as shown in tables 2 and 3, the method greatly improves the execution efficiency of the non-local mean algorithm, so that the method can be better applied to practical application scenes.
It will be understood by those skilled in the art that all or part of the flow of the method according to the above-described embodiment may be implemented by a computer program, which may be stored in a computer-readable storage medium and used to implement the steps of the above-described embodiments of the method when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying said computer program code, media, usb disk, removable hard disk, magnetic diskette, optical disk, computer memory, read-only memory, random access memory, electrical carrier wave signals, telecommunication signals, software distribution media, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Further, it should be understood that, since the modules are only configured to illustrate the functional units of the system of the present invention, the corresponding physical devices of the modules may be the processor itself, or a part of software, a part of hardware, or a part of a combination of software and hardware in the processor. Thus, the number of individual modules in the figures is merely illustrative.
Those skilled in the art will appreciate that the various modules in the system may be adaptively split or combined. Such splitting or combining of specific modules does not cause the technical solutions to deviate from the principle of the present invention, and therefore, the technical solutions after splitting or combining will fall within the protection scope of the present invention.
So far, the technical solution of the present invention has been described with reference to one embodiment shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (18)

1. A non-local mean blind image denoising method is characterized by comprising the following steps:
acquiring the Gaussian noise level of the noise image to be processed according to the pixel mean value of the noise image to be processed, and determining corresponding filtering parameters according to the Gaussian noise level;
denoising each pixel point to be processed in the noise image based on the filtering parameter;
calculating the pixel values of all pixel points in the noise image after denoising;
and reconstructing the noise image according to the pixel values of all the pixel points after denoising.
2. The method according to claim 1, wherein the step of obtaining a gaussian noise level of the noise image to be processed according to a pixel mean value of the noise image to be processed, and determining corresponding filtering parameters according to the gaussian noise level specifically comprises:
dividing the noise image into a plurality of noise image sub-blocks;
calculating the pixel mean value of the corresponding position of each noise image sub-block;
calculating a covariance matrix for each of the noise image sub-blocks based on the pixel mean;
calculating the eigenvalue of the covariance matrix of each noise image subblock, and sorting the eigenvalues from large to small to extract the first r eigenvalues;
solving the mean value tau of all covariance matrix eigenvalues;
and determining the Gaussian noise level of the noise image according to the mean value tau of all the covariance matrix eigenvalues.
3. The method of claim 2,
the value interval of the pixel point coordinates of the noise image is [1,2,3, …, m ] × [1,2,3, …, n ], m and n respectively represent the height and width of the noise image, the unit is a pixel, and m and n are positive integers;
the setting window is a fixed window with fixed size of dxd;
dividing the noise image into a plurality of noise image sub-blocks, specifically comprising:
dividing the noise image into s noise image sub-blocks y by using the fixed window to perform overlapping line-by-line traversal by taking the upper left corner of the noise image as a starting point and the lower right corner of the noise image as an end pointtAnd sub-blocks y of these noisy imagestConverting into a one-dimensional column vector of d x d to form a set of noise image subblocks
Figure FDA0002806393380000021
Where t denotes the number of the image sub-block, and s ═ m-d +1) × (n-d + 1).
4. The method of claim 3,
calculating the pixel mean value of the corresponding position of each noise image sub-block specifically comprises:
each is calculated according to the following pixel mean formulaThe mean value mu of the pixel values of the corresponding positions of the noise image subblocks:
Figure FDA0002806393380000022
wherein y ist(i) Expressing the pixel value of the image subblock t at the pixel point i, wherein mu expresses the pixel mean value of the corresponding position of each image subblock;
calculating a covariance matrix of each noise image sub-block based on the pixel mean, specifically comprising:
calculating the covariance matrix sigma of each of the noise image sub-blocks from the mean μ of the pixel values of the noise image sub-block by the following covariance matrix formula:
Figure FDA0002806393380000023
wherein, ytExpressing the pixel value of each pixel point in the image sub-block T, wherein T expresses a transposed symbol;
calculating the eigenvalue of the covariance matrix of each noise image subblock, and sorting the eigenvalues from large to small to extract the first r eigenvalues, which specifically comprises the following steps:
according to the covariance matrix sigma, calculating the eigenvalue of the covariance matrix of the noise image subblock, and obtaining:
Figure FDA0002806393380000024
wherein R ═ A, W]A represents subspace of dimension l (l < r), r is d × d, W represents matrix of (r-l) × r, and λθThe eigenvalues of the covariance matrix sigma are represented and simplified to obtain:
Figure FDA0002806393380000031
thus, the eigenvalue λ of the covariance matrix is solvedθ(1 is more than or equal to theta and less than or equal to r) and is sorted from big to small: lambda [ alpha ]1≥λ2≥λ3≥…≥λrWherein λ isrRepresenting the extracted r-th feature value.
5. The method of claim 4,
and traversing and solving the mean value tau of the characteristic value of the covariance matrix through an index sequence number k:
Figure FDA0002806393380000032
judging whether the tau is equal to the first r characteristic values or not
Figure FDA0002806393380000033
Is equal, and if so, estimating the Gaussian noise level of the noise image
Figure FDA0002806393380000034
Setting the filter parameters of the non-local mean algorithm as
Figure FDA0002806393380000035
Where a is a constant.
6. The method of any one of claims 1 to 5, wherein denoising each pixel point to be processed in the noise image based on the filtering parameter comprises:
calculating the square sum of the Gaussian weighted Euclidean distance between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center;
converting the square sum of the Gaussian weighted Euclidean distance into convolution of a Gaussian kernel function and the Euclidean distance, and optimizing by using fast Fourier transform;
and calculating the similarity between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center according to the optimized square sum of the Gaussian weighted Euclidean distance and the filtering parameter so as to denoise the pixel points to be processed.
7. The method of claim 6,
calculating the square sum of the Gaussian weighted Euclidean distance between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center, and specifically comprising the following steps:
calculating an image neighborhood block Y centered on a pixel point i by the following formulaiAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares of the gaussian weighted euclidean distances of:
Figure FDA0002806393380000041
wherein, P { (P) { (P)1,p2)||p1|≤q,|p2Q ≦ q } represents the coordinate range of the image neighborhood block with radius size q, p ═ p (p)1,p2) Representing offset coordinates, p, in image neighborhood blocks1,p2Corresponding respectively to the value of the coordinate in the Gaussian kernel function, Yi,YjRespectively representing an image neighborhood block taking i as a center and an image neighborhood block taking j as a center, Y (i), Y (j) respectively representing pixel values corresponding to the ith pixel point and the jth pixel point of the noise image, Y (i-p), Y (j-p) respectively representing pixel values corresponding to the (i-p) th pixel point and the (j-p) th pixel point of the noise image, and Gα(p) is a gaussian kernel with standard deviation α:
Figure FDA0002806393380000042
wherein α represents a standard deviation of a gaussian kernel function;
converting the square sum of the Gaussian weighted Euclidean distance into convolution of a Gaussian kernel function and the Euclidean distance, and optimizing by using fast Fourier transform, wherein the method specifically comprises the following steps:
image neighborhood block Y with pixel point i as centeriAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares d (i, j) of the gaussian-weighted euclidean distances of (a) is as follows:
Figure FDA0002806393380000043
converting the squared sum d (i, j) of the gaussian weighted euclidean distance into a convolution of a gaussian kernel function and the euclidean distance, as shown in the following formula:
Figure FDA0002806393380000044
wherein the content of the first and second substances,
Figure FDA0002806393380000045
denotes a convolution calculation, Δ (i) ═ Y (i-p) -Y (j-p)2
Will be provided with
Figure FDA0002806393380000046
The convolution of (a) is optimized by using a fourier forward transform and an fourier inverse transform, as shown in the following formula:
Figure FDA0002806393380000047
wherein F (-) is the Fourier transform, F-1(. is the inverse fourier transform;
according to the optimized square sum of the Gaussian weighted Euclidean distances and the filtering parameters, calculating the similarity degree between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center so as to denoise the pixel points to be processed, and the method specifically comprises the following steps:
according to image neighborhood block YiAnd image neighborhood block YjAnd the filter parameter h, and the sum of squares d (i, j) of the gaussian-weighted euclidean distances ofSimilarity weight w of similar neighborhood blocks with principle pixel point i and neighborhood pixel point j as centersi,jAs shown in the following formula:
Figure FDA0002806393380000051
wherein the content of the first and second substances,
Figure FDA0002806393380000052
wherein, a is a constant, and a is a constant,
Figure FDA0002806393380000053
for the estimated Gaussian noise level, d (i, j) is the image neighborhood block YiAnd image neighborhood block YjIs the sum of squares of the gaussian-weighted euclidean distances, wi,jIs a weight function for measuring the similarity of the similar neighborhood blocks with the pixel point i to be processed and the neighborhood pixel point j as the center;
denoising the pixel points to be processed, specifically comprising: according to the obtained weight wi,jAnd calculating the gray value of each pixel point to be processed after the non-local mean filtering by the gray value of each pixel point to be processed so as to finish denoising.
8. The method of claim 1, wherein calculating the denoised pixel values of all pixel points in the noise image comprises:
based on the filtering parameters, carrying out weighted average on pixel values of all pixel points in the noise image after denoising in the search window to obtain the pixel value of the image after denoising at the pixel point i
Figure FDA0002806393380000054
The specific mathematical expression is as follows:
Figure FDA0002806393380000055
wherein, wi,jIs a weight function for measuring the similarity of similar neighborhood blocks centered on the pixel point i to be processed and the neighborhood pixel point j respectively, SiRepresenting a search window or the whole image centred on i, Y (j) being a pixel point (j)1,j2)∈Si,j1≤m,j2Pixel values of n or less, m, n respectively representing the height and width of the noise image to be processed in pixels, WiIs a function of the normalized coefficient of the,
Figure FDA0002806393380000056
h is the filter parameter.
9. A non-local mean blind image denoising system, comprising:
the device comprises an acquisition module, a filtering module and a processing module, wherein the acquisition module is used for acquiring the Gaussian noise level of a noise image to be processed according to the pixel average value of the noise image to be processed and determining corresponding filtering parameters according to the Gaussian noise level;
the denoising module is used for denoising each pixel point to be processed in the noise image based on the filtering parameters;
the calculation module is used for calculating the pixel values of all the pixel points in the noise image after denoising;
and the reconstruction module is used for reconstructing the noise image according to the pixel values of all the pixel points after denoising.
10. The system of claim 9, wherein the operations performed by the acquisition module specifically include:
dividing the noise image into a plurality of noise image sub-blocks;
calculating the pixel mean value of the corresponding position of each noise image sub-block;
calculating a covariance matrix for each of the noise image sub-blocks based on the pixel mean;
calculating the eigenvalue of the covariance matrix of each noise image subblock, and sorting the eigenvalues from large to small to extract the first r eigenvalues;
solving the mean value tau of all covariance matrix eigenvalues;
and determining the Gaussian noise level of the noise image according to the mean value tau of all the covariance matrix eigenvalues.
11. The system of claim 10,
the value interval of the pixel point coordinates of the noise image is [1,2,3, …, m ] × [1,2,3, …, n ], m and n respectively represent the height and width of the noise image, the unit is a pixel, and m and n are positive integers;
the setting window is a fixed window with fixed size of dxd;
dividing the noise image into a plurality of noise image sub-blocks, specifically comprising:
dividing the noise image into s noise image sub-blocks y by using the fixed window to perform overlapping line-by-line traversal by taking the upper left corner of the noise image as a starting point and the lower right corner of the noise image as an end pointtAnd sub-blocks y of these noisy imagestConverting into a one-dimensional column vector of d x d to form a set of noise image subblocks
Figure FDA0002806393380000061
Where t denotes the number of the image sub-block, and s ═ m-d +1) × (n-d + 1).
12. The system of claim 11,
calculating the pixel mean value of the corresponding position of each noise image sub-block specifically comprises:
calculating the mean value mu of the pixel values of the corresponding positions of each noise image sub-block according to the following pixel mean value formula:
Figure FDA0002806393380000071
wherein y ist(i) Expressing the pixel value of the image subblock t at the pixel point i, wherein mu expresses the pixel mean value of the corresponding position of each image subblock;
calculating a covariance matrix of each noise image sub-block based on the pixel mean, specifically comprising:
calculating the covariance matrix sigma of each of the noise image sub-blocks from the mean μ of the pixel values of the noise image sub-block by the following covariance matrix formula:
Figure FDA0002806393380000072
wherein, ytExpressing the pixel value of each pixel point in the image sub-block T, wherein T expresses a transposed symbol;
calculating the eigenvalue of the covariance matrix of each noise image subblock, and sorting the eigenvalues from large to small to extract the first r eigenvalues, which specifically comprises the following steps:
according to the covariance matrix sigma, calculating the eigenvalue of the covariance matrix of the noise image subblock, and obtaining:
Figure FDA0002806393380000073
wherein R ═ A, W]A represents subspace of dimension l (l < r), r is d × d, W represents matrix of (r-l) × r, and λθThe eigenvalues of the covariance matrix sigma are represented and simplified to obtain:
Figure FDA0002806393380000081
thus, the eigenvalue λ of the covariance matrix is solvedθ(1 is more than or equal to theta and less than or equal to r) and is sorted from big to small: lambda [ alpha ]1≥λ2≥λ3≥…≥λrWherein λ isrRepresenting the extracted r-th feature value.
13. The system of claim 12,
and traversing and solving the mean value tau of the characteristic value of the covariance matrix through an index sequence number k:
Figure FDA0002806393380000082
judging whether the tau is equal to the first r characteristic values or not
Figure FDA0002806393380000083
Is equal, and if so, estimating the Gaussian noise level of the noise image
Figure FDA0002806393380000084
Setting the filter parameters of the non-local mean algorithm as
Figure FDA0002806393380000085
Where a is a constant.
14. The system according to any one of claims 9 to 13, wherein the denoising module performs operations comprising:
calculating the square sum of the Gaussian weighted Euclidean distance between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center;
converting the square sum of the Gaussian weighted Euclidean distance into convolution of a Gaussian kernel function and the Euclidean distance, and optimizing by using fast Fourier transform;
and calculating the similarity between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center according to the optimized square sum of the Gaussian weighted Euclidean distance and the filtering parameter so as to denoise the pixel points to be processed.
15. The system of claim 14,
calculating the square sum of the Gaussian weighted Euclidean distance between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center, and specifically comprising the following steps:
by passingCalculating the image neighborhood block Y with the pixel point i as the center by the following formulaiAnd an image neighborhood block Y centered on a pixel point jjThe sum of squares of the gaussian weighted euclidean distances of:
Figure FDA0002806393380000091
wherein, P { (P) { (P)1,p2)||p1|≤q,|p2Q ≦ q } represents the coordinate range of the image neighborhood block with radius size q, p ═ p (p)1,p2) Representing offset coordinates, p, in image neighborhood blocks1,p2Corresponding respectively to the value of the coordinate in the Gaussian kernel function, Yi,YjRespectively representing an image neighborhood block taking i as a center and an image neighborhood block taking j as a center, Y (i), Y (j) respectively representing pixel values corresponding to the ith pixel point and the jth pixel point of the noise image, Y (i-p), Y (j-p) respectively representing pixel values corresponding to the (i-p) th pixel point and the (j-p) th pixel point of the noise image, and Gα(p) is a gaussian kernel with standard deviation α:
Figure FDA0002806393380000092
wherein α represents a standard deviation of a gaussian kernel function;
converting the square sum of the Gaussian weighted Euclidean distance into convolution of a Gaussian kernel function and the Euclidean distance, and optimizing by using fast Fourier transform, wherein the method specifically comprises the following steps:
image neighborhood block Y with pixel point i as centeriAnd the sum of squares d (i, j) of the gaussian weighted euclidean distances of the image neighborhood block Y centered at pixel point j is as follows:
Figure FDA0002806393380000093
converting the squared sum d (i, j) of the gaussian weighted euclidean distance into a convolution of a gaussian kernel function and the euclidean distance, as shown in the following formula:
Figure FDA0002806393380000094
wherein the content of the first and second substances,
Figure FDA0002806393380000095
denotes a convolution calculation, Δ (i) ═ Y (i-p) -Y (j-p)2
Will be provided with
Figure FDA0002806393380000096
The convolution of (a) is optimized by using a fourier forward transform and an fourier inverse transform, as shown in the following formula:
Figure FDA0002806393380000097
wherein F (-) is the Fourier transform, F-1(. is the inverse fourier transform;
according to the optimized square sum of the Gaussian weighted Euclidean distances and the filtering parameters, calculating the similarity degree between the neighborhood block taking each pixel point to be processed as the center and the neighborhood block taking the neighborhood pixel point as the center so as to denoise the pixel points to be processed, and the method specifically comprises the following steps:
according to image neighborhood block YiAnd image neighborhood block YjAnd the filter parameter h, calculating the similarity weight w of the similar neighborhood block taking the pixel point i to be processed and the neighborhood pixel point j as the centeri,jAs shown in the following formula:
Figure FDA0002806393380000101
wherein the content of the first and second substances,
Figure FDA0002806393380000102
wherein, a is a constant, and a is a constant,
Figure FDA0002806393380000103
for the estimated Gaussian noise level, d (i, j) is the image neighborhood block YiAnd image neighborhood block YjIs the sum of squares of the gaussian-weighted euclidean distances, wi,jIs a weight function for measuring the similarity of the similar neighborhood blocks with the pixel point i to be processed and the neighborhood pixel point j as the center;
denoising the pixel points to be processed, specifically comprising: according to the obtained weight wi,jAnd calculating the gray value of each pixel point to be processed after the non-local mean filtering by the gray value of each pixel point to be processed so as to finish denoising.
16. The system of claim 9,
the operation executed by the computing module specifically includes: based on the filtering parameters, carrying out weighted average on pixel values of all pixel points in the noise image after denoising in the search window to obtain the pixel value of the image after denoising at the pixel point i
Figure FDA0002806393380000104
The specific mathematical expression is as follows:
Figure FDA0002806393380000105
wherein, wi,jIs a weight function for measuring the similarity of similar neighborhood blocks centered on the pixel point i to be processed and the neighborhood pixel point j respectively, SiRepresenting a search window or the whole image centred on i, Y (j) being a pixel point (j)1,j2)∈Si,j1≤m,j2Pixel values of n or less, m, n respectively representing the height and width of the noise image to be processed in pixels, WiIs a function of the normalized coefficient of the,
Figure FDA0002806393380000106
h is the filter parameter.
17. A computer-readable storage medium having stored thereon a plurality of program codes adapted to be loaded and executed by a processor to perform the non-local mean blind image denoising method according to any one of claims 1 through 8.
18. A processing apparatus comprising a processor and a memory, the memory device adapted to store a plurality of program codes, wherein the program codes are adapted to be loaded and executed by the processor to perform the non-local mean blind image denoising method of any one of claims 1 through 8.
CN202011371948.XA 2020-11-30 2020-11-30 Non-local mean blind image denoising method, system and device Pending CN112508810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011371948.XA CN112508810A (en) 2020-11-30 2020-11-30 Non-local mean blind image denoising method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011371948.XA CN112508810A (en) 2020-11-30 2020-11-30 Non-local mean blind image denoising method, system and device

Publications (1)

Publication Number Publication Date
CN112508810A true CN112508810A (en) 2021-03-16

Family

ID=74967758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011371948.XA Pending CN112508810A (en) 2020-11-30 2020-11-30 Non-local mean blind image denoising method, system and device

Country Status (1)

Country Link
CN (1) CN112508810A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113222853A (en) * 2021-05-26 2021-08-06 武汉博宇光电系统有限责任公司 Progressive infrared image noise reduction method based on noise estimation
CN113393390A (en) * 2021-06-04 2021-09-14 南京理工大学 Image noise reduction method based on local Gaussian process regression
CN113643198A (en) * 2021-07-22 2021-11-12 海宁奕斯伟集成电路设计有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113657385A (en) * 2021-10-20 2021-11-16 山东摄云信息技术有限公司 Data detection method and device of electronic metering device and electronic equipment
CN113934715A (en) * 2021-09-25 2022-01-14 西北工业大学 Propellant preparation quality data denoising method based on improved non-local mean value
CN116912102A (en) * 2023-05-11 2023-10-20 上海宇勘科技有限公司 Edge-preserving image denoising method and system based on non-local mean value
CN117094909A (en) * 2023-08-31 2023-11-21 青岛天仁微纳科技有限责任公司 Nanometer stamping wafer image acquisition processing method
CN117423113A (en) * 2023-12-18 2024-01-19 青岛华正信息技术股份有限公司 Adaptive denoising method for archive OCR (optical character recognition) image
CN117499558A (en) * 2023-11-02 2024-02-02 北京市燃气集团有限责任公司 Video image optimization processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942788A (en) * 2014-04-11 2014-07-23 中国科学院遥感与数字地球研究所 Hyperspectral remote sensing image characteristic extraction method and device
CN106600567A (en) * 2017-01-03 2017-04-26 长沙全度影像科技有限公司 Adaptive non-local mean denoising method
CN110648290A (en) * 2019-09-06 2020-01-03 西安交通大学 Dual-core non-local mean image denoising method based on SURE parameter optimization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942788A (en) * 2014-04-11 2014-07-23 中国科学院遥感与数字地球研究所 Hyperspectral remote sensing image characteristic extraction method and device
CN106600567A (en) * 2017-01-03 2017-04-26 长沙全度影像科技有限公司 Adaptive non-local mean denoising method
CN110648290A (en) * 2019-09-06 2020-01-03 西安交通大学 Dual-core non-local mean image denoising method based on SURE parameter optimization

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
GUANGYONG CHEN ET AL.: "An efficient statistical method for image noise level estimation", 《2015 IEEE INTERNATIONAL CONFERENCE ON COMPUTER VISION》 *
吴翰: "数字图像的高斯噪声去噪算法研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
陈叶飞等: "无监督多重非局部融合的图像去噪方法", 《自动化学报》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113222853A (en) * 2021-05-26 2021-08-06 武汉博宇光电系统有限责任公司 Progressive infrared image noise reduction method based on noise estimation
CN113393390A (en) * 2021-06-04 2021-09-14 南京理工大学 Image noise reduction method based on local Gaussian process regression
CN113393390B (en) * 2021-06-04 2022-08-16 南京理工大学 Image noise reduction method based on local Gaussian process regression
CN113643198A (en) * 2021-07-22 2021-11-12 海宁奕斯伟集成电路设计有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113934715B (en) * 2021-09-25 2024-03-01 西北工业大学 Propellant preparation quality data denoising method based on improved non-local mean value
CN113934715A (en) * 2021-09-25 2022-01-14 西北工业大学 Propellant preparation quality data denoising method based on improved non-local mean value
CN113657385A (en) * 2021-10-20 2021-11-16 山东摄云信息技术有限公司 Data detection method and device of electronic metering device and electronic equipment
CN116912102A (en) * 2023-05-11 2023-10-20 上海宇勘科技有限公司 Edge-preserving image denoising method and system based on non-local mean value
CN116912102B (en) * 2023-05-11 2024-04-09 上海宇勘科技有限公司 Edge-preserving image denoising method and system based on non-local mean value
CN117094909A (en) * 2023-08-31 2023-11-21 青岛天仁微纳科技有限责任公司 Nanometer stamping wafer image acquisition processing method
CN117094909B (en) * 2023-08-31 2024-04-02 青岛天仁微纳科技有限责任公司 Nanometer stamping wafer image acquisition processing method
CN117499558A (en) * 2023-11-02 2024-02-02 北京市燃气集团有限责任公司 Video image optimization processing method and device
CN117423113A (en) * 2023-12-18 2024-01-19 青岛华正信息技术股份有限公司 Adaptive denoising method for archive OCR (optical character recognition) image
CN117423113B (en) * 2023-12-18 2024-03-05 青岛华正信息技术股份有限公司 Adaptive denoising method for archive OCR (optical character recognition) image

Similar Documents

Publication Publication Date Title
CN112508810A (en) Non-local mean blind image denoising method, system and device
JP6057881B2 (en) Method for removing noise from input image consisting of pixels containing noise
Zhang et al. Joint image denoising using adaptive principal component analysis and self-similarity
CN105335947A (en) Image de-noising method and image de-noising apparatus
CN108416740B (en) Iterative adaptive median filtering method for eliminating salt and pepper noise
US20170069059A1 (en) Non-Local Image Denoising
CN110648290A (en) Dual-core non-local mean image denoising method based on SURE parameter optimization
KR101766536B1 (en) Method and apparatus of image denoising using multi-scale block region detection
Ponomaryov Real-time 2D–3D filtering using order statistics based algorithms
CN105338219A (en) Video image denoising processing method and apparatus
CN115082336A (en) SAR image speckle suppression method based on machine learning
CN113204051B (en) Low-rank tensor seismic data denoising method based on variational modal decomposition
CN102222327A (en) Image denoising method based on Treelet transformation and minimum mean-square error estimation
CN111652810A (en) Image denoising method based on wavelet domain singular value differential model
Yamaguchi et al. Detail preserving mixed noise removal by DWM filter and BM3D
CN112927169B (en) Remote sensing image denoising method based on wavelet transformation and improved weighted kernel norm minimization
Suneetha et al. An Improved Denoising of Medical Images Based on Hybrid Filter Approach and Assess Quality Metrics
Gantenapalli et al. Selective mean filtering for reducing impulse noise in digital color images
CN114529518A (en) Image pyramid and NLM-based image enhancement method for cryoelectron microscope
CN109242797B (en) Image denoising method, system and medium based on homogeneous and heterogeneous region fusion
Delon et al. A patch-based approach for random-valued impulse noise removal
Ali et al. A proposed de-noising algorithm
CN116109519B (en) Image denoising method
Verma et al. Region characteristics-based fusion of spatial and transform domain image denoising methods
Suneetha et al. Image denoising based on statistical nearest neighbor and wave atom transform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination