CN108198140A - Three-dimensional collaboration filtering and noise reduction method based on NCSR models - Google Patents

Three-dimensional collaboration filtering and noise reduction method based on NCSR models Download PDF

Info

Publication number
CN108198140A
CN108198140A CN201711390474.1A CN201711390474A CN108198140A CN 108198140 A CN108198140 A CN 108198140A CN 201711390474 A CN201711390474 A CN 201711390474A CN 108198140 A CN108198140 A CN 108198140A
Authority
CN
China
Prior art keywords
image
block
blocks
ncsr
collaborative filtering
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
CN201711390474.1A
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.)
Xian University of Technology
Original Assignee
Xian University of Technology
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 Xian University of Technology filed Critical Xian University of Technology
Priority to CN201711390474.1A priority Critical patent/CN108198140A/en
Publication of CN108198140A publication Critical patent/CN108198140A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing

Landscapes

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

Abstract

本发明公开了基于NCSR模型的三维协同滤波去噪方法,具体步骤为:利用Canny算子提取含噪图像边缘像素点,将该边缘像素点的坐标保存在W中,由此实现像素的分类;步骤2、将步骤1中含噪图像通过块匹配的方式进行分组;步骤3、将步骤2中各分组图像块进行协同滤波去噪;步骤4、经步骤3去噪后的图像加权平均进行聚合,求得图像的最终估计值;对含噪图像进行分区域处理,进一步提高图像细节部分的清晰程度;本发明基于NCSR模型的三维协同滤波去噪方法利用NCSR模型中的滤波公式对噪声进行过滤,充分利用了图像的非局部相似性,明显减少了去噪结果中的光晕和振铃效应。

The invention discloses a three-dimensional collaborative filtering denoising method based on an NCSR model. The specific steps are: using a Canny operator to extract edge pixel points of a noisy image, and storing the coordinates of the edge pixel points in W, thereby realizing pixel classification; Step 2, grouping the noisy images in step 1 by block matching; step 3, performing collaborative filtering and denoising on each grouped image block in step 2; step 4, performing aggregation on the weighted average of the denoised images in step 3 , obtain the final estimated value of the image; process the noisy image in different regions to further improve the clarity of the image details; the present invention's three-dimensional collaborative filtering denoising method based on the NCSR model uses the filtering formula in the NCSR model to filter the noise , making full use of the non-local similarity of the image, significantly reducing the halo and ringing effects in the denoising results.

Description

基于NCSR模型的三维协同滤波去噪方法3D Collaborative Filtering Denoising Method Based on NCSR Model

技术领域technical field

本发明属于图像处理技术领域,具体涉及基于NCSR模型的三维协同滤波去噪方法。The invention belongs to the technical field of image processing, and in particular relates to a three-dimensional collaborative filtering denoising method based on an NCSR model.

背景技术Background technique

近年来,通过对图像噪声以及图像自身信号的特征研究,许多学者以及研究人员不断地提出新的去噪方法。这些方法的共同目标都是:在实现去噪的同时能够保留更多的图像细节信息。对于一幅自然图像来说,其结构纹理特征都存在着很大的相关性。因此,无论是用空域方法直接对像素值进行平均处理,还是利用频域方法将图像进行变换再对变换系数进行阈值处理,都是充分利用了图像本身的局部和非局部相关性特征来取得较好的去噪效果。In recent years, many scholars and researchers have continuously proposed new denoising methods through the study of the characteristics of image noise and image signal itself. The common goal of these methods is to retain more image detail information while achieving denoising. For a natural image, there is a great correlation between its structure and texture features. Therefore, no matter whether the spatial domain method is used to directly average the pixel values, or the frequency domain method is used to transform the image and then perform threshold processing on the transformation coefficients, it makes full use of the local and non-local correlation characteristics of the image itself to obtain a relatively accurate image. Good denoising effect.

利用局部相似性进行去噪的方法都是仅通过比较单个像素的灰度值来对含有噪声的像素进行处理,算法的鲁棒性达不到预想的效果。针对局部去噪方法的这一缺陷,研究者们力图挖掘图像的非局部相关性,进一步提高去噪效果。在Buades等人首先提出NL-Means这一非局部去噪方法,该方法为后来的许多非局部去噪方法提供了新的思路。其中,BM3D算法是公认的去噪效果相对较好的非局部去噪算法,它算法能很好地克服NL-Means时间复杂度过高这一缺陷。既能更多地保护图像细节,又能在相对短的时间内得到图像的非局部相似性并加以利用。但是BM3D的去噪效果中出现了光晕、振铃和马赛克效应。由于它采用了简单的硬阈值过滤公式来对一组图像块进行局部和非局部过滤,而该过滤公式仅适用于图像的局部过滤。在对非局部图像块进行过滤时常常会使图像边缘出现振铃效应。The methods of denoising by using local similarity only process the pixels containing noise by comparing the gray value of a single pixel, and the robustness of the algorithm cannot reach the expected effect. Aiming at this defect of the local denoising method, researchers try to mine the non-local correlation of the image to further improve the denoising effect. NL-Means, a non-local denoising method, was first proposed by Buades et al., which provided new ideas for many subsequent non-local denoising methods. Among them, the BM3D algorithm is recognized as a non-local denoising algorithm with relatively good denoising effect, and its algorithm can well overcome the defect that the time complexity of NL-Means is too high. It can not only protect more image details, but also obtain and utilize the non-local similarity of images in a relatively short time. However, halo, ringing and mosaic effects appear in the denoising effect of BM3D. Because it uses a simple hard threshold filtering formula to perform local and non-local filtering on a set of image blocks, and this filtering formula is only suitable for local filtering of images. When filtering non-local image blocks, ringing effects often appear on the edge of the image.

发明内容Contents of the invention

本发明目的是提供基于NCSR模型的三维协同滤波去噪方法,采用不同的滤波方式对图像的边缘区域和光滑区域分开处理,能够提高处理后图像的清晰度。The purpose of the present invention is to provide a three-dimensional collaborative filtering denoising method based on the NCSR model, which uses different filtering methods to separately process the edge area and smooth area of the image, and can improve the clarity of the processed image.

本发明所采用的技术方案是,基于NCSR模型的三维协同滤波去噪方法,具体按照以下步骤实施:The technical scheme adopted in the present invention is a three-dimensional collaborative filtering denoising method based on the NCSR model, which is specifically implemented according to the following steps:

步骤1、利用Canny算子提取含噪图像边缘像素点,将该边缘像素点的坐标保存在数组W中;Step 1. Use the Canny operator to extract the edge pixels of the noisy image, and store the coordinates of the edge pixels in the array W;

步骤2、将步骤1中含噪图像通过块匹配的方式进行分组,得到多个分组图像块;Step 2, grouping the noisy images in step 1 by block matching to obtain a plurality of grouped image blocks;

步骤3、将步骤2中各分组图像块进行协同滤波去噪;Step 3, performing collaborative filtering to denoise each grouped image block in step 2;

步骤4、将步骤3去噪后的分组图像块解组成多个图像块,对于在原图像中具有同一坐标的各图像块通过加权平均的方式进行聚合,求得图像的最终估计值。Step 4. Denoising the grouped image blocks in step 3 into multiple image blocks, and aggregate the image blocks with the same coordinates in the original image by means of weighted average to obtain the final estimated value of the image.

步骤2具体步骤为:首先确定参考块的位置,从图像左上角第一个8×8的图像块开始为第一个参考块,下一个参考块的位置为向右或向下平移三个像素,以每个参考块为中心的39×39的区域为当前参考块所在的邻域,在邻域内所有与参考块大小相同的图像块都是候选块,遍历邻域内所有的候选块并求出其与当前参考块之间的欧式距离,选出16个欧式距离最小的候选块作为一组相似块,该组相似块与相应的参考块组成一个分组。The specific steps of step 2 are: first determine the position of the reference block, starting from the first 8×8 image block in the upper left corner of the image is the first reference block, and the position of the next reference block is shifted to the right or down by three pixels , the 39×39 area centered on each reference block is the neighborhood where the current reference block is located, and all image blocks with the same size as the reference block in the neighborhood are candidate blocks, traverse all candidate blocks in the neighborhood and find According to the Euclidean distance between it and the current reference block, 16 candidate blocks with the smallest Euclidean distance are selected as a group of similar blocks, and the group of similar blocks forms a group with the corresponding reference block.

欧式距离的求解方法为:The solution method of Euclidean distance is:

式(1)中,dnoisy表示欧式距离,||·||2表示l-2范式,ZxR代表参考块的像素值,Zx代表邻域内的侯选块的像素值,代表一个图像块内的像素点个数。In formula (1), d noisy represents the Euclidean distance, ||·|| 2 represents the l-2 paradigm, Z x R represents the pixel value of the reference block, Z x represents the pixel value of the candidate block in the neighborhood, Represents the number of pixels in an image block.

步骤3具体步骤为:The specific steps of step 3 are:

步骤3.1、所有图像块首先都需要进行局部二维小波变换,然后由每个分组中参考块的中心像素点的位置是否在W中来选定步骤a或步骤b进行三维协同滤波去噪,估计每个图像块的稀疏系数;Step 3.1, all image blocks first need to perform local two-dimensional wavelet transformation, and then select step a or step b according to whether the position of the central pixel point of the reference block in each group is in W to perform three-dimensional collaborative filtering denoising, and estimate Sparse coefficients for each image block;

a.若当前分组内参考块中心像素点的位置在W中,则使用NCSR模型中公式(2)来对该组图像块进行第三维协同滤波;a. If the position of the center pixel point of the reference block in the current group is in W, then use the formula (2) in the NCSR model to perform third-dimensional collaborative filtering on the group of image blocks;

b.若当前分组内参考块中心像素点的位置不在W中,则使用NCSR模型中的公式(3)来对该组图像块进行第三维协同滤波;b. If the position of the center pixel point of the reference block in the current group is not in W, then use the formula (3) in the NCSR model to perform third-dimensional collaborative filtering on the group of image blocks;

式(2)、(3)中,表示对图像块稀疏系数的估计值,α表示图像块的稀疏系数,β表示一组图像块的平均系数值,l1=c1λ,l2=c2γ,c1和c2都是常数;In formula (2), (3), Represents the estimated value of the sparse coefficient of the image block, α represents the sparse coefficient of the image block, β represents the average coefficient value of a group of image blocks, l 1 =c 1 λ, l 2 =c 2 γ, both c 1 and c 2 is a constant;

步骤3.2、通过步骤3.1对图像块的稀疏系数值进行协同滤波后,每个分组的图像块都进行二维小波逆变换得到其空域上的像素值。Step 3.2. After collaborative filtering is performed on the sparse coefficient values of the image blocks through step 3.1, each grouped image block is subjected to two-dimensional wavelet inverse transformation to obtain its pixel value in the spatial domain.

步骤4图像的最终估计值的具体求法为:The specific calculation method of the final estimated value of the image in step 4 is:

步骤4.1、获取同一位置处多个估计值的权重:Step 4.1. Obtain the weights of multiple estimated values at the same position:

公式(4)中,NxR为同一位置出现的多个估计值的个数,σn为原图像噪声方差;In formula (4), N xR is the number of multiple estimated values that appear at the same position, and σ n is the variance of the original image noise;

步骤4.2、利用公式(5)求得图像块聚合后最终去噪后的结果,Step 4.2, using formula (5) to obtain the final denoising result after image block aggregation,

公式(5)中,为一个图像块经过非局部过滤后得到的像素估计值,xR为图像中的一个参考块,xm为一组图像块中的某一个相似块,为xm处的方形特征函数,为最终图像去噪后的估计值。In formula (5), is the estimated pixel value of an image block after non-local filtering, x R is a reference block in the image, x m is a similar block in a group of image blocks, is the square characteristic function at x m , is the estimated value of the final image after denoising.

本发明有益效果为:The beneficial effects of the present invention are:

1)本发明基于NCSR模型的三维协同滤波去噪方法对含噪图像进行分区域处理(即分为边缘区域和光滑区域),进一步提高图像细节部分(如:纹理、边缘等)的清晰程度。1) The NCSR model-based three-dimensional collaborative filtering denoising method of the present invention performs regional processing on noisy images (i.e., is divided into edge regions and smooth regions), and further improves the clarity of image details (such as textures, edges, etc.).

2)本发明基于NCSR模型的三维协同滤波去噪方法利用NCSR模型中的滤波公式对噪声进行过滤,充分利用了图像的非局部相似性,明显减少了去噪结果中的光晕和振铃效应。2) The 3D collaborative filtering denoising method based on the NCSR model of the present invention uses the filtering formula in the NCSR model to filter the noise, fully utilizes the non-local similarity of the image, and significantly reduces the halo and ringing effects in the denoising results .

附图说明Description of drawings

图1是本发明基于NCSR模型的三维协同滤波去噪方法的流程图;Fig. 1 is the flowchart of the three-dimensional collaborative filtering denoising method based on NCSR model of the present invention;

图2是本发明基于NCSR模型的三维协同滤波去噪方法用于实验的图像;Fig. 2 is the image that the three-dimensional collaborative filtering denoising method based on NCSR model of the present invention is used for experiment;

图3是Cameraman(256×256)图像被不同程度的高斯噪声污染后的示意图;Figure 3 is a schematic diagram of a Cameraman (256×256) image polluted by different degrees of Gaussian noise;

图4是本发明基于NCSR模型的三维协同滤波去噪方法中利用Canny算子进行像素分类的示意图;Fig. 4 is the schematic diagram of pixel classification using Canny operator in the three-dimensional collaborative filtering denoising method based on NCSR model of the present invention;

图5是本发明基于NCSR模型的三维协同滤波去噪方法中块匹配过程示意图;Fig. 5 is a schematic diagram of the block matching process in the three-dimensional collaborative filtering denoising method based on the NCSR model of the present invention;

图6是本发明基于NCSR模型的三维协同滤波去噪方法相似分组图;Fig. 6 is a similar grouping diagram of the three-dimensional collaborative filtering denoising method based on the NCSR model of the present invention;

图7是使用本发明基于NCSR模型的三维协同滤波去噪方法为Cameraman(256×256)图像去噪后的示意图;Fig. 7 is the schematic diagram after denoising the Cameraman (256 * 256) image using the three-dimensional collaborative filtering denoising method based on the NCSR model of the present invention;

图8为本发明基于NCSR模型的三维协同滤波去噪方法去噪结果与BM3D算法在相同噪声强度下的去噪结果的对比效果图;Fig. 8 is a comparison effect diagram of the denoising results of the three-dimensional collaborative filtering denoising method based on the NCSR model of the present invention and the denoising results of the BM3D algorithm under the same noise intensity;

图9为本发明基于NCSR模型的三维协同滤波去噪方法与近几年其他优秀去噪算法的对比图。Fig. 9 is a comparison diagram between the 3D collaborative filtering denoising method based on the NCSR model of the present invention and other excellent denoising algorithms in recent years.

具体实施方式Detailed ways

下面结合附图和具体实施方式对本发明进行详细说明。The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

本发明基于NCSR模型的三维协同滤波去噪方法,如图1所示,具体按照以下步骤实施:The three-dimensional collaborative filtering denoising method based on the NCSR model of the present invention, as shown in Figure 1, is specifically implemented according to the following steps:

步骤1、利用Canny算子提取含噪图像边缘像素点,将该边缘像素点的坐标保存在数组W中;Step 1. Use the Canny operator to extract the edge pixels of the noisy image, and store the coordinates of the edge pixels in the array W;

像素的分类分为两类,一类是光滑区域的像素点,一类是边缘区域的像素点;The classification of pixels is divided into two categories, one is the pixels in the smooth area, and the other is the pixels in the edge area;

步骤2、将步骤1中含噪图像通过块匹配的方式进行分组,得到多个分组图像块;Step 2, grouping the noisy images in step 1 by block matching to obtain a plurality of grouped image blocks;

步骤2具体步骤为:首先确定参考块的位置,从图像左上角第一个8×8的图像块开始为第一个参考块,下一个参考块的位置为向右或向下平移三个像素,以每个参考块为中心的39×39的区域为当前参考块所在的邻域,在邻域内所有与参考块大小相同的图像块都是候选块,遍历邻域内所有的候选块并求出其与当前参考块之间的欧式距离,选出16个欧式距离最小的候选块作为一组相似块,该组相似块与相应的参考块组成一个分组。The specific steps of step 2 are: first determine the position of the reference block, starting from the first 8×8 image block in the upper left corner of the image is the first reference block, and the position of the next reference block is shifted to the right or down by three pixels , the 39×39 area centered on each reference block is the neighborhood where the current reference block is located, and all image blocks with the same size as the reference block in the neighborhood are candidate blocks, traverse all candidate blocks in the neighborhood and find According to the Euclidean distance between it and the current reference block, 16 candidate blocks with the smallest Euclidean distance are selected as a group of similar blocks, and the group of similar blocks forms a group with the corresponding reference block.

欧式距离的求解方法为:The solution method of Euclidean distance is:

式(1)中,dnoisy表示欧式距离,||·||2表示l-2范式,ZxR代表参考块的像素值,Zx代表邻域内的侯选块的像素值,代表一个图像块内的像素点个数。In formula (1), d noisy represents the Euclidean distance, ||·|| 2 represents the l-2 paradigm, Z x R represents the pixel value of the reference block, Z x represents the pixel value of the candidate block in the neighborhood, Represents the number of pixels in an image block.

步骤3、将步骤2中各分组图像块进行协同滤波去噪;Step 3, performing collaborative filtering to denoise each grouped image block in step 2;

步骤3.1、所有图像块首先都需要进行局部二维小波变换,然后由每个分组中参考块的中心像素点的位置是否在W中来选定步骤a或步骤b进行三维协同滤波去噪,估计每个图像块的稀疏系数;Step 3.1, all image blocks first need to perform local two-dimensional wavelet transformation, and then select step a or step b according to whether the position of the central pixel point of the reference block in each group is in W to perform three-dimensional collaborative filtering denoising, and estimate Sparse coefficients for each image block;

a.若当前分组内参考块中心像素点的位置在W中,则使用NCSR模型中公式(2)来对该组图像块进行第三维协同滤波;a. If the position of the center pixel point of the reference block in the current group is in W, then use the formula (2) in the NCSR model to perform third-dimensional collaborative filtering on the group of image blocks;

b.若当前分组内参考块中心像素点的位置不在W中,则使用NCSR模型中的公式(3)来对该组图像块进行第三维协同滤波;b. If the position of the center pixel point of the reference block in the current group is not in W, then use the formula (3) in the NCSR model to perform third-dimensional collaborative filtering on the group of image blocks;

式(2)、(3)中,表示对图像块稀疏系数的估计值,α表示图像块的稀疏系数,β表示一组图像块的平均系数值,l1=c1λ,l2=c2γ,c1和c2都是常数;In formula (2), (3), Represents the estimated value of the sparse coefficient of the image block, α represents the sparse coefficient of the image block, β represents the average coefficient value of a group of image blocks, l 1 =c 1 λ, l 2 =c 2 γ, both c 1 and c 2 is a constant;

步骤3.2、通过步骤3.1对图像块的稀疏系数值进行协同滤波后,每个分组的图像块都进行二维小波逆变换得到其空域上的像素值。Step 3.2. After collaborative filtering is performed on the sparse coefficient values of the image blocks through step 3.1, each grouped image block is subjected to two-dimensional wavelet inverse transformation to obtain its pixel value in the spatial domain.

步骤4、将步骤3去噪后的分组图像块解组成多个图像块,各分组图像块需返回原图像中的位置,在原图像的某些位置处会出现来自不同分组的图像块估计值,因此,需要将这些具有同一坐标的图像块通过加权平均的方式进行聚合得到最终的图像估计值;Step 4, denoising the grouped image blocks after step 3 denoising into multiple image blocks, each grouped image block needs to return to the position in the original image, and image block estimates from different groups will appear in some positions of the original image, Therefore, these image blocks with the same coordinates need to be aggregated by weighted average to obtain the final image estimation value;

步骤4.1、获取同一位置处多个估计值的权重:Step 4.1. Obtain the weights of multiple estimated values at the same position:

公式(4)中,NxR为同一位置出现的多个估计值的个数,σn为原图像噪声方差;In formula (4), N xR is the number of multiple estimated values that appear at the same position, and σ n is the variance of the original image noise;

步骤4.2、利用公式(5)求得图像块聚合后最终去噪后的结果,Step 4.2, using formula (5) to obtain the final denoising result after image block aggregation,

公式(5)中,为一个图像块经过非局部过滤后得到的像素估计值,xR为图像中的一个参考块,xm为一组图像块中的某一个相似块,为xm处的方形特征函数,为最终图像去噪后的估计值。In formula (5), is the estimated pixel value of an image block after non-local filtering, x R is a reference block in the image, x m is a similar block in a group of image blocks, is the square characteristic function at x m , is the estimated value of the final image after denoising.

下面采用基于NCSR模型的三维协同滤波去噪方法对Cameraman(256×256)的灰度图进行处理,如图2所示。加入高斯噪声后,如图3所示,从左到右σn的值分别为10,50,70,100,针对图3的第三幅含噪图像(σn=70)的具体去噪过程如下:Next, the 3D collaborative filtering denoising method based on the NCSR model is used to process the grayscale image of Cameraman (256×256), as shown in Figure 2. After adding Gaussian noise, as shown in Figure 3, the values of σ n from left to right are 10, 50, 70, and 100 respectively. The specific denoising process for the third noisy image (σ n =70) in Figure 3 as follows:

利用Canny算子将含有噪声图像的边缘像素提取出来,并将边缘像素的坐标保存至W中;如图4所示,从左到右依次为Cameraman(256×256),House(256×256),Lena(512×512),Peppers(256×256),其中白色像素点表示边缘像素,黑色像素点表示光滑像素。Use the Canny operator to extract the edge pixels of the noisy image, and save the coordinates of the edge pixels to W; as shown in Figure 4, from left to right are Cameraman (256×256), House (256×256) , Lena(512×512), Peppers(256×256), where white pixels represent edge pixels and black pixels represent smooth pixels.

图5中标有有字母“Ra”和“Rb”的方框代表两个不同的参考块,以及以这两个参考块为中心的虚线框分别表示这两个参考块的邻域。在这两个邻域中标有“a’”和“b’”的图像块分别表示从侯选块中选中的与其对应参考块最相似的相似块,它们将与所对应的参考块形成相似分组;The boxes marked with letters "Ra" and "Rb" in FIG. 5 represent two different reference blocks, and the dotted boxes centered on these two reference blocks respectively represent the neighborhoods of these two reference blocks. The image blocks marked with "a'" and "b'" in these two neighborhoods respectively represent the similar blocks selected from the candidate blocks that are most similar to their corresponding reference blocks, and they will form similar groups with the corresponding reference blocks ;

在块匹配分组的过程中,从图像左上角第一个8×8的图像块开始为第一个参考块,下一个参考块的位置为向右或向下平移三个像素。以每个参考块为中心的39×39的区域为当前参考块所在的邻域,在邻域内所有和参考块大小相同的图像块是候选块,具体如图5所示。黑色框为图像大小,黑色虚线框为图像以边缘或图像顶点为中心对称复制过去的像素点,是为边缘参考块提供邻域补充的部分;In the process of block matching and grouping, the first 8×8 image block in the upper left corner of the image is the first reference block, and the position of the next reference block is shifted to the right or down by three pixels. The 39×39 area centered on each reference block is the neighborhood where the current reference block is located, and all image blocks with the same size as the reference block in the neighborhood are candidate blocks, as shown in Fig. 5 . The black frame is the size of the image, and the black dotted frame is the pixel that is symmetrically copied from the image centered on the edge or image vertex, which is the part that provides neighborhood supplement for the edge reference block;

其中,块匹配分组需要遍历邻域内所有候选块并根据公式(1)求出其与当前参考块之间的欧式距离,并连同每一个候选块的坐标保存在数组Gm,n中。m表示第几个参考块,n表示组内第几个相似块。在数组Gm,n中,根据欧式距离的大小进行排序,仅保留前16个距离最小的相似块的信息在Gm,n中,块匹配形成的分组如图6所示。Among them, the block matching group needs to traverse all candidate blocks in the neighborhood and calculate the Euclidean distance between them and the current reference block according to formula (1), and save them together with the coordinates of each candidate block in the array G m,n . m represents the number of reference blocks, and n represents the number of similar blocks in the group. In the array G m,n , sort according to the size of the Euclidean distance, and only keep the information of the first 16 similar blocks with the smallest distance. In G m,n , the grouping formed by block matching is shown in Figure 6.

Gm,n中所有的图像块进行局部小波变换。变换后,图像块被稀疏表示为A={αi,j,i=1,2,h},其中i表示组内第几个相似块,j表示图像块内的第几个稀疏系数。All image blocks in G m,n are subjected to local wavelet transform. After transformation, the image block is sparsely represented as A={α i,j ,i=1,2,h}, where i represents the number of similar blocks in the group, and j represents the number of sparse coefficients in the image block.

针对每一组图像块:利用公式(6),求出每组相似块同一位置处的非局部均值βjFor each group of image blocks: use formula (6) to find the non-local mean value β j at the same position of each group of similar blocks.

式(6)中,ωi为每个相似块在组内的权重,是与欧式距离成反比的,其计算方式为:In formula (6), ω i is the weight of each similar block in the group, which is inversely proportional to the Euclidean distance, and its calculation method is:

N为图像块的边长,N=8。N is the side length of the image block, N=8.

根据上述公式求出图像块的匹配误差E={αi,jj,i=1,2,...,h},以及集合A中的标准差σ和集合E中的标准差δ。Calculate the matching error E={α i,jj ,i=1,2,...,h} of the image block according to the above formula, and the standard deviation σ in set A and the standard deviation δ in set E .

其中分别为集合A和集合E的平均值,h为集合中元素的个数。in and are the average values of set A and set E respectively, and h is the number of elements in the set.

利用公式(10)和(11)分别求出正则化参数λ和γ的值。Use equations (10) and (11) to find the values of the regularization parameters λ and γ, respectively.

估计每个图像块的稀疏系数,估计方法如下:Estimate the sparse coefficient of each image block, the estimation method is as follows:

判断该分组内参考块的中心坐标是否在数组W中,若在数组W中,利用由公式(12)推导出的公式(2)来进行估计;Determine whether the central coordinates of the reference block in the grouping are in the array W, if in the array W, use the formula (2) derived from the formula (12) to estimate;

若参考块的中心坐标不在W中,则利用由公式(13)以及它的推导公式(3)来进行计算。If the center coordinates of the reference block are not in W, use formula (13) and its derivation formula (3) for calculation.

式(12)、(13)中,为稀疏系数估计值,为二维小波逆变换,α为小波变换后的稀疏系数,λ和γ为常数,β为一组相似块中同一位置处的加权平均系数;In formula (12), (13), is the sparse coefficient estimate, is the two-dimensional wavelet inverse transform, α is the sparse coefficient after wavelet transform, λ and γ are constants, and β is the weighted average coefficient at the same position in a group of similar blocks;

式(2)、(3)中,l1=c1λ,l2=c2γ,c1和c2都是常数。In formulas (2) and (3), l 1 =c 1 λ, l 2 =c 2 γ, both c 1 and c 2 are constants.

所有的图像块进行小波逆变换得到其空域上的像素值。All image blocks are subjected to inverse wavelet transform to obtain pixel values in their spatial domain.

所有图像块返回原图像中的位置,在该位置有可能出现来自不同分组的其他估计值,则要对该位置的所有估计值进行聚合。该位置处的最终估计值的具体求法为:All image patches return the position in the original image where other estimates from different groupings are likely to occur, and all estimates for that position are aggregated. The specific calculation method of the final estimated value at this position is:

首先获取同一位置处多个估计值的权重:First get the weights for multiple estimates at the same location:

公式(4)中,NxR为同一位置出现的多个估计值的个数,σn为原图像噪声方差。In formula (4), N xR is the number of multiple estimated values appearing at the same position, and σ n is the noise variance of the original image.

利用公式(5)求得图像块聚合后最终去噪后的结果:Use formula (5) to obtain the final denoising result after image block aggregation:

公式(5)中,为一个图像块经过非局部过滤后得到的像素估计值,xR为图像中的一个参考块,xm为一组图像块中的某一个相似块,为xm处的方形特征函数,为最终图像去噪后的估计值。In formula (5), is the estimated pixel value of an image block after non-local filtering, x R is a reference block in the image, x m is a similar block in a group of image blocks, is the square characteristic function at x m , is the estimated value of the final image after denoising.

被高斯噪声(σn=70)污染的Cameraman(256×256)图像去噪后的结果如图7所示,为本发明去噪后的输出结果。图8为本发明与BM3D算法的去噪结果对比,可以看出利用本算法去噪后的结果在光滑部分和BM3D在视觉上没有很大差别,但是在边缘细节部分明显比BM3D更清晰,其振铃和光晕效应明显减少。图8中左边一列为BM3D的去噪结果,右边一列为本发明的去噪结果,从每幅图标出的小方框中可以看出本发明的去噪结果边缘部分更清晰一些。图9为本发明与近几年优秀的去噪算法的去噪结果的对比图,第一幅图像为干净的Cameraman(256×256)图像,第二幅为含噪图像(σn=100),第三幅为BM3D算法的去噪结果(PSNR=22.81),第四幅为LINC算法的去噪结果(PSNR=23.28),第五幅为PCLR算法的去噪结果(PSNR=23.48),第六幅为本发明的去噪结果(PSNR=23.60),能看出本发明对边缘细节的处理还是具有较强的竞争力。The denoising result of the Cameraman (256×256) image polluted by Gaussian noise (σ n =70) is shown in FIG. 7 , which is the output result of the present invention after denoising. Figure 8 is a comparison of the denoising results of the present invention and the BM3D algorithm. It can be seen that the denoising results using this algorithm have no great visual difference between the smooth part and BM3D, but the edge details are obviously clearer than BM3D. Ringing and halo effects are visibly reduced. In Figure 8, the left column is the denoising result of BM3D, and the right column is the denoising result of the present invention. It can be seen from the small boxes in each icon that the edge part of the denoising result of the present invention is clearer. Fig. 9 is a comparison diagram of the denoising results of the present invention and the excellent denoising algorithms in recent years, the first image is a clean Cameraman (256×256) image, and the second image is a noisy image (σ n =100) , the third picture is the denoising result of BM3D algorithm (PSNR=22.81), the fourth picture is the denoising result of LINC algorithm (PSNR=23.28), the fifth picture is the denoising result of PCLR algorithm (PSNR=23.48), the first picture is The six pictures are the denoising results of the present invention (PSNR=23.60), and it can be seen that the present invention still has strong competitiveness in processing edge details.

表1给出了本发明以及其他算法对不同图像被不同程度的高斯噪声污染的去噪后的PSNR值(即峰值信噪比)。在大部分情况下,本发明的峰值信噪比都高于其他算法。本发明的平均PSNR值比BM3D高0.3分贝,比LINC高0.42分贝,比PCLR算法高0.35分贝。本发明的去噪效果在平滑区域和其他算法基本一样,但是它对细节的处理具有明显的优势,能够让细节较多的图像达到更好的去噪效果。Table 1 shows the denoised PSNR values (ie peak signal-to-noise ratio) for different images polluted by different degrees of Gaussian noise by the present invention and other algorithms. In most cases, the peak signal-to-noise ratio of the present invention is higher than other algorithms. The average PSNR value of the present invention is 0.3 decibels higher than BM3D, 0.42 decibels higher than LINC, and 0.35 decibels higher than PCLR algorithm. The denoising effect of the present invention is basically the same as that of other algorithms in the smooth area, but it has obvious advantages in detail processing, and can achieve better denoising effect for images with more details.

表1不同去噪算法的PSNR值对比Table 1 PSNR value comparison of different denoising algorithms

通过上述方式,本发明基于NCSR模型的三维协同滤波去噪方法对含噪图像进行分区域处理(即分为边缘区域和光滑区域),进一步提高图像细节部分(如:纹理、边缘等)的清晰程度。本发明基于NCSR模型的三维协同滤波去噪方法利用NCSR模型中的滤波公式对噪声进行过滤,充分利用了图像的非局部相似性,明显减少了去噪结果中的光晕和振铃效应。Through the above method, the 3D collaborative filtering denoising method based on the NCSR model of the present invention performs sub-regional processing on noisy images (that is, into edge regions and smooth regions), and further improves the clarity of image details (such as: textures, edges, etc.) degree. The three-dimensional cooperative filtering denoising method based on the NCSR model of the present invention uses the filtering formula in the NCSR model to filter the noise, fully utilizes the non-local similarity of the image, and obviously reduces the halo and ringing effects in the denoising result.

Claims (5)

1.基于NCSR模型的三维协同滤波去噪方法,其特征在于,具体按照以下步骤实施:1. The three-dimensional collaborative filtering denoising method based on the NCSR model is characterized in that, specifically implement according to the following steps: 步骤1、利用Canny算子提取含噪图像边缘像素点,将该边缘像素点的坐标保存在数组W中;Step 1. Use the Canny operator to extract the edge pixels of the noisy image, and store the coordinates of the edge pixels in the array W; 步骤2、将步骤1中含噪图像通过块匹配的方式进行分组,得到多个分组图像块;Step 2, grouping the noisy images in step 1 by block matching to obtain a plurality of grouped image blocks; 步骤3、将步骤2中各分组图像块进行协同滤波去噪;Step 3, performing collaborative filtering to denoise each grouped image block in step 2; 步骤4、将步骤3去噪后的分组图像块解组成多个图像块,对于在原图像中具有同一坐标的各图像块通过加权平均的方式进行聚合,求得图像的最终估计值。Step 4. Denoising the grouped image blocks in step 3 into multiple image blocks, and aggregate the image blocks with the same coordinates in the original image by means of weighted average to obtain the final estimated value of the image. 2.如权利要求1所述基于NCSR模型的三维协同滤波去噪方法,其特征在于,步骤2所述的具体步骤为:首先确定参考块的位置,从图像左上角第一个8×8的图像块开始为第一个参考块,下一个参考块的位置为向右或向下平移三个像素,以每个参考块为中心的39×39的区域为当前参考块所在的邻域,在邻域内所有与参考块大小相同的图像块都是候选块,遍历邻域内所有的候选块并求出其与当前参考块之间的欧式距离,选出16个欧式距离最小的候选块作为一组相似块,该组相似块与相应的参考块组成一个分组。2. The three-dimensional collaborative filtering denoising method based on NCSR model as claimed in claim 1, is characterized in that, the specific steps described in step 2 are: first determine the position of the reference block, from the first 8 × 8 in the upper left corner of the image The image block starts with the first reference block, and the position of the next reference block is three pixels shifted to the right or down. The 39×39 area centered on each reference block is the neighborhood where the current reference block is located. All image blocks with the same size as the reference block in the neighborhood are candidate blocks, traverse all the candidate blocks in the neighborhood and find the Euclidean distance between them and the current reference block, and select 16 candidate blocks with the smallest Euclidean distance as a group Similar blocks, the group of similar blocks forms a group with the corresponding reference block. 3.如权利要求2所述基于NCSR模型的三维协同滤波去噪方法,其特征在于,所述欧式距离的求解方法为:3. the three-dimensional collaborative filtering denoising method based on NCSR model as claimed in claim 2, is characterized in that, the solution method of described Euclidean distance is: 式(1)中,dnoisy表示欧式距离,||·||2表示l-2范式,ZxR代表参考块的像素值,Zx代表邻域内的侯选块的像素值,代表一个图像块内的像素点个数。In formula (1), d noisy represents the Euclidean distance, ||·|| 2 represents the l-2 paradigm, Z x R represents the pixel value of the reference block, Z x represents the pixel value of the candidate block in the neighborhood, Represents the number of pixels in an image block. 4.如权利要求1所述基于NCSR模型的三维协同滤波去噪方法,其特征在于,步骤3具体步骤为:4. the three-dimensional collaborative filtering denoising method based on NCSR model as claimed in claim 1, is characterized in that, step 3 specific steps are: 步骤3.1、所有图像块首先都需要进行局部二维小波变换,然后由每个分组中参考块的中心像素点的位置是否在W中来选定步骤a或步骤b进行三维协同滤波去噪,估计每个图像块的稀疏系数;Step 3.1, all image blocks first need to perform local two-dimensional wavelet transformation, and then select step a or step b according to whether the position of the central pixel point of the reference block in each group is in W to perform three-dimensional collaborative filtering denoising, and estimate Sparse coefficients for each image block; a.若当前分组内参考块中心像素点的位置在W中,则使用NCSR模型中公式(2)来对该组图像块进行第三维协同滤波;a. If the position of the center pixel point of the reference block in the current group is in W, then use the formula (2) in the NCSR model to perform third-dimensional collaborative filtering on the group of image blocks; b.若当前分组内参考块中心像素点的位置不在W中,则使用NCSR模型中的公式(3)来对该组图像块进行第三维协同滤波;b. If the position of the center pixel point of the reference block in the current group is not in W, then use the formula (3) in the NCSR model to perform third-dimensional collaborative filtering on the group of image blocks; 式(2)、(3)中,表示对图像块稀疏系数的估计值,α表示图像块的稀疏系数,β表示一组图像块的平均系数值,l1=c1λ,l2=c2γ,c1和c2都是常数;In formula (2), (3), Represents the estimated value of the sparse coefficient of the image block, α represents the sparse coefficient of the image block, β represents the average coefficient value of a group of image blocks, l 1 =c 1 λ, l 2 =c 2 γ, both c 1 and c 2 is a constant; 步骤3.2、通过步骤3.1对图像块的稀疏系数值进行协同滤波后,每个分组的图像块都进行二维小波逆变换得到其空域上的像素值。Step 3.2. After collaborative filtering is performed on the sparse coefficient values of the image blocks through step 3.1, each grouped image block is subjected to two-dimensional wavelet inverse transformation to obtain its pixel value in the spatial domain. 5.如权利要求1所述基于NCSR模型的三维协同滤波去噪方法,其特征在于,步骤4所述图像的最终估计值的具体求法为:5. the three-dimensional collaborative filtering denoising method based on NCSR model as claimed in claim 1, is characterized in that, the concrete method for finding the final estimated value of image described in step 4 is: 步骤4.1、获取同一位置处多个估计值的权重:Step 4.1. Obtain the weights of multiple estimated values at the same position: 公式(4)中,NxR为同一位置出现的多个估计值的个数,σn为原图像噪声方差;In formula (4), N xR is the number of multiple estimated values that appear at the same position, and σ n is the variance of the original image noise; 步骤4.2、利用公式(5)求得图像块聚合后最终去噪后的结果,Step 4.2, using formula (5) to obtain the final denoising result after image block aggregation, 公式(5)中,为一个图像块经过非局部过滤后得到的像素估计值,xR为图像中的一个参考块,xm为一组图像块中的某一个相似块,为xm处的方形特征函数,为最终图像去噪后的估计值。In formula (5), is the estimated pixel value of an image block after non-local filtering, x R is a reference block in the image, x m is a similar block in a group of image blocks, is the square characteristic function at x m , is the estimated value of the final image after denoising.
CN201711390474.1A 2017-12-21 2017-12-21 Three-dimensional collaboration filtering and noise reduction method based on NCSR models Pending CN108198140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711390474.1A CN108198140A (en) 2017-12-21 2017-12-21 Three-dimensional collaboration filtering and noise reduction method based on NCSR models

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711390474.1A CN108198140A (en) 2017-12-21 2017-12-21 Three-dimensional collaboration filtering and noise reduction method based on NCSR models

Publications (1)

Publication Number Publication Date
CN108198140A true CN108198140A (en) 2018-06-22

Family

ID=62577109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711390474.1A Pending CN108198140A (en) 2017-12-21 2017-12-21 Three-dimensional collaboration filtering and noise reduction method based on NCSR models

Country Status (1)

Country Link
CN (1) CN108198140A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060220A (en) * 2019-04-26 2019-07-26 中国科学院长春光学精密机械与物理研究所 Based on the image de-noising method and system for improving BM3D algorithm
CN113487501A (en) * 2021-06-29 2021-10-08 嵊州市浙江工业大学创新研究院 Novel underwater image restoration method based on dark channel prior and BM3D algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JING LIU ET AL: "《Collaborative filtering denoising algorithm based on the nonlocal centralized sparse representation model》", 《2017 10TH INTERNATIONAL CONGRESS ON IMAGE AND SIGNAL PROCESSING, BIOMEDICAL ENGINEERING AND INFORMATICS (CISP-BMEI)》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060220A (en) * 2019-04-26 2019-07-26 中国科学院长春光学精密机械与物理研究所 Based on the image de-noising method and system for improving BM3D algorithm
CN113487501A (en) * 2021-06-29 2021-10-08 嵊州市浙江工业大学创新研究院 Novel underwater image restoration method based on dark channel prior and BM3D algorithm

Similar Documents

Publication Publication Date Title
CN108257139B (en) RGB-D three-dimensional object detection method based on deep learning
CN104867111B (en) A kind of blind deblurring method of non-homogeneous video based on piecemeal fuzzy core collection
CN107680054A (en) Multisource image anastomosing method under haze environment
CN103942758A (en) Dark channel prior image dehazing method based on multiscale fusion
Yue et al. CID: Combined image denoising in spatial and frequency domains using Web images
CN107180410A (en) The stylized method for reconstructing and device of a kind of image
CN109509163B (en) A method and system for multi-focus image fusion based on FGF
CN102509294B (en) Single-image-based global depth estimation method
CN103871039B (en) Generation method for difference chart in SAR (Synthetic Aperture Radar) image change detection
CN102903085A (en) Rapid image mosaic method based on corner matching
CN105590319A (en) Method for detecting image saliency region for deep learning
CN108932699B (en) Transform domain-based 3D matching harmonic filtering image denoising method
CN104463814B (en) Image enhancement method based on local texture directionality
Tan et al. Multipoint filtering with local polynomial approximation and range guidance
CN102298773A (en) Shape-adaptive non-local mean denoising method
CN103955934B (en) Image blurring detecting algorithm combined with image obviousness region segmentation
CN113763474B (en) A method for indoor monocular depth estimation based on scene geometric constraints
CN107330863B (en) An Image Denoising Method Based on Noise Estimation
Liu et al. Image denoising searching similar blocks along edge directions
CN112308872A (en) Image edge detection method based on multi-scale Gabor first-order derivative
CN104599253A (en) Natural image shadow elimination method
CN110728692A (en) Image edge detection method based on Scharr operator improvement
CN108805139A (en) An Image Similarity Calculation Method Based on Frequency-Domain Visual Saliency Analysis
CN109003247A (en) The minimizing technology of color image mixed noise
CN108198140A (en) Three-dimensional collaboration filtering and noise reduction method based on NCSR models

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180622