[go: up one dir, main page]

CN106203511B - A kind of image similar block appraisal procedure - Google Patents

A kind of image similar block appraisal procedure Download PDF

Info

Publication number
CN106203511B
CN106203511B CN201610544248.3A CN201610544248A CN106203511B CN 106203511 B CN106203511 B CN 106203511B CN 201610544248 A CN201610544248 A CN 201610544248A CN 106203511 B CN106203511 B CN 106203511B
Authority
CN
China
Prior art keywords
image
value
similar
blocks
block
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.)
Active
Application number
CN201610544248.3A
Other languages
Chinese (zh)
Other versions
CN106203511A (en
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.)
Xiangtan University
Original Assignee
Xiangtan University
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 Xiangtan University filed Critical Xiangtan University
Publication of CN106203511A publication Critical patent/CN106203511A/en
Application granted granted Critical
Publication of CN106203511B publication Critical patent/CN106203511B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

一种图像相似块评估方法,包括以下步骤:(1)取冷冻电子显微镜图像中两个大小为K*K的图像块SA,SB;(2)计算图像块SA中每个像素点对应的梯度值tAi,并保存在矩阵DSA中;计算图像块SB中每个像素点对应的梯度值tBi,并保存在矩阵DSB中;(3)计算第i个点的权重weight1,weight2;(4)计算图像块中相同位置的Ai,Bi两点的测地距离;(5)计算SA,SB之间的测地距离;(6)比较d(SA,SB)与预定义阈值T的大小,判断图像块SA,SB是否相似。基于测地距离的相似块衡量方法,能有效提高相似块组的准确率,用于基于图像块的去噪算法中,能提高去噪效果。

A method for evaluating image similarity blocks, comprising the following steps: (1) taking two image blocks S A and S B whose size is K*K in a cryo-electron microscope image; (2) calculating each pixel point in the image block S A The corresponding gradient value tAi is stored in the matrix DS A ; the gradient value tBi corresponding to each pixel in the image block S B is calculated and stored in the matrix DS B ; (3) the weight weight1 of the i-th point is calculated, weight2; (4) Calculate the geodesic distance between Ai and Bi at the same position in the image block; (5) Calculate the geodesic distance between S A and S B ; (6) Compare d( SA, S B ) Determine whether the image blocks S A , S B are similar to the size of the predefined threshold T. The method of measuring similar blocks based on geodesic distance can effectively improve the accuracy of similar block groups, and it can be used in the denoising algorithm based on image blocks to improve the denoising effect.

Description

一种图像相似块评估方法An Image Similarity Block Evaluation Method

技术领域technical field

本发明涉及计算机领域,特别涉及一种冷冻电镜图像相似块评估的方法。The invention relates to the field of computers, in particular to a method for evaluating similar blocks of cryo-electron microscope images.

背景技术Background technique

随着科学技术的迅速发展,人们对生物的认识,不再仅仅局限于宏观阶段,人们想要更加深刻了解认识生物的微观世界,根据结构决定功能,要了解生物大分子的功能和内在机制,如复制、繁殖,我们必须首先知道其结构。因为生物样品内在结构的复杂性和分子量巨大,解析其三维结构一直是影响是后续研究其功能的瓶颈,直到上世纪中后期,伴随着材料科学的飞速发展,越来越多的精密仪器设备逐渐出现,冷冻电子显微镜等精密仪器设备渐渐用于生物样品研究。With the rapid development of science and technology, people's understanding of biology is no longer limited to the macroscopic stage. People want to have a deeper understanding of the microscopic world of biology. According to the structure to determine the function, it is necessary to understand the function and internal mechanism of biological macromolecules, such as To copy and reproduce, we must first know its structure. Due to the complexity of the internal structure and huge molecular weight of biological samples, analyzing its three-dimensional structure has always been the bottleneck that affects the follow-up research on its function. Until the middle and late last century, with the rapid development of material science, more and more precision instruments and equipment gradually The emergence of precision instruments and equipment such as cryo-electron microscopes is gradually used in the study of biological samples.

经过几十年的发展,测定生物大分子结构的技术以及方法,都获得了很大的发展,主要有以下三种:X射线晶体学,NMR(核磁共振波谱学),冷冻电子显微镜技术(简称冷冻电镜技术,Cryo-EM技术),X射线晶体学要求得到待测生物样品的结晶,NMR需要对生物样品进行提纯,这两种方法都有局限性,因为生物样品内在结构的复杂性和分子量巨大,解析其三维结构一直是影响着其后续功能研究的瓶颈,直到上个世纪中后期,伴随着材料科学的飞速发展,越来越多的精密仪器设备逐渐出现,电子显微镜等渐渐用于生物样品的研究。After decades of development, the techniques and methods for determining the structure of biological macromolecules have been greatly developed. There are mainly three types: X-ray crystallography, NMR (nuclear magnetic resonance spectroscopy), and cryo-electron microscopy (referred to as Cryo-electron microscopy, Cryo-EM technology), X-ray crystallography requires the crystallization of biological samples to be tested, and NMR requires the purification of biological samples. Both methods have limitations because of the complexity and molecular weight of biological samples. It is huge, and analyzing its three-dimensional structure has always been the bottleneck affecting its subsequent functional research. Until the middle and late last century, with the rapid development of material science, more and more precision instruments and equipment gradually appeared, and electron microscopes were gradually used in biological research. Sample study.

冷冻电镜成像的一个缺点是,许多的生物样品都对辐射敏感,电子束可能会损伤样品,为了防止这种情况发生,通常将样品放在很低的电子束下成像,然而,这容易导致图像的信噪比非常低,图像的噪声增强,得到的图像常被泊松噪声和高斯噪声污染,除此之外,环境因素也会造成图像噪声,如磁场变化,机械振动,声振动,热不稳定性,电磁透镜等。另外,噪声还和检流器有关,近似表现为泊松分布,在将模拟投影图像转换成数字图像的时候也会带入高斯噪声,因此,需要针对噪声的不同表现形式去消除冷冻电镜图像中的噪声。另外,图像中的噪声也会影响冷冻电镜图像三维重构过程中的单颗粒挑选和校准步骤,因此,冷冻电镜图像去噪的主要目的是在减少噪声的同时,尽可能多保留图像的细节信息,提高图像质量。常用的电镜图像去噪方法,例如高斯滤波器技术,能够消除噪声,但是该方法也使得图像的边缘变得模糊,从整体上降低了图像质量,而且,图像边缘不够清晰,严重影响后续的颗粒挑选。One disadvantage of cryo-EM imaging is that many biological samples are sensitive to radiation, and the electron beam may damage the sample. To prevent this from happening, the sample is usually imaged under a very low electron beam. However, this tends to cause image The signal-to-noise ratio is very low, the noise of the image is enhanced, and the obtained image is often polluted by Poisson noise and Gaussian noise. In addition, environmental factors can also cause image noise, such as magnetic field changes, mechanical vibration, acoustic vibration, and thermal noise. Stability, electromagnetic lens, etc. In addition, the noise is also related to the galvanometer, which approximates the Poisson distribution, and Gaussian noise will also be brought in when the analog projection image is converted into a digital image. noise. In addition, the noise in the image will also affect the single particle selection and calibration steps in the three-dimensional reconstruction of the cryo-electron microscope image. Therefore, the main purpose of denoising the cryo-electron microscope image is to preserve as much detail information of the image as possible while reducing the noise. to improve image quality. Commonly used electron microscope image denoising methods, such as Gaussian filter technology, can eliminate noise, but this method also makes the edges of the image blurred, which reduces the image quality as a whole, and the image edges are not clear enough, which seriously affects the subsequent particles. pick.

要获得生物大分子的结构,我们首先需要得到其投影图像,但是,低温电镜技术拍摄的冷冻电镜图像有着弱相位、低信噪比、低对比度、背景强度不均衡、颗粒内部纹理不规则等特点,这给准确的测定生物大分子的立体结构带来很大的困难,为了解决这个问题,需要对投影图像进行去噪,提升图像的视觉效果,最大限度的恢复图像质量。在分析原始电子冷冻电镜图像的基础上,我们发现基于图像块的去噪方法能够有效消除原始图像中的噪声成分,但是,同时也发现,该方法首先需要找到与参考块相似的图像块,而如何评价两个图像块是否相似,成为我们解决这个问题的关键所在。在许多经典的基于图像块的图像处理算法中,经常使用欧拉距离来评价两个图像块是否相似,但是这种方式存在一定的局限性,这是因为,欧拉距离只考虑了图像的灰度值,同时,图像块子空间并不完全是欧拉空间,使用欧拉距离并不是一个很好的相似性衡量标准,因此,在选择相似块时,需要考虑图像子空间的结构和一些结构特征。To obtain the structure of biological macromolecules, we first need to obtain their projection images. However, cryo-electron microscopy images taken by cryo-electron microscopy have the characteristics of weak phase, low signal-to-noise ratio, low contrast, uneven background intensity, and irregular texture inside particles. , which brings great difficulties to accurately determine the three-dimensional structure of biological macromolecules. In order to solve this problem, it is necessary to denoise the projection image, improve the visual effect of the image, and restore the image quality to the maximum extent. On the basis of analyzing the original electron cryo-EM images, we found that the denoising method based on the image block can effectively eliminate the noise components in the original image, but at the same time, we also found that the method first needs to find the image block similar to the reference block, while How to evaluate whether two image blocks are similar becomes the key to our solution to this problem. In many classic image processing algorithms based on image blocks, Euler distance is often used to evaluate whether two image blocks are similar, but this method has certain limitations, because Euler distance only considers the grayscale of the image. At the same time, the image block subspace is not completely Euler space, and using Euler distance is not a good measure of similarity. Therefore, when selecting similar blocks, it is necessary to consider the structure of the image subspace and some structures feature.

因此,找到一种能够准确评估相似块的简单且高效的方法,成为当务之急。Therefore, it is imperative to find a simple and efficient method that can accurately evaluate similar blocks.

发明内容Contents of the invention

图像块匹配(Block-Matching)算法是建立在图像信息的冗余性和相关性基础上,通过计算候选块集合X与参考块集合R之间的距离,找到候选块所属的参考块类,常用的块匹配算法有K近邻搜索法,该方法属于局部搜索,搜索速度相对较快,但是只能得到局部最优解,另一种匹配方法是全局搜索方法,虽然可以得到全局最优解,但是该方法耗时久,匹配算法的优劣已经严重影响着其他的后续处理。图像块子空间并不完全是欧拉空间,在判断相似块时,需要考虑图像子空间的结构和图像块的结构特征。Image block matching (Block-Matching) algorithm is based on the redundancy and correlation of image information. By calculating the distance between the candidate block set X and the reference block set R, the reference block class to which the candidate block belongs is found. The block-matching algorithm in the market has the K nearest neighbor search method, which belongs to the local search, and the search speed is relatively fast, but it can only obtain the local optimal solution. Another matching method is the global search method, although the global optimal solution can be obtained, but This method takes a long time, and the quality of the matching algorithm has seriously affected other subsequent processing. The image block subspace is not completely Euler space. When judging similar blocks, it is necessary to consider the structure of the image subspace and the structural characteristics of the image block.

本发明提出一种图像相似块评估方法,为一种基于测地距离的相似块匹配算法,使用测地距离代替欧拉距离来判断两个图像块是否相似。本发明提出的基于测地距离的相似块衡量方法,用于基于图像块的去噪算法中,能有效提高相似块的准确率,能提高去噪效果。The invention proposes an image similar block evaluation method, which is a similar block matching algorithm based on geodesic distance, and uses geodesic distance instead of Euler distance to judge whether two image blocks are similar. The method for measuring similar blocks based on the geodesic distance proposed by the invention is used in a denoising algorithm based on image blocks, which can effectively improve the accuracy of similar blocks and improve the denoising effect.

一种图像相似块评估方法,包括以下步骤:A method for evaluating image similarity blocks, comprising the following steps:

(1)取冷冻电子显微镜图像中两个大小为K*K的图像块SA,SB(1) Take two image blocks S A and S B whose size is K*K in the cryo-electron microscope image;

(2)计算图像块SA中每个像素点对应的梯度值tAi,,并保存在矩阵DSA中;计算图像块SB中每个像素点对应的梯度值tBi,并保存在矩阵DSB中;(2) Calculate the gradient value tAi corresponding to each pixel in the image block S A , and save it in the matrix DS A ; calculate the gradient value tBi corresponding to each pixel in the image block S B , and save it in the matrix DS B middle;

(3)计算第i个点的权重weight1,weight2:(3) Calculate the weight weight1 and weight2 of the i-th point:

weight1=0.5*(value[Ai]-value[Bi])2其中:value[Ai]、value[Bi]分别代表图像块SA和SB中对应相同位置的Ai、Bi两点的灰度值;weight1=0.5*(value[Ai]-value[Bi]) 2 where: value[Ai] and value[Bi] respectively represent the gray values of Ai and Bi corresponding to the same position in image blocks S A and S B ;

weight2=0.5*(tAi+tBi+tanα-β)其中:tAi,tBi分别代表图像块SA和SB中第i个像素点的梯度值;α,β分别代表第i个像素点像素值变化最大方向和最小变化方向的夹角;weight2=0.5*(tAi+tBi+tanα-β) where: tAi, tBi respectively represent the gradient value of the i-th pixel in the image blocks S A and S B ; α, β represent the change of the i-th pixel pixel value respectively The angle between the maximum direction and the minimum direction of change;

(4)计算图像块中相同位置的Ai,Bi两点的测地距离:(4) Calculate Ai at the same position in the image block, the geodesic distance between two points Bi:

d(SAi,SBi)=weight1+weight2;d(S Ai ,S Bi )=weight1+weight2;

(5)计算SA,SB之间的测地距离:(5) Calculate the geodesic distance between S A and S B :

其中:i为图像块中的第i个像素点,i=1,2……K*K;Where: i is the i-th pixel in the image block, i=1,2...K*K;

(6)比较d(SA,SB)与预定义阈值T的大小,判断图像块SA,SB是否相似。(6) Compare the size of d( SA, S B ) with the predefined threshold T, and judge whether the image blocks SA, S B are similar.

在本发明中,步骤(1)所述的两个图像块是通过在整个冷冻电镜图像中随机抽取的。In the present invention, the two image blocks described in step (1) are randomly selected from the whole cryo-EM image.

在本发明中,所述K表示图像块的大小。大小为K的图像块中共有K*K个像素点。K为2-50,优选为5-20,更优选为6-10。In the present invention, the K represents the size of the image block. There are K*K pixels in the image block with a size of K. K is 2-50, preferably 5-20, more preferably 6-10.

在本发明中,步骤(2)中梯度值通过matlab中的gradient函数求得。In the present invention, the gradient value in step (2) is obtained by the gradient function in matlab.

在本发明中,步骤(3)中所述的α为[0,π]。In the present invention, α described in step (3) is [0, π].

在本发明中,β为[0,π]。In the present invention, β is [0, π].

在本发明中,步骤(3)中所述灰度值通过以下方法获得:冷冻电子显微镜图像本身就是灰度图像,通过分析头文件格式,用matlab读取后,存在矩阵中的数值就是图像的灰度值。In the present invention, the grayscale value described in the step (3) is obtained by the following method: the cryo-electron microscope image itself is a grayscale image, and by analyzing the header file format, after reading with matlab, the numerical value in the matrix is exactly the value of the image. grayscale value.

在本发明中,步骤(5)中K的值与步骤(1)中K的值相同。In the present invention, the value of K in step (5) is the same as the value of K in step (1).

在本发明中,步骤(6)中所述T的值与图像块大小K有关。In the present invention, the value of T in step (6) is related to the size K of the image block.

在本发明中,T小于2K*K,T为2-70,优选为5-60,更优选为10-50。In the present invention, T is less than 2K*K, and T is 2-70, preferably 5-60, more preferably 10-50.

在本发明中,步骤(6)中:In the present invention, in step (6):

1)如果d(SA,SB)≤T,两个图像块相似;1) If d(S A , S B )≤T, the two image blocks are similar;

2)如果d(SA,SB)>T,两个图像块不相似。2) If d(S A , S B )>T, the two image blocks are not similar.

在本发明中,在大小为N*N的冷冻电镜图像中随机抽取两个大小为K*K的图像块SA和SB,使用以上方法判断两个图像块是否相似。In the present invention, two image blocks S A and S B of size K*K are randomly selected from a cryo-EM image of size N*N, and the above method is used to judge whether the two image blocks are similar.

在本发明中,所述N为2m,m为4-50,优选为5-20,更优选为6-15。In the present invention, the N is 2 m , and m is 4-50, preferably 5-20, more preferably 6-15.

在本发明中,N*N表示冷冻电子显微镜图像大小。In the present invention, N*N represents the image size of the cryo-electron microscope.

在本发明中,通过计算图像中随机抽取的两个图像块之间的测地距离来衡量他们之间的相似性,处理对象是图像块。In the present invention, the similarity between two image blocks randomly selected in the image is measured by calculating the geodesic distance between them, and the processing object is the image block.

在本发明中,测地距离计算方法除了考虑图像的灰度值外,还考虑了图像的梯度值对测地距离的影响,具体的计算公式是含有图像灰度和梯度的联合表达式。In the present invention, in addition to the gray value of the image, the calculation method of the geodesic distance also considers the influence of the gradient value of the image on the geodesic distance, and the specific calculation formula is a joint expression containing the gray value of the image and the gradient.

在本发明中,测地距离计算公式同时考虑像素值和灰度值对测地距离的影响,各占1/2的比例,同时,考虑灰度值最大变化跟最小变化方向,采用在[0,π]区间递增的正弦函数来描述两点梯度变化。In the present invention, the calculation formula of the geodesic distance considers the influence of the pixel value and the gray value on the geodesic distance at the same time, each accounting for a 1/2 ratio. ,π] interval increasing sine function to describe the two-point gradient change.

在本发明中,计算的是图像块中的每个像素点到另一图像块相同位置像素点之间的测地距离,迭代多次,直到所有的像素点都参与计算,进行迭代但是不更新图像块。In the present invention, what is calculated is the geodesic distance between each pixel point in the image block and the pixel point at the same position of another image block, and iterates multiple times until all the pixel points participate in the calculation, iterates but does not update Image blocks.

在本发明中,先计算图像块中K*K个点之间的测地距离,然后通过加权平均得到两个图像块之间的测地距离,通过测地距离来判断图像块是否相似,主要用于基于图像块的去噪算法设计中。In the present invention, the geodesic distance between K*K points in the image block is calculated first, and then the geodesic distance between two image blocks is obtained by weighted average, and whether the image blocks are similar is judged by the geodesic distance, mainly It is used in the design of denoising algorithm based on image blocks.

在本发明中,块匹配是最简单和有效的寻找相似块的方法,但是该方法效率较低,在实际的图像处理应用中,通常使用一个比参考块稍微大一点的局部窗口来代替全局以寻找相似块,使用局部滑动窗口的方法的基本思想是,假设能在一个比较小的区域能找到参考块的许多相似块,但是,在实际中,图像的某些显著特征,如角,圆边,并不会在某一邻域出现,在非重复模式中使用局部相似性可能会出现较大的误差,在这种情况下,在整个图像域全局搜索相似块会更加合适。为了解决这两个问题,本发明提出了一种新的解决方法,该方法中使用测地距离代替欧拉距离来判断两个图像块是否相似,然后将所有的相似块聚集成相似块组,求相似块组的均值,然后把每一个图像块减去相似块组的均值,通过减法操作能够移除相似块的直流成分,但是并不会改变图像块的重要的结构特征,然后对所有减去直流成分的图像块进行先验学习。In the present invention, block matching is the simplest and most effective method for finding similar blocks, but this method is inefficient. In actual image processing applications, a local window slightly larger than the reference block is usually used to replace the global window. The basic idea of finding similar blocks using a local sliding window method is to assume that many similar blocks of the reference block can be found in a relatively small area. However, in practice, some salient features of the image, such as corners, round edges , will not appear in a certain neighborhood, and using local similarity in non-repeating patterns may cause large errors. In this case, it is more appropriate to search for similar blocks globally in the entire image domain. In order to solve these two problems, the present invention proposes a new solution method, which uses geodesic distance instead of Euler distance to judge whether two image blocks are similar, and then gathers all similar blocks into similar block groups, Find the mean value of the similar block group, and then subtract the mean value of the similar block group from each image block. The DC component of the similar block can be removed through the subtraction operation, but the important structural characteristics of the image block will not be changed, and then all subtracted Image patches with DC components removed for prior learning.

在本发明中,在现有的相似块匹配算法中,通常使用候选块Sx和参考块之间的欧拉距离来衡量其相似性。然而,当两点之间存在大量不在计算考虑区域的点时,用欧拉距离来计算两点之间的距离通常是无效的,因为它没有考虑到局部连通性,所以欧拉距离有着空间上的局限性,为了克服这种局限,在本发明中,我们将采用测地距离代替欧式距离,通过计算两个图像块之间的测地距离来衡量相似性。测地距离用于数据处理,通常表现在分类和相似性比较,本发明通过计算两个图像块之间的测地距离来衡量相似性。在图像域中能够用二维离散函数来表示图像,图像的梯度由二维离散函数得到,梯度方向就是灰度值的最大变化方向,因此,可以使用两点的梯度值来描述测地距离。α,β是两个梯度方向的夹角,取值范围均为[0,π],灰度变化最大方向与灰度变化最小方向的夹角。In the present invention, in the existing similar block matching algorithm, the candidate block S x and the reference block are usually used The Euler distance between them is used to measure their similarity. However, when there are a large number of points that are not in the calculation area between two points, it is usually invalid to use the Euler distance to calculate the distance between the two points, because it does not take into account the local connectivity, so the Euler distance has a space In order to overcome this limitation, in this invention, we will use the geodesic distance instead of the Euclidean distance, and measure the similarity by calculating the geodesic distance between two image blocks. The geodesic distance is used for data processing, usually in classification and similarity comparison, and the present invention measures the similarity by calculating the geodesic distance between two image blocks. In the image domain, an image can be represented by a two-dimensional discrete function. The gradient of the image is obtained by a two-dimensional discrete function. The direction of the gradient is the direction of the maximum change of the gray value. Therefore, the gradient value of two points can be used to describe the geodesic distance. α, β are the angles between the two gradient directions, and the value range is [0, π], the angle between the direction of the maximum gray scale change and the minimum gray scale change direction.

在本发明中,小波变换虽然有效的利用了自然图像的稀疏属性,但是在小波分解时,依赖于所采用的小波基函数,缺乏平移不变性,在去除噪声的时候会丢失大量的细节信息,而现有的基于块的BM3D算法,使用硬阈值和维纳滤波,该方法依赖于阈值的选择,而且该方法中,使用欧式距离来衡量相似块,有一定的局限性,基于全局字典来对图像进行去噪,没有充分考虑到自然图像的图像块之间的非局部自相似先验知识。In the present invention, although the wavelet transform effectively utilizes the sparse attribute of the natural image, it depends on the wavelet basis function adopted during the wavelet decomposition, lacks translation invariance, and will lose a large amount of detailed information when removing noise. However, the existing block-based BM3D algorithm uses hard threshold and Wiener filtering. This method depends on the selection of the threshold, and in this method, the Euclidean distance is used to measure similar blocks, which has certain limitations. Based on the global dictionary Image denoising does not fully consider the prior knowledge of non-local self-similarity between image patches in natural images.

当先验学习的思想与图像的稀疏和冗余表示相结合,基于图像相似块先验学习的去噪方法,使用字典对图像进行去噪。字典去噪的理论依据是,理想图像在适当的过完备字典下存在稀疏表示,噪声破坏了这种稀疏表示,通过选择或设计适当的字典,求出自然图像在该字典下的稀疏表示就可以达到减弱或消除噪声的目的。使用字典去噪的一个先验知识就是该信号的稀疏性,基于图像块先验知识的去噪方法能够有效的保留图像的局部信息以达到较好的实验效果,通过学习得到的字典比使用固定稀疏基具有更好的去噪性能。When the idea of prior learning is combined with the sparse and redundant representation of images, the denoising method based on prior learning of image similar blocks uses dictionaries to denoise images. The theoretical basis of dictionary denoising is that the ideal image has a sparse representation under an appropriate over-complete dictionary, and the noise destroys this sparse representation. By selecting or designing an appropriate dictionary, the sparse representation of the natural image under the dictionary can be obtained. To reduce or eliminate noise. One of the prior knowledge of using dictionary denoising is the sparsity of the signal. The denoising method based on the prior knowledge of image blocks can effectively retain the local information of the image to achieve better experimental results. The dictionary obtained through learning is better than using a fixed Sparse basis has better denoising performance.

MRC图像中存在大量的全同颗粒,对图像进行分块可以有效的利用这些全同颗粒的属性,能取得更好的实验效果。因此,本发明结合基于测地距离的相似块匹配方法和图像块的非局部自相似先验知识(NSS),对NSS进行先验学习,构造相似块组的字典,通过求解加权稀疏编码模型的最优解,得到相似块组的稀疏编码,利用图像的稀疏表示对图像块进行去噪,最后重构所有的图像块得到去噪后的图像。该方法充分考虑到流形空间中的距离计算方法,使用测地距离准确的选择相似块,同时,兼顾相似块之间的内部先验知识(NSS)和外部先验知识(稀疏性)。There are a large number of identical particles in the MRC image. Blocking the image can effectively use the properties of these identical particles and achieve better experimental results. Therefore, the present invention combines the similar block matching method based on geodesic distance and the non-local self-similar prior knowledge (NSS) of the image block, and performs prior learning on the NSS, constructs a dictionary of similar block groups, and solves the weighted sparse coding model. The optimal solution is to obtain the sparse coding of similar block groups, use the sparse representation of the image to denoise the image blocks, and finally reconstruct all the image blocks to obtain the denoised image. This method fully considers the distance calculation method in the manifold space, uses the geodesic distance to accurately select similar blocks, and at the same time, takes into account the internal prior knowledge (NSS) and external prior knowledge (sparseness) between similar blocks.

MRC图像去噪的目的是消除图像中的噪声,提高图像的衬度和信噪比,为后续的单颗粒挑选和二维投影图像分类提供足够的有效信息。假设观察图像y,无噪图像x,噪声v,则有y=x+v,v~N(0,σ2),因此,图像去噪问题转化为通过观察图像y求得图像x的估计值使得最小,即均方误差MSE最小,从而能得到最大PSNR值,达到最优的去噪效果。The purpose of MRC image denoising is to eliminate noise in the image, improve image contrast and signal-to-noise ratio, and provide sufficient effective information for subsequent single particle selection and two-dimensional projection image classification. Assume to observe image y, noise-free image x, and noise v, then there is y=x+v, v~N(0,σ 2 ), therefore, the problem of image denoising is transformed into obtaining the estimated value of image x by observing image y make The minimum, that is, the minimum mean square error MSE, so that the maximum PSNR value can be obtained to achieve the optimal denoising effect.

非局部均值能够在消除噪声的同时有效的保留图像的细节信息,能用于多种不同的图像。为了有效利用图像的结构信息和非局部均值的能有效消除噪声的性质,本发明结合冷冻电镜图像的特点,对图像进行分组分块处理,从一幅MRC图像中抽取若干图像块,选取N个参考块,将所有的相似块聚集成相似块组,这里使用上文提到的测地距离来衡量相似块,然后将所有的相似块聚集成一个相似块组,共N个相似块组,每个相似块组包含M个相似块,用ym表示图像y中的图像块,用xm表示图像x中的图像块,因此,图像去噪问题可以转换成求最小MSE问题,即The non-local mean can effectively preserve the detailed information of the image while eliminating the noise, and can be used for many different images. In order to effectively utilize the structural information of the image and the properties of the non-local mean value that can effectively eliminate noise, the present invention combines the characteristics of the cryo-electron microscope image to group and block the image, extract several image blocks from an MRC image, and select N As a reference block, gather all similar blocks into similar block groups. Here, the geodesic distance mentioned above is used to measure similar blocks, and then all similar blocks are aggregated into a similar block group. There are a total of N similar block groups. Each A similar block group contains M similar blocks, and y m represents the image block in image y, and x m represents the image block in image x. Therefore, the image denoising problem can be transformed into the problem of finding the minimum MSE, that is

其中因为非局部均值能够抑制噪声,字典表示能够有效表示图像中的非噪声信号,因此,结合非局部均值和字典表示,可知因此通过求解字典D和稀疏编码系数达到对图像块进行去噪的效果,最后通过聚合所有图像块得到去噪之后的MRC图像。 in Because the non-local mean can suppress the noise, the dictionary representation can effectively represent the non-noise signal in the image. Therefore, combining the non-local mean and the dictionary representation, we know Therefore by solving the dictionary D and the sparse coding coefficients The effect of denoising image blocks is achieved, and finally the MRC image after denoising is obtained by aggregating all image blocks.

对图像进行分块分组处理,主要有以下优点:能够充分利用图像块之间的先验信息,对其进行建模,更适合并行运算,提高效率。图4是使用本发明提出的方法对MRC图像进行去噪的流程图。Grouping images into blocks has the following advantages: it can make full use of the prior information between image blocks and model them, which is more suitable for parallel computing and improves efficiency. Fig. 4 is a flow chart of denoising an MRC image using the method proposed by the present invention.

表示观察图像y中的M个大小为p*p的相似块,其中表示这M个图像块的均值, 下一步的工作就是对进行先验学习得到K个高斯分布。use Represents M similar blocks of size p*p in the observed image y, where use Indicates the mean value of these M image blocks, The next step is to Perform prior learning to obtain K Gaussian distributions.

在基于图像块的处理方法中,通常认为所有的图像块是独立采样。每个GMM模型由K个高斯分布组成,通过对所有的无噪图像块进行学习得到K个高斯成分。在本发明中,考虑到对图像块的均值操作能够抑制噪声,最大程度上保留图像块的结构特征,本发明采用对进行先验学习的方法得到K个高斯成分。因此,在本发明中的似然函数表示为这里的πk是权值因子,表示第k个高斯成分被选中的概率,在本发明中,N个相似块组相互独立,因此全局目标似然函数可以表示为为了下文计算方便,对目标似然函数取对数通常的方法是对目标似然函数求导,通过令其导数为0,求解方程。但是,lnL表达式中含有K个高斯成分的累加操作,对数函数不能进行化简,因此,不能通过求导直接得到最大值。本发明采用从GMM模型中随机选点,通过EM算法求解。In image patch-based processing methods, it is generally considered that all image patches are independently sampled. Each GMM model consists of K Gaussian distributions, through all noise-free image blocks Carry out learning to obtain K Gaussian components. In the present invention, considering that the mean value operation on the image block can suppress noise and retain the structural characteristics of the image block to the greatest extent, the present invention adopts the method of The method of performing prior learning obtains K Gaussian components. Therefore, in the present invention The likelihood function of is expressed as Here π k is the weight factor, indicating the probability that the kth Gaussian component is selected, In the present invention, N similar block groups are independent of each other, so the global target likelihood function can be expressed as For the convenience of calculation below, take the logarithm of the target likelihood function The usual approach is to take the derivative of the target likelihood function and solve the equation by setting its derivative to 0. However, the logarithmic function cannot be simplified for the accumulation operation containing K Gaussian components in the lnL expression, so the maximum value cannot be obtained directly by derivation. The present invention selects points randomly from the GMM model and solves the problem through EM algorithm.

通过GMM学习,可以得到能够描述图像块结构特征的K个高斯分布,每一个高斯分布称为一个高斯成分,下文通过贝叶斯方法,为每一个相似块组选择合适的高斯成分,并对相似块组去噪。对每个相似块组计算它由第k个高斯成分生成的概率。因为相似块组有着相同的高斯分布。假设第k个高斯成分能有效的描述根据贝叶斯概率公式有取对数得这里Through GMM learning, K Gaussian distributions that can describe the structural characteristics of image blocks can be obtained. Each Gaussian distribution is called a Gaussian component. In the following, the Bayesian method is used to select the appropriate Gaussian component for each similar block group, and the similarity Block group denoising. For each group of similar blocks Computes the probability that it was generated by the kth Gaussian component. Because groups of similar blocks have the same Gaussian distribution. Assume that the kth Gaussian component can effectively describe According to the Bayesian probability formula, we have take the logarithm here

对不同的k取值,C都是相同的。对每一个k值,k=1,2,......K,分别计算最大后验概率的对数值比较k取不同值时,的大小,选择能使取得最大值的k值,对应的高斯成分被选择用来对进行后续处理,此时Σk表示第k个高斯成分的协方差矩阵,对∑k进行奇异值分解(SVD),即Σk=DΛDT,其中D是正交特征向量矩阵,Λ是特征值对角矩阵,特征向量D表征非局部自相似统计结构,因此,可以用D作为稀疏编码的字典,用α表示稀疏编码系数,因此本发明中稀疏编码模型约束条件可以表示为用α表示稀疏编码的系数,v是噪声,w是α的权值向量,表示2范数,||wTα||1表示1范数,D是正交矩阵,DDT=I,|D|=±1,I是单位矩阵。根据最大后验概率MAP,可知根据贝叶斯公式,可得噪声v满足v~N(0,σ2)分布,因此,根据高斯分布概率密度函数有疏编码系数α满足拉普拉斯分布,因此,其中c是常数,所以可得其中ε是接近0的正数。因为D是正交矩阵,DDT=I,|D|=±1,因此可得又因为所以因此稀疏编码约束条件也可以表示为对αi进行求导,可得通常写成下列形式其中(a)+=max(a,0),sgn(zi)是符号函数。定义函数SoftMAP(gii)=sgn(gi)(|gi|-τi)+,因此所以 For different values of k, C is the same. For each value of k, k=1,2,...K, calculate the logarithmic value of the maximum posterior probability When comparing different values of k, size, choose to enable The k value for which the maximum value is obtained, the corresponding Gaussian component is selected for the Perform follow-up processing. At this time, Σ k represents the covariance matrix of the kth Gaussian component, and performs singular value decomposition (SVD) on Σ k , that is, Σ k = DΛD T , where D is the orthogonal eigenvector matrix, and Λ is the eigenvalue Diagonal matrix, the eigenvector D characterizes the non-local self-similar statistical structure, therefore, D can be used as a sparse coding dictionary, and α is used to represent the sparse coding coefficient, so In the present invention, the constraints of the sparse coding model can be expressed as Use α to represent the coefficient of sparse coding, v is noise, w is the weight vector of α, Indicates a 2-norm, ||w T α|| 1 indicates a 1-norm, D is an orthogonal matrix, DDT =I, |D|=±1, and I is an identity matrix. According to the maximum a posteriori probability MAP, we know that According to Bayes formula, Available The noise v satisfies the v~N(0,σ 2 ) distribution, therefore, according to the Gaussian distribution probability density function, we have The sparse coding coefficient α satisfies the Laplace distribution, therefore, in c is a constant, so Available where ε is a positive number close to 0. Because D is an orthogonal matrix, DDT =I, |D|=±1, so Pick Available also because so make Therefore, the sparse coding constraints can also be expressed as Deriving α i , we can get which is Usually written in the following form Where (a)+=max(a,0), sgn(z i ) is a sign function. Define the function SoftMAP(g ii )=sgn(g i )(|g i |-τ i ) + , so so

图像块中的噪声和不准确的相似块集合会影响GMM学习,反过来影响字典和加权稀疏编码矩阵,本发明提出的测地距离能提高相似块组的准确性,从而提高字典的的正确率,最后使用字典D和加权稀疏编码的组合得到去噪后的图像块 The noise in the image block and the inaccurate similar block set will affect the GMM learning, which in turn affects the dictionary and the weighted sparse coding matrix. The geodesic distance proposed by the present invention can improve the accuracy of the similar block group, thereby improving the correct rate of the dictionary , and finally use the dictionary D and weighted sparse coding The combination of get denoised image block

在本发明中,先使用GMM模型对进行先验学习,得到K个高斯成分,当第k个高斯成分被选择作为的最合适的高斯成分时,我们对其协方差Σk进行SVD分解,得到字典D,根据稀疏编码模型求解对应的加权稀疏编码,然后对图像块组分别进行去噪。In the present invention, first use the GMM model to Perform prior learning to get K Gaussian components, when the kth Gaussian component is selected as When the most suitable Gaussian component of , we decompose its covariance Σ k by SVD to obtain the dictionary D, solve the corresponding weighted sparse coding according to the sparse coding model, and then denoise the image block groups respectively.

使用本发明方法求得MRC图像中各图像块的估计值,最后重构所有的图像块得到去噪后的图像当图像的某一位置出现多个估计值时,通过加权平均计算最终估计。通过更新噪声方差进行多次迭代,η是常量,从而提高去噪效果。Use the method of the present invention to obtain the estimated value of each image block in the MRC image, and finally reconstruct all image blocks to obtain a denoised image When multiple estimates occur at a certain location in the image, the final estimate is calculated by weighted average. By updating the noise variance Multiple iterations are performed, and η is a constant, thereby improving the denoising effect.

与现有技术相比较,本发明的技术方案具有以下有一技术效果:Compared with the prior art, the technical solution of the present invention has the following technical effects:

1、计算简单,快速。由于图像块是由若干像素点构成,通过计算点与点之间的测地距离进行累加评价得到图像块间的测地距离,在运算过程中,直接调用matlab中编译的梯度函数,节约了整体计算时间。1. The calculation is simple and fast. Since the image block is composed of a number of pixels, the geodesic distance between the image blocks is obtained by calculating the geodesic distance between points for cumulative evaluation. During the operation, the gradient function compiled in matlab is directly called, saving the overall calculating time.

2、准确性更高。传统的评估方法,如欧式距离,但是由于图像块子空间并不完全是欧拉空间,因此,使用欧拉距离并不是一个很好的相似性衡量标准,而基于流形空间的测地距离则能更好的描述子空间,使用测地距离作为相似性衡量标准,能够更准确的搜索到所有相似块。2. Higher accuracy. Traditional evaluation methods, such as Euclidean distance, but because the image block subspace is not completely Euler space, using Euler distance is not a good measure of similarity, while geodesic distance based on manifold space is It can better describe the subspace, use the geodesic distance as the similarity measure, and search all similar blocks more accurately.

3、欧拉空间是流形空间的一个特例,如果是原始图像中的相邻点,就直接用欧式距离代替测地距离,否则用上文提到的距离公式计算测地距离。3. Euler space is a special case of manifold space. If it is an adjacent point in the original image, the Euclidean distance is used instead of the geodesic distance. Otherwise, the geodesic distance is calculated using the distance formula mentioned above.

4、本发明的技术方案的去噪算法在本质上表现为能在最大程度上去除噪声,同时又能保持原始图像有效信息的完整性,并且具有相对较低的计算时间复杂度和空间复杂度。4. The denoising algorithm of the technical solution of the present invention is essentially capable of removing noise to the greatest extent while maintaining the integrity of the effective information of the original image, and has relatively low computational time complexity and space complexity .

5、本发明的技术方案基于图像块的思想有效利用了冷冻电子显微镜图像中全同颗粒的属性,测地距离同时兼顾图像的灰度值和梯度值,表述更准确。5. The technical solution of the present invention is based on the idea of image blocks and effectively utilizes the properties of identical particles in cryo-electron microscope images, and the geodesic distance takes into account both the gray value and gradient value of the image, and the expression is more accurate.

附图说明Description of drawings

图1为本发明的两个图像块相似性评估流程图。Fig. 1 is a flowchart of the similarity evaluation of two image blocks in the present invention.

图2为本发明一个具体实施例中的相似块示意图。Fig. 2 is a schematic diagram of similar blocks in an embodiment of the present invention.

图3为本发明操作示意图。Fig. 3 is a schematic diagram of the operation of the present invention.

具体实施方式Detailed ways

为了使本领域的技术人员更好的理解本申请的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整的描述。应当理解,此处所描述的具体实施用例仅仅用以解释本发明,并不用于限定本发明。In order to enable those skilled in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation examples described here are only used to explain the present invention, and are not intended to limit the present invention.

一种图像块相似性评估方法,包括以下步骤:A method for evaluating similarity of image blocks, comprising the following steps:

步骤A,在一幅冷冻电镜图像中随机抽取两个大小相同的图像块。In step A, two image blocks of the same size are randomly selected in a cryo-EM image.

A1、分别用矩阵存储两个图像块的像素值。A1. Store the pixel values of the two image blocks in matrix respectively.

A2、分别用矩阵存储两个图像块的梯度值A2. Use matrix to store the gradient values of two image blocks respectively

步骤B,计算测地距离:Step B, calculate the geodesic distance:

B1、计算权值weight1,weight2B1, calculate the weight weight1, weight2

B2、计算图像块中对应点的测地距离;B2. Calculate the geodesic distance of the corresponding point in the image block;

B3、计算图像块之间的测地距离B3. Calculate the geodesic distance between image blocks

步骤C,比较测地距离和固定的阈值T的大小:Step C, compare the geodesic distance with the fixed threshold T:

步骤D,判断两个图像块是否相似:Step D, judging whether two image blocks are similar:

更具体地:More specifically:

一种图像相似块评估方法,包括以下步骤:A method for evaluating image similarity blocks, comprising the following steps:

(1)取冷冻电子显微镜图像中两个大小为K*K的图像块SA,SB(1) Take two image blocks S A and S B whose size is K*K in the cryo-electron microscope image;

(2)计算图像块SA中每个像素点对应的梯度值tAi,并保存在矩阵DSA中;计算图像块SB中每个像素点对应的梯度值tBi,并保存在矩阵DSB中;(2) Calculate the gradient value tAi corresponding to each pixel in the image block S A and store it in the matrix DS A ; calculate the gradient value tBi corresponding to each pixel in the image block S B and store it in the matrix DS B ;

((3)计算第i个点的权重weight1,weight2:((3) Calculate the weight weight1, weight2 of the i-th point:

weight1=0.5*(value[Ai]-value[Bi])2其中:value[Ai]、value[Bi]分别代表图像块SA和SB中对应相同位置的Ai、Bi两点的灰度值;weight1=0.5*(value[Ai]-value[Bi]) 2 where: value[Ai] and value[Bi] respectively represent the gray values of Ai and Bi corresponding to the same position in image blocks S A and S B ;

weight2=0.5*(tAi+tBi+tan|α-β|),其中:tAi,tBi分别代表图像块SA和SB中第i个像素点的梯度值;α,β分别代表第i个像素点像素值变化最大方向和最小变化方向的夹角;weight2=0.5*(tAi+tBi+tan|α-β|), where: tAi, tBi represent the gradient value of the i-th pixel in image blocks S A and S B respectively; α, β represent the i-th pixel respectively The angle between the maximum direction and the minimum direction of pixel value change;

(4)计算图像块中相同位置的Ai,Bi两点的测地距离:(4) Calculate Ai at the same position in the image block, the geodesic distance between two points Bi:

d(SAi,SBi)=weight1+weight2;d(S Ai ,S Bi )=weight1+weight2;

(5)计算SA,SB之间的测地距离:(5) Calculate the geodesic distance between S A and S B :

其中:i为图像块中的第i个像素点,i=1,2……K*K;Where: i is the i-th pixel in the image block, i=1,2...K*K;

(6)比较d(SA,SB)与预定义阈值T的大小,判断图像块SA,SB是否相似。(6) Compare the size of d( SA, S B ) with the predefined threshold T, and judge whether the image blocks SA, S B are similar.

在本发明中,步骤(1)所述的两个图像块是通过在整个冷冻电镜图像中随机抽取的。In the present invention, the two image blocks described in step (1) are randomly selected from the whole cryo-EM image.

在本发明中,所述K表示图像块的大小。大小为K的图像块中共有K*K个像素点。K为2-50,优选为5-20,更优选为6-10。In the present invention, the K represents the size of the image block. There are K*K pixels in the image block with a size of K. K is 2-50, preferably 5-20, more preferably 6-10.

在本发明中,步骤(2)中梯度值通过matlab中的gradient函数求得。In the present invention, the gradient value in step (2) is obtained by the gradient function in matlab.

在本发明中,步骤(3)中所述的α为[0,π]。In the present invention, α described in step (3) is [0, π].

在本发明中,β为[0,π]。In the present invention, β is [0, π].

在本发明中,步骤(3)中所述灰度值通过以下方法获得:冷冻电子显微镜图像本身就是灰度图像,通过分析头文件格式,用matlab读取后,存在矩阵中的数值就是图像的灰度值。In the present invention, the grayscale value described in the step (3) is obtained by the following method: the cryo-electron microscope image itself is a grayscale image, and by analyzing the header file format, after reading with matlab, the numerical value in the matrix is exactly the value of the image. grayscale value.

在本发明中,步骤(5)中K的值与步骤(1)中K的值相同。In the present invention, the value of K in step (5) is the same as the value of K in step (1).

在本发明中,步骤(6)中所述T的值与图像块大小K有关。In the present invention, the value of T in step (6) is related to the size K of the image block.

在本发明中,T小于2K*K,T为2-70,优选为5-60,更优选为10-50。In the present invention, T is less than 2K*K, and T is 2-70, preferably 5-60, more preferably 10-50.

在本发明中,步骤(6)中:In the present invention, in step (6):

1)如果d(SA,SB)≤T,两个图像块相似;1) If d(S A , S B )≤T, the two image blocks are similar;

2)如果d(SA,SB)>T,两个图像块不相似。2) If d(S A , S B )>T, the two image blocks are not similar.

在本发明中,在大小为N*N的冷冻电镜图像中随机抽取两个大小为K*K的图像块SA和SB,使用以上方法判断两个图像块是否相似。In the present invention, two image blocks S A and S B of size K*K are randomly selected from a cryo-EM image of size N*N, and the above method is used to judge whether the two image blocks are similar.

在本发明中,所述N为2m,m为4-50,优选为5-20,更有选为6-15。In the present invention, said N is 2 m , m is 4-50, preferably 5-20, more preferably 6-15.

在本发明中,N*N表示冷冻电子显微镜图像大小。In the present invention, N*N represents the image size of the cryo-electron microscope.

实施例1Example 1

从图3可知,假设两个夹角分别是α和β,α表示点Ai灰度值变化最大方向与灰度值变化最小方向的夹角,β表示点Bi灰度值变化最大方向与灰度值变化最小方向的夹角,定义两点之间的测地距离d(SAi,SBi)。定义权重weight1,weight2:As can be seen from Figure 3, assuming that the two included angles are α and β respectively, α represents the angle between the direction of the maximum change in the gray value of point Ai and the direction of the minimum change in gray value, and β represents the direction of the maximum change in the direction of gray value of point Bi and the direction of gray value The angle between the minimum direction of value change defines the geodesic distance d(S Ai , S Bi ) between two points. Define weights weight1, weight2:

weight1=0.5*(value[Ai]-value[Bi])2其中:value[Ai]、value[Bi]分别代表图像块中相同位置的Ai、Bi两点的灰度值;weight1=0.5*(value[Ai]-value[Bi]) 2 Wherein: value[Ai], value[Bi] respectively represent the gray values of Ai and Bi at the same position in the image block;

weight2=0.5*(tAi+tBi+tan|α-β|)其中:tAi,tBi分别代表图像块SA和SB中第i个像素点的梯度值;α,β分别代表第i个像素点像素值变化最大方向和最小变化方向的夹角;weight2=0.5*(tAi+tBi+tan|α-β|) where: tAi, tBi represent the gradient value of the i-th pixel in the image blocks S A and S B respectively; α, β represent the i-th pixel respectively The angle between the maximum direction of pixel value change and the minimum direction of change;

计算图像块中相同位置的Ai,Bi两点的测地距离:Calculate the geodesic distance between two points Ai and Bi at the same position in the image block:

d(SAi,SBi)=weight1+weight2d(S Ai ,S Bi )=weight1+weight2

图像块是由若干像素点构成,给定两个图像块SA,SB,大小为p*p,图像块SA,SB之间的测地距离An image block is composed of several pixels, given two image blocks S A , S B , the size is p*p, the geodesic distance between image blocks S A , S B

其中,i为图像块中的第i个像素点,i=1,2.....p*p,比较d(SA,SB)与固定的阈值T的大小,如果d(SA,SB)<T,认为图像块SA,SB是相似块,图1是使用本发明提出的测地距离来衡量相似块的流程图。Among them, i is the i-th pixel in the image block, i=1,2...p*p, compare d(S A ,S B ) with the fixed threshold T, if d(S A , S B )<T, the image blocks S A and S B are considered to be similar blocks, and Fig. 1 is a flow chart of using the geodesic distance proposed by the present invention to measure similar blocks.

以冷冻电镜图像N=1280,K=6,T=50为例,举例说明本发明工作流程。With cryo-electron microscope image N=1280, K=6, T=50 is taken as an example to illustrate the working process of the present invention.

如图1所示,计算图像块之间的测地距离的流程图:As shown in Figure 1, the flow chart of calculating the geodesic distance between image blocks:

包括如下步骤:Including the following steps:

(1)在大小为N*N的冷冻电镜图像中随机抽取两个大小为K*K的图像块SA和SB(1) Two image blocks S A and S B of size K*K are randomly selected from the cryo-EM image of size N*N.

(2)计算SA和SB之间的测地距离:(2) Calculate the geodesic distance between S A and S B :

调用matlab中的gradient函数分别求SA,SB的梯度值,分别存储在矩阵DSA,DSB中。Call the gradient function in matlab to calculate the gradient values of S A and S B respectively, and store them in the matrices DS A and DS B respectively.

计算位于图像块中相同位置的两点的距离di,存储在矩阵R中Calculate the distance d i of two points located at the same position in the image block, and store it in the matrix R

计算得到SA,SB间测地距离Calculate the geodesic distance between S A and S B

d(SA,SB)=32.07d(S A ,S B )=32.07

(3)比较d(SA,SB)和T的大小,其中T为50:(3) Compare the size of d(S A , S B ) and T, where T is 50:

d(SA,SB)<Td(S A ,S B )<T

(4)判断是否相似:(4) Judging whether they are similar:

图像块SA和SB是相似块。Image blocks S A and S B are similar blocks.

Claims (32)

1.一种图像相似块评估方法,包括以下步骤:1. A method for image similarity block evaluation, comprising the following steps: (1)取冷冻电子显微镜图像中两个大小为K*K的图像块SA,SB(1) Take two image blocks S A and S B whose size is K*K in the cryo-electron microscope image; (2)计算图像块SA中每个像素点对应的梯度值tAi,并保存在矩阵DSA中;计算图像块SB中每个像素点对应的梯度值tBi,并保存在矩阵DSB中;(2) Calculate the gradient value tAi corresponding to each pixel in the image block S A and store it in the matrix DS A ; calculate the gradient value tBi corresponding to each pixel in the image block S B and store it in the matrix DS B ; (3)计算第i个点的权重weight1,weight2:(3) Calculate the weight weight1 and weight2 of the i-th point: weight1=0.5*(value[Ai]-value[Bi])2其中:value[Ai]、value[Bi]分别代表图像块SA和SB中对应相同位置的Ai、Bi两点的灰度值;weight1=0.5*(value[Ai]-value[Bi]) 2 where: value[Ai] and value[Bi] respectively represent the gray values of Ai and Bi corresponding to the same position in image blocks S A and S B ; weight2=0.5*(tAi+tBi+tan|α-β|)其中:tAi,tBi分别代表图像块SA和SB中第i个像素点的梯度值;α,β分别代表第i个像素点像素值变化最大方向和最小变化方向的夹角;weight2=0.5*(tAi+tBi+tan|α-β|) where: tAi, tBi represent the gradient value of the i-th pixel in the image blocks S A and S B respectively; α, β represent the i-th pixel respectively The angle between the maximum direction of pixel value change and the minimum direction of change; (4)计算图像块中相同位置的Ai,Bi两点的测地距离:(4) Calculate Ai at the same position in the image block, the geodesic distance between two points Bi: d(SAi,SBi)=weight1+weight2;d(S Ai ,S Bi )=weight1+weight2; (5)计算SA,SB之间的测地距离:(5) Calculate the geodesic distance between S A and S B : 其中:i为图像块中的第i个像素点,i=1,2……K*K;Where: i is the i-th pixel in the image block, i=1,2...K*K; (6)比较d(SA,SB)与预定义阈值T的大小,判断图像块SA,SB是否相似。(6) Compare the size of d( SA, S B ) with the predefined threshold T, and judge whether the image blocks SA, S B are similar. 2.根据权利要求1所述的方法,其特征在于:步骤(1)所述的两个图像块是通过在整个冷冻电镜图像中随机抽取的,和/或2. The method according to claim 1, characterized in that: the two image blocks described in step (1) are randomly selected in the whole cryo-electron microscope image, and/or 所述K表示图像块的大小,大小为K的图像块中共有K*K个像素点,K为2-50。The K represents the size of the image block, there are K*K pixels in the image block with the size K, and K is 2-50. 3.根据权利要求2所述的方法,其特征在于:K为5-20。3. The method according to claim 2, characterized in that: K is 5-20. 4.根据权利要求3所述的方法,其特征在于:K为6-10。4. The method according to claim 3, characterized in that: K is 6-10. 5.根据权利要求1-4中任一项所述的方法,其特征在于:步骤(2)中梯度值通过matlab中的gradient函数求得。5. according to the method described in any one in claim 1-4, it is characterized in that: gradient value obtains by the gradient function in the matlab in the step (2). 6.根据权利要求1-4中任一项所述的方法,其特征在于:步骤(3)中所述的α为[0,π],和/或6. The method according to any one of claims 1-4, characterized in that: α described in step (3) is [0, π], and/or β为[0,π]。β is [0, π]. 7.根据权利要求5所述的方法,其特征在于:步骤(3)中所述的α为[0,π],和/或7. The method according to claim 5, characterized in that: α described in step (3) is [0, π], and/or β为[0,π]。β is [0, π]. 8.根据权利要求1-4、7中任一项所述的方法,其特征在于:步骤(3)中所述灰度值通过以下方法获得:冷冻电子显微镜图像本身就是灰度图像,通过分析头文件格式,用matlab读取后,存在矩阵中的数值就是图像的灰度值。8. according to the method described in any one in claim 1-4,7, it is characterized in that: the grayscale value described in step (3) obtains by following method: cryo-electron microscope image itself is grayscale image, by analyzing The header file format, after being read by matlab, the value stored in the matrix is the gray value of the image. 9.根据权利要求5所述的方法,其特征在于:步骤(3)中所述灰度值通过以下方法获得:冷冻电子显微镜图像本身就是灰度图像,通过分析头文件格式,用matlab读取后,存在矩阵中的数值就是图像的灰度值。9. The method according to claim 5, characterized in that: the grayscale value described in the step (3) is obtained by the following method: the cryo-electron microscope image itself is a grayscale image, and is read with matlab by analyzing the header file format Finally, the value stored in the matrix is the gray value of the image. 10.根据权利要求6所述的方法,其特征在于:步骤(3)中所述灰度值通过以下方法获得:冷冻电子显微镜图像本身就是灰度图像,通过分析头文件格式,用matlab读取后,存在矩阵中的数值就是图像的灰度值。10. The method according to claim 6, characterized in that: the grayscale value described in step (3) is obtained by the following method: the cryo-electron microscope image itself is a grayscale image, and is read with matlab by analyzing the header file format Finally, the value stored in the matrix is the gray value of the image. 11.根据权利要求1-4、7、9-10中任一项所述的方法,其特征在于:步骤(5)中K的值与步骤(1)中K的值相同。11. The method according to any one of claims 1-4, 7, 9-10, characterized in that the value of K in step (5) is the same as the value of K in step (1). 12.根据权利要求5所述的方法,其特征在于:步骤(5)中K的值与步骤(1)中K的值相同。12. The method according to claim 5, characterized in that: the value of K in step (5) is the same as the value of K in step (1). 13.根据权利要求6所述的方法,其特征在于:步骤(5)中K的值与步骤(1)中K的值相同。13. The method according to claim 6, characterized in that: the value of K in step (5) is the same as the value of K in step (1). 14.根据权利要求8所述的方法,其特征在于:步骤(5)中K的值与步骤(1)中K的值相同。14. The method according to claim 8, characterized in that: the value of K in step (5) is the same as the value of K in step (1). 15.根据权利要求1-4、7、9-10、12-14中任一项所述的方法,其特征在于:步骤(6)中所述T的值与图像块大小K有关。15. The method according to any one of claims 1-4, 7, 9-10, 12-14, characterized in that the value of T in step (6) is related to the image block size K. 16.根据权利要求5所述的方法,其特征在于:步骤(6)中所述T的值与图像块大小K有关。16. The method according to claim 5, characterized in that: the value of T in step (6) is related to the image block size K. 17.根据权利要求6所述的方法,其特征在于:步骤(6)中所述T的值与图像块大小K有关。17. The method according to claim 6, characterized in that: the value of T in step (6) is related to the image block size K. 18.根据权利要求8所述的方法,其特征在于:步骤(6)中所述T的值与图像块大小K有关。18. The method according to claim 8, characterized in that: the value of T in step (6) is related to the image block size K. 19.根据权利要求15所述的方法,其特征在于:步骤(6)中T小于2K*K。19. The method according to claim 15, characterized in that: in step (6), T is less than 2K*K. 20.根据权利要求16-18中任一项所述的方法,其特征在于:步骤(6)中T小于2K*K。20. The method according to any one of claims 16-18, characterized in that: in step (6), T is less than 2K*K. 21.根据权利要求19所述的方法,其特征在于:步骤(6)中T为2-70。21. The method according to claim 19, characterized in that: in step (6), T is 2-70. 22.根据权利要求10所述的方法,其特征在于:步骤(6)中T为2-70。22. The method according to claim 10, characterized in that: in step (6), T is 2-70. 23.根据权利要求21或22所述的方法,其特征在于:步骤(6)中T为5-60。23. The method according to claim 21 or 22, characterized in that: in step (6), T is 5-60. 24.根据权利要求23所述的方法,其特征在于:步骤(6)中T为10-50。24. The method according to claim 23, characterized in that: in step (6), T is 10-50. 25.根据权利要求1-4、7、9-10、12-14、16-19、21-22、24中任一项所述的方法,其特征在于:步骤(6)中:25. The method according to any one of claims 1-4, 7, 9-10, 12-14, 16-19, 21-22, 24, characterized in that: in step (6): 1)如果d(SA,SB)≤T,两个图像块相似;1) If d(S A , S B )≤T, the two image blocks are similar; 2)如果d(SA,SB)>T,两个图像块不相似。2) If d(S A , S B )>T, the two image blocks are not similar. 26.根据权利要求5所述的方法,其特征在于:步骤(6)中:26. The method according to claim 5, characterized in that: in step (6): 1)如果d(SA,SB)≤T,两个图像块相似;1) If d(S A , S B )≤T, the two image blocks are similar; 2)如果d(SA,SB)>T,两个图像块不相似。2) If d(S A , S B )>T, the two image blocks are not similar. 27.根据权利要求6所述的方法,其特征在于:步骤(6)中:27. The method according to claim 6, characterized in that: in step (6): 1)如果d(SA,SB)≤T,两个图像块相似;1) If d(S A , S B )≤T, the two image blocks are similar; 2)如果d(SA,SB)>T,两个图像块不相似。2) If d(S A , S B )>T, the two image blocks are not similar. 28.根据权利要求8所述的方法,其特征在于:步骤(6)中:28. The method according to claim 8, characterized in that: in step (6): 1)如果d(SA,SB)≤T,两个图像块相似;1) If d(S A , S B )≤T, the two image blocks are similar; 2)如果d(SA,SB)>T,两个图像块不相似。2) If d(S A , S B )>T, the two image blocks are not similar. 29.根据权利要求1所述的方法,其特征在于:冷冻电镜图像的大小为N*N。29. The method according to claim 1, characterized in that: the size of the cryo-electron microscope image is N*N. 30.根据权利要求29所述的方法,其特征在于:所述N为2m,m为4-50,和/或30. The method according to claim 29, characterized in that: said N is 2 m , m is 4-50, and/or N*N表示冷冻电子显微镜图像大小。N*N represents the size of the cryo-electron microscope image. 31.根据权利要求30所述的方法,其特征在于:m为5-20。31. The method according to claim 30, characterized in that m is 5-20. 32.根据权利要求31所述的方法,其特征在于:m为6-15。32. The method according to claim 31, characterized in that m is 6-15.
CN201610544248.3A 2016-06-12 2016-07-11 A kind of image similar block appraisal procedure Active CN106203511B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610407236 2016-06-12
CN2016104072366 2016-06-12

Publications (2)

Publication Number Publication Date
CN106203511A CN106203511A (en) 2016-12-07
CN106203511B true CN106203511B (en) 2019-09-10

Family

ID=57476395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610544248.3A Active CN106203511B (en) 2016-06-12 2016-07-11 A kind of image similar block appraisal procedure

Country Status (1)

Country Link
CN (1) CN106203511B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107067389B (en) * 2017-01-05 2019-09-17 佛山科学技术学院 A kind of blind evidence collecting method of distorted image
CN107038730B (en) * 2017-03-30 2020-09-11 湖北工业大学 Sparse representation image reconstruction method based on Gaussian scale structure block grouping
CN108596236A (en) * 2018-04-18 2018-09-28 东南大学 It is a kind of to roll into a ball partition method based on the thalamic nuclei of global connection features and geodesic distance
CN109171815B (en) * 2018-08-27 2021-08-03 香港理工大学 Ultrasound apparatus, ultrasound method, and computer readable medium
CN112508819A (en) * 2020-12-17 2021-03-16 广州大学 Wrapping phase denoising method and system based on convolutional neural network and storage medium
CN112750116B (en) * 2021-01-15 2023-08-11 北京市商汤科技开发有限公司 Defect detection method, device, computer equipment and storage medium
WO2022268019A1 (en) * 2021-06-25 2022-12-29 中国科学院上海药物研究所 Detection method and apparatus for zero-loss peak drift of cryogenic electron microscopy
CN115471422A (en) * 2021-09-30 2022-12-13 图灵人工智能研究院(南京)有限公司 Image noise reduction method and system, electronic device, cloud server system, and medium
CN114898193A (en) * 2022-07-11 2022-08-12 之江实验室 Manifold learning-based image feature fusion method and device and image classification system
CN117788333B (en) * 2024-02-26 2024-07-23 海南热带海洋学院 ISSM NL means algorithm for speckle noise suppression of underwater ultrasonic images
CN119624813B (en) * 2025-02-12 2025-08-22 北京航空航天大学 Image quality enhancement method for X-ray multi-contrast imaging based on feature prior learning

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130121565A1 (en) * 2009-05-28 2013-05-16 Jue Wang Method and Apparatus for Local Region Selection
WO2015013908A1 (en) * 2013-07-31 2015-02-05 Microsoft Corporation Geodesic saliency using background priors
GB2523329A (en) * 2014-02-20 2015-08-26 Nokia Technologies Oy Method, apparatus and computer program product for image segmentation
CN103824295B (en) * 2014-03-03 2016-08-17 天津医科大学 The dividing method of adherent hyaline-vascular type lung nodule in a kind of lung CT image
CN104268227B (en) * 2014-09-26 2017-10-10 天津大学 High-quality correlated samples chooses method automatically in picture search based on reverse k neighbours

Also Published As

Publication number Publication date
CN106203511A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN106203511B (en) A kind of image similar block appraisal procedure
Yang et al. Single-image super-resolution reconstruction via learned geometric dictionaries and clustered sparse coding
Talebi et al. Global image denoising
Cevher et al. Sparse signal recovery using markov random fields
Zhong et al. A new weight for nonlocal means denoising using method noise
CN107067367A (en) A kind of Image Super-resolution Reconstruction processing method
CN112991483B (en) A Non-local Low-Rank Constrained Self-Calibrating Parallel Magnetic Resonance Imaging Reconstruction Method
CN104657951A (en) Multiplicative noise removal method for image
CN112927169B (en) A Noise Removal Method for Remote Sensing Image Based on Wavelet Transform and Improved Weighted Kernel Norm Minimization
Niu An overview of image super-resolution reconstruction algorithm
Xu et al. Details enhancement in unsigned distance field learning for high-fidelity 3D surface reconstruction
CN118037578A (en) Single image clarity restoration method based on 3D blur degradation model
Zin et al. Local image denoising using RAISR
Lu et al. Image-specific prior adaptation for denoising
CN108510591A (en) A kind of improvement Poisson curve reestablishing method based on non-local mean and bilateral filtering
CN112686814B (en) An Image Denoising Method Based on Affine Low Rank
Hu et al. An adaptive nonlocal Gaussian prior for hyperspectral image denoising
CN107085839B (en) SAR image speckle reduction method based on texture enhancement and sparse coding
Zou et al. Video matting via sparse and low-rank representation
Sharma et al. Facial image super-resolution with CNN,“A Review”
CN116977473A (en) A sparse angle CT reconstruction method and device based on projection domain and image domain
Ouyang et al. Research on denoising of cryo-EM images based on deep learning
Xian et al. Data-driven tight frame for cryo-em image denoising and conformational classification
CN114331863A (en) Affine transformation-based image smoothing method
WO2018120043A1 (en) Image reconstruction method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20161207

Assignee: Hunan Laolai Technology Co.,Ltd.

Assignor: XIANGTAN University

Contract record no.: X2023980030213

Denomination of invention: An image similarity block evaluation method

Granted publication date: 20190910

License type: Exclusive License

Record date: 20230105