[go: up one dir, main page]

CN114998632B - RVIN detection and removal method based on pixel clustering - Google Patents

RVIN detection and removal method based on pixel clustering Download PDF

Info

Publication number
CN114998632B
CN114998632B CN202210539711.0A CN202210539711A CN114998632B CN 114998632 B CN114998632 B CN 114998632B CN 202210539711 A CN202210539711 A CN 202210539711A CN 114998632 B CN114998632 B CN 114998632B
Authority
CN
China
Prior art keywords
pixels
pixel
noise
clustering
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210539711.0A
Other languages
Chinese (zh)
Other versions
CN114998632A (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.)
Hainan University
Original Assignee
Hainan 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 Hainan University filed Critical Hainan University
Priority to CN202210539711.0A priority Critical patent/CN114998632B/en
Publication of CN114998632A publication Critical patent/CN114998632A/en
Application granted granted Critical
Publication of CN114998632B publication Critical patent/CN114998632B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/36Applying a local operator, i.e. means to operate on image points situated in the vicinity of a given point; Non-linear local filtering operations, e.g. median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Probability & Statistics with Applications (AREA)
  • Nonlinear Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The application discloses a RVIN detection and removal method based on pixel clustering, which comprises the following steps: clustering and segmentation are carried out based on the gray distance similarity of the pixel points, and all pixels in the damaged image are classified into K classes; calculating LCI values of pixels, determining an area where the pixels are located based on the LCI values, wherein the area comprises a flat area and a detail area, obtaining an optimal detection threshold value of each type of pixels through iterative solution, and judging whether the pixels are noise pixels or not according to the LCI values of the pixels and the optimal detection threshold value; an LCI weighted mean filter and an edge direction filter are employed for noise pixels in the flat and detail regions, respectively, to recover pixels corrupted by random value impulse noise. The noise detector and the filter provided by the application have high robustness and generalization, and have remarkable effects in RVIN removal of natural images and medical images, and particularly have better effects on high noise level.

Description

一种基于像素聚类的RVIN检测和去除的方法A method for RVIN detection and removal based on pixel clustering

技术领域Technical field

本发明涉及图像处理技术领域,尤其涉及一种基于像素聚类的RVIN检测和去除的方法。The present invention relates to the field of image processing technology, and in particular to a method of detecting and removing RVIN based on pixel clustering.

背景技术Background technique

数字图像在产生和传播的过程中容易受到噪声的干扰,影响后续对图像的处理,图像去噪一直是急需解决的底层视觉任务之一。图像去噪模型可以表示为Y=X+B,其中Y和X分别表示受损图像和清晰图像,B表示自适应噪声。在自然图像和医学图像中存在的噪声主要是高斯噪声和随机脉冲噪声(random-valued impulse noise,RVIN)。关于高斯噪声去除的算法已经有很多,且表现良好。当图像受到随机脉冲噪声污染时,图像中只有部分像素遭到破坏,且该部分像素的新的灰度值随机处于0~255之间。相比高斯噪声、椒盐噪声和其他类型的噪声,这种随机特性给噪声去除带来更多的麻烦。Digital images are easily interfered by noise during the generation and propagation process, which affects subsequent image processing. Image denoising has always been one of the underlying visual tasks that urgently needs to be solved. The image denoising model can be expressed as Y=X+B, where Y and X represent damaged images and clear images respectively, and B represents adaptive noise. The noise existing in natural images and medical images is mainly Gaussian noise and random impulse noise (random-valued impulse noise, RVIN). There are many algorithms for Gaussian noise removal and they perform well. When the image is contaminated by random impulse noise, only some pixels in the image are destroyed, and the new gray value of this part of the pixels is randomly between 0 and 255. Compared with Gaussian noise, salt-and-pepper noise and other types of noise, this random characteristic brings more trouble to noise removal.

几种用于高斯噪声去除的滤波器如高斯滤波、均值滤波和双边滤波器被尝试用于去除RVIN。这些线性和非线性的保边滤波方法是结合图像的空间邻近度和像素值相似度的一种折中处理,同时考虑空域信息和灰度相似性,达到保边去噪的目的,但是对随机脉冲噪声的效果并不显著,而且容易使修复的图像变得模糊。中值滤波器及其变体CWM把局部区域的像素按灰度等级进行排序,取该领域中灰度的中值或加权中值作为当前像素的灰度值。相比之下,它们对于去除脉冲噪声具有较好的效果,同时在一定程度上克服线性滤波器处理图像细节模糊的问题。因此,提出了一种新的自适应加权中值滤波器(ACWM),其采用基于最小均方(LMS)算法的学习方法获得每个块内的中心权重,然后通过多次迭代逐步应用噪声滤波程序,以获得最优的滤波效果。但是对于对点、线、尖顶等细节纹理较多的图像,这些中值滤波器及其改进算法容易将细节和纹理中的正常像素当作噪声像素来去除,无法从根本上解决图像模糊和细节信息丢失的问题。Several filters for Gaussian noise removal such as Gaussian filter, mean filter and bilateral filter were tried to remove RVIN. These linear and nonlinear edge-preserving filtering methods are a compromise process that combines the spatial proximity and pixel value similarity of the image, taking into account spatial information and grayscale similarity to achieve the purpose of edge-preserving denoising, but for random The effect of impulse noise is not significant and tends to blur the repaired image. The median filter and its variant CWM sort the pixels in a local area according to the gray level, and take the median or weighted median of the gray level in the area as the gray level value of the current pixel. In contrast, they have a better effect on removing impulse noise, and at the same time overcome to a certain extent the problem of blurring image details processed by linear filters. Therefore, a new adaptive weighted median filter (ACWM) is proposed, which uses a learning method based on the least mean square (LMS) algorithm to obtain the center weight within each block, and then gradually applies noise filtering through multiple iterations program to obtain the optimal filtering effect. However, for images with many detailed textures such as points, lines, and spires, these median filters and their improved algorithms tend to remove normal pixels in details and textures as noise pixels, and cannot fundamentally solve image blur and details. Information loss problem.

基于噪声检测和滤波的两阶段RVIN去噪算法通过先检测出受损图像中的噪声像素,再对其进行去除,这可以有效解决修复图像模糊和细节丢失的问题。显而易见的,这种两阶段方法的去噪效果与噪声检测的准确率紧密相关。为了准确筛选出受损图像中的随机脉冲噪声,因此,提出了一种基于局部统计秩序绝对差(ROAD)的噪声检测方法,其通过统计局部窗口中的中心像素与其邻域像素的灰度差来判断该像素是否为噪声。受ROAD方法的启发,DONG提出了通过使用对数函数将中心像素的ROAD值转化为ROLD的形式来放大中心像素与其邻域里的像素的差异,从而提高脉冲噪声检测的准确率。Yu结合ROAD和ROLD提出了基于rank ordered relative differences(RORD)的噪声检测方法。但这些方法没有考虑窗口范围内像素的统计信息如方差,和噪声的先验知识如噪声水平。The two-stage RVIN denoising algorithm based on noise detection and filtering first detects noise pixels in the damaged image and then removes them, which can effectively solve the problem of blurred images and loss of details in repaired images. Obviously, the denoising effect of this two-stage method is closely related to the accuracy of noise detection. In order to accurately screen out random impulse noise in damaged images, a noise detection method based on local statistical order absolute difference (ROAD) is proposed, which counts the grayscale difference between the central pixel in the local window and its neighbor pixels. to determine whether the pixel is noise. Inspired by the ROAD method, DONG proposed to use a logarithmic function to convert the ROAD value of the central pixel into a ROLD form to amplify the difference between the central pixel and its neighboring pixels, thereby improving the accuracy of impulse noise detection. Yu combined ROAD and ROLD and proposed a noise detection method based on rank ordered relative differences (RORD). However, these methods do not consider the statistical information of pixels within the window range, such as variance, and the prior knowledge of noise, such as noise level.

实际上,噪声水平的高低对去噪算法的性能有很大影响。为了充分利用图像噪声水平的先验知识,提出了一种基于local consensus Index(LCI)的噪声检测方法,通过计算中心像素的LCI值来衡量其与邻域中其他像素的相似程度,然后估计受损图像的噪声水平来设置合适的LCI阈值以筛选出正常像素和噪声像素。为了提高噪声的检测精度,其通过大量的实验和多项式拟合来获取LCI阈值和图像噪声水平的计算公式。但是,对于一些纹理复杂和受损程度严重的图像,其像素的LCI值普遍较低,容易增加误判像素的数量。文献【Triple Threshold Statistical Detection filter for removing high densityrandom-valued impulse noise in images】设计了标准差、平均值和四分位数的三阈值检测的方法来解决高噪声水平下的图像去噪问题。但是这种多阈值检测方法在增加算法复杂度的同时对噪声检测提升作用不大,无法很好的区分出细节或纹理区域中的正常像素和噪声像素。为了解决这个问题,Nadeem]设计了一种基于开关技术的模糊噪声检测器,能够很好地区分细节和纹理区域的噪声像素和边缘像素。在噪声检测阶段,通过使用适当的阈值,可以将图像中的像素识别为正常像素、噪声像素或候选噪声像素,但是本文没有具体交代如何从候选噪声中过滤边缘像素。文献[Liu]详细介绍了一种秩序道路差分(ROD-ROAD)和局部图像统计最小边缘像素差(MEPD)方法从候选噪声中识别出边缘像素,防止边缘被错误判别为噪声。这些基于邻域像素的检测和滤波方法,基本上只考虑了有限窗口范围内的像素灰度值信息,没有考虑整个图像的像素分布特性,导致算法没有很好的泛化性能。而且当图像受损程度达到60%甚至更高时,由于邻域中的噪声比正常像素更多,这些方法很容易将正常的像素误判为噪声像素。In fact, the level of noise has a great impact on the performance of denoising algorithms. In order to make full use of the prior knowledge of image noise level, a noise detection method based on local consensus index (LCI) is proposed. By calculating the LCI value of the central pixel, it measures its similarity with other pixels in the neighborhood, and then estimates the degree of similarity between it and other pixels in the neighborhood. The noise level of the damaged image is used to set an appropriate LCI threshold to filter out normal pixels and noise pixels. In order to improve the detection accuracy of noise, it obtained the calculation formulas of LCI threshold and image noise level through a large number of experiments and polynomial fitting. However, for some images with complex textures and severe damage, the LCI values of their pixels are generally low, which easily increases the number of misjudged pixels. The literature [Triple Threshold Statistical Detection filter for removing high density random-valued impulse noise in images] designs a three-threshold detection method of standard deviation, mean and quartile to solve the problem of image denoising under high noise levels. However, this multi-threshold detection method has little effect on improving noise detection while increasing the complexity of the algorithm, and cannot well distinguish between normal pixels and noise pixels in detail or texture areas. To solve this problem, Nadeem] designed a blur noise detector based on switching technology, which can well distinguish noise pixels and edge pixels in detail and texture areas. In the noise detection stage, by using appropriate thresholds, pixels in the image can be identified as normal pixels, noise pixels or candidate noise pixels, but this article does not specifically explain how to filter edge pixels from candidate noise. The literature [Liu] introduces in detail an order road difference (ROD-ROAD) and local image statistics minimum edge pixel difference (MEPD) methods to identify edge pixels from candidate noise to prevent edges from being misidentified as noise. These detection and filtering methods based on neighborhood pixels basically only consider the pixel gray value information within a limited window range, and do not consider the pixel distribution characteristics of the entire image, resulting in poor generalization performance of the algorithm. And when the image damage degree reaches 60% or even higher, these methods can easily misjudge normal pixels as noise pixels because there are more noises in the neighborhood than normal pixels.

近几年发展起来的深度学习技术也被广泛用于图像去噪里,提出的基于卷积神经网络的去噪方法用于去除高斯噪声,是图像处理中强大的非线性映射模型,但是该模型的灵活性受到严重限制,而且对RVIN并不适用。为了解决这个问题,提出了一种用于RVIN去噪的盲CNN模型,采用使用灵活的噪声比预测器(NRP)作为指标。但是这些基于端到端的神经网络去噪模型的训练需要花费大量的计算成本,比起传统的去噪方法并没有明显的优势,模型的复杂性也给算法的落地实施带来困难。Deep learning technology developed in recent years has also been widely used in image denoising. The proposed denoising method based on convolutional neural network is used to remove Gaussian noise. It is a powerful nonlinear mapping model in image processing. However, this model The flexibility is severely limited and is not applicable to RVIN. To solve this problem, a blind CNN model for RVIN denoising is proposed by using a flexible Noise Ratio Predictor (NRP) as an indicator. However, the training of these end-to-end neural network denoising models requires a lot of computing costs and has no obvious advantages over traditional denoising methods. The complexity of the model also makes it difficult to implement the algorithm.

综上,虽然各种图像降噪算法不断新增,然而很多采用手动设置的检测阈值或者基于局部窗口信息所设计的噪声检测方法并不具有良好的泛化性能,无法有效处理高噪声水平的受损图像,也无法精准的区分噪声像素和边缘像素导致在降噪的同时往往丢失图像的细节或边缘信息。In summary, although various image denoising algorithms are constantly being added, many noise detection methods that use manually set detection thresholds or are designed based on local window information do not have good generalization performance and cannot effectively handle high-noise level subjects. The image is damaged, and the noise pixels and edge pixels cannot be accurately distinguished. As a result, the details or edge information of the image are often lost during noise reduction.

发明内容Contents of the invention

为了解决上述技术问题,本发明提出一种基于像素聚类的RVIN检测和去除的方法,为了提高去噪算法的泛化性能,在达到快速降噪的同时仍能保留足够细节信息,本发明中噪声检测器基于分组聚类的思想,根据像素的特征对受损图像中的所有像素分成几类,再通过自适应阈值识别出每组像素的噪声;根据噪声检测结果,本发明提出了一种分区决策的滤波器,针对不同区域的噪声像素采用不同的滤波器来恢复被随机值脉冲噪声损坏的像素。大量的实验结果表明,所提出的方法对自然图像或者医学图像中的RVIN都适用,并且在视觉和客观质量测量方面实质上要优于其他先进的RVIN滤波技术。In order to solve the above technical problems, the present invention proposes a method of RVIN detection and removal based on pixel clustering. In order to improve the generalization performance of the denoising algorithm and achieve rapid noise reduction while still retaining sufficient detailed information, the present invention The noise detector is based on the idea of grouping and clustering. It divides all pixels in the damaged image into several categories according to the characteristics of the pixels, and then identifies the noise of each group of pixels through adaptive thresholds; based on the noise detection results, the present invention proposes a Filters for partition decision-making use different filters for noise pixels in different areas to restore pixels damaged by random value impulse noise. A large number of experimental results show that the proposed method is suitable for RVIN in natural images or medical images, and is substantially better than other advanced RVIN filtering techniques in terms of visual and objective quality measurements.

为了达到上述目的,本发明的技术方案如下:In order to achieve the above objects, the technical solutions of the present invention are as follows:

一种基于像素聚类的RVIN检测和去除的方法,包括如下步骤:A method of RVIN detection and removal based on pixel clustering, including the following steps:

基于像素点的灰度距离相似性进行聚类分割,将受损图像中的所有像素分成K类;Cluster segmentation is performed based on the grayscale distance similarity of pixels, and all pixels in the damaged image are divided into K categories;

计算像素的LCI值并基于LCI值确定所述像素所处区域,所述区域包括平坦区域和细节区域,再通过迭代求解获取每类像素的最优检测阈值,根据像素的LCI值和最优检测阈值判断所述像素是否为噪声像素;Calculate the LCI value of the pixel and determine the area where the pixel is located based on the LCI value. The area includes flat areas and detailed areas, and then obtain the optimal detection threshold for each type of pixel through iterative solution. According to the LCI value of the pixel and the optimal detection The threshold determines whether the pixel is a noise pixel;

针对平坦区域和细节区域的噪声像素分别采用LCI加权均值滤波器和边缘方向滤波器来恢复被随机值脉冲噪声损坏的像素。The LCI weighted mean filter and the edge direction filter are used respectively for the noisy pixels in the flat area and the detailed area to restore the pixels damaged by the random value impulse noise.

优选地,所述聚类分割前还包括如下步骤:Preferably, the cluster segmentation also includes the following steps:

对图像进行平滑处理,所述平滑处理包括中值滤波和高斯滤波。The image is smoothed, including median filtering and Gaussian filtering.

优选地,所述基于像素点的灰度距离相似性进行聚类分割,所述聚类方法采用K-means聚类法,具体包括如下步骤:Preferably, the clustering is performed based on the gray distance similarity of pixels, and the clustering method adopts K-means clustering method, which specifically includes the following steps:

寻找K个聚类中心μk(k=1,…,K),将受损图像中的所有像素分配到距离最近的聚类中心,使得每个像素点与其相应的聚类中心的一维距离的平方和最小,其中一维距离指二者的灰度差值,引入二值变量rnk∈{0,1}来表示受损图像中某一个像素点xn对于聚类k的归属(其中n=1,...,N,k=1,…,K),如果像素点xn属于第k聚类,则rnk=1,否则为0,可定义如下损失函数:Find K cluster centers μ k (k=1,...,K), and assign all pixels in the damaged image to the nearest cluster center so that each pixel has a one-dimensional distance from its corresponding cluster center The sum of squares of n=1,...,N, k=1,...,K), if the pixel x n belongs to the kth cluster, then r nk =1, otherwise it is 0. The following loss function can be defined:

从上式可知,需要随机固定聚类中心μk初始值来求取使损失函数J最小的像素点的归属值rnk,给定像素点xn和聚类中心μk的灰度值,损失函数J是rnk的线性函数,由于xn与xn+1之间是相互独立,对于每一个像素点xn,只需将该点分配到距离最近的聚类中心,即It can be seen from the above formula that the initial value of the cluster center μ k needs to be randomly fixed to find the attribution value r nk of the pixel that minimizes the loss function J. Given the gray value of the pixel x n and the cluster center μ k , the loss Function J is a linear function of r nk . Since x n and x n+1 are independent of each other, for each pixel point x n , the point only needs to be assigned to the nearest cluster center, that is

利用公式(2)中求得的rnk带入公式(1)中求聚类中心μk,给定rnk的值,损失函数J是μk的二次函数,令J对μk的导数为0,可得Use r nk obtained in formula (2) and bring it into formula (1) to find the cluster center μ k . Given the value of r nk , the loss function J is the quadratic function of μ k . Let the derivative of J with respect to μ k is 0, we can get

通过上式可推出μk的取值为μk为属于该类里的像素点的灰度均值。From the above formula, it can be deduced that the value of μ k is μ k is the mean gray level of the pixels belonging to this category.

优选地,所述聚类方法采用均值漂移聚类法、基于密度的聚类法或高斯混合模型的最大期望聚类。Preferably, the clustering method adopts mean shift clustering method, density-based clustering method or maximum expectation clustering of Gaussian mixture model.

优选地,所述计算像素的LCI值是通过所述像素的邻域内同一类像素计算获得。Preferably, the LCI value of the calculated pixel is calculated and obtained by calculating the same type of pixels in the neighborhood of the pixel.

优选地,所述通过迭代求解获取每类像素的最优检测阈值,包括如下步骤:Preferably, obtaining the optimal detection threshold for each type of pixel through iterative solution includes the following steps:

将检测阈值从0历遍到1,计算图像去噪模型的目标函数,当目标函数最小时当前的检测阈值为最优检测阈值,所述目标函数如下所示:Traverse the detection threshold from 0 to 1, and calculate the objective function of the image denoising model. When the objective function is the smallest, the current detection threshold is the optimal detection threshold. The objective function is as follows:

其中,y为图像的任一像素,i,j为y的坐标,V(y)被称之为TV范数,作为保持图像边缘信息为目标的正则化方法。Among them, y is any pixel of the image, i, j are the coordinates of y, and V(y) is called the TV norm, which is a regularization method with the goal of maintaining image edge information.

优选地,所述LCI加权均值滤波器如下所示:Preferably, the LCI weighted mean filter is as follows:

其中,I'x表示滤波后的噪声像素x的灰度值,Y表示在噪声检测阶段被判断为非噪声的Ωx 0中的像素,Iy和LCIy分别表示Y的灰度值和LCI值。Among them, I' x represents the gray value of the filtered noise pixel x, Y represents the pixel in Ω value.

优选地,所述LCI加权均值滤波器的滤波窗口设置为5×5。Preferably, the filter window of the LCI weighted mean filter is set to 5×5.

优选地,所述针对细节区域的噪声像素采用边缘方向滤波器来恢复被随机值脉冲噪声损坏的像素,具体包括如下步骤:Preferably, the edge direction filter is used for noise pixels in detail areas to restore pixels damaged by random value impulse noise, which specifically includes the following steps:

对被判定为细节区域的噪声像素,以噪声像素为中心构建检测框;For noise pixels that are determined to be detail areas, a detection frame is constructed with the noise pixel as the center;

将检测框中以噪声像素为中心的所在行、列、左对角线和右对角线上的被判别为正常像素分别放入集合Dh,Dv,Dl,Dr集合中;Put the normal pixels in the row, column, left diagonal and right diagonal line centered on the noise pixel in the detection frame into the sets D h , D v , D l and D r respectively;

分别计算Dh,Dv,Dl,Dr集合中元素的标准差,选择标准差最小的集合所代表的方向作为边界滤波方向;Calculate the standard deviation of the elements in the D h , D v , D l , and D r sets respectively, and select the direction represented by the set with the smallest standard deviation as the boundary filtering direction;

将边界滤波方向中的正常像素的灰度值按升序或倒序排列,选举序列中的中位数作为中心噪声像素的新的灰度值。Arrange the grayscale values of the normal pixels in the boundary filtering direction in ascending or descending order, and select the median in the sequence as the new grayscale value of the central noise pixel.

优选地,所述边缘方向滤波器的滤波窗口设置为7×7。Preferably, the filter window of the edge direction filter is set to 7×7.

基于上述技术方案,本发明的有益效果是:本发明中噪声检测器基于分组聚类的思想,根据像素的特征对受损图像中的所有像素分成几类,再通过自适应阈值识别出每组像素的噪声;根据噪声检测结果,本发明提出了一种分区决策的滤波器,针对不同区域的噪声像素采用不同的滤波器来恢复被随机值脉冲噪声损坏的像素。本发明提出的噪声检测器和滤波器具有很高的鲁棒性和泛化性,在自然图像和医学图像的RVIN去除中均取得了显著的效果,特别是在高噪声水平上效果更优。Based on the above technical solution, the beneficial effects of the present invention are: the noise detector in the present invention is based on the idea of grouping and clustering, divides all pixels in the damaged image into several categories according to the characteristics of the pixels, and then identifies each group through adaptive thresholds Noise of pixels; based on the noise detection results, the present invention proposes a partition decision-making filter. Different filters are used for noise pixels in different areas to restore pixels damaged by random value impulse noise. The noise detector and filter proposed by the present invention have high robustness and generalization, and have achieved remarkable results in RVIN removal of natural images and medical images, especially at high noise levels.

附图说明Description of the drawings

图1是一个实施例中一种基于像素聚类的RVIN检测和去除的方法流程图;Figure 1 is a flow chart of a method for RVIN detection and removal based on pixel clustering in one embodiment;

图2是一个实施例中一种基于像素聚类的RVIN检测和去除的方法中聚类效果以及像素分类结果图,其中,图2(a)为K=4时噪声水平为50%的Lena图像聚类的效果图;图2(b)为区域A的像素分类结果,其中标红、标绿和标白的的像素表示它们隶属不同的;Figure 2 is a diagram of the clustering effect and pixel classification results of a method for RVIN detection and removal based on pixel clustering in one embodiment, wherein Figure 2(a) is a Lena image with a noise level of 50% when K=4 Clustering effect diagram; Figure 2(b) shows the pixel classification result of area A, in which the pixels marked in red, green and white indicate that they belong to different;

图3是一个实施例中一种基于像素聚类的RVIN检测和去除的方法中LENA受损图像噪声检测情况,其中,图3(a)为50%LENA受损图像;图3(b)为图3(a)中区域A的像素检测情况图;Figure 3 is a LENA damaged image noise detection situation in an RVIN detection and removal method based on pixel clustering in one embodiment, where Figure 3(a) is a 50% LENA damaged image; Figure 3(b) is Pixel detection situation diagram of area A in Figure 3(a);

图4是一个实施例中一种基于像素聚类的RVIN检测和去除的方法中6个实验测试图;Figure 4 is an example of six experimental test pictures of a method of RVIN detection and removal based on pixel clustering;

图5是一个实施例中噪声检测器在不同噪声水平的测试图像上的检测效果图;Figure 5 is a diagram of the detection effect of the noise detector on test images with different noise levels in one embodiment;

图6是一个实施例中50%的Lena图像修复对比图,其中,图6(a)为50%的Lena图像;图6(b)为修复后的Lena图像;Figure 6 is a comparison diagram of 50% Lena image repair in an embodiment, wherein Figure 6(a) is the 50% Lena image; Figure 6(b) is the repaired Lena image;

图7是60\%RVIN的船图像以及不同的恢复效果图,其中,图7(a)为60\%RVIN的船图像;图7(b)为采用AFWMF处理图7(a)后的效果图;图7(c)为采用ASMF处理图7(a)后的效果图;图7(d)为采用BDND处理图7(a)后的效果图;图7(e)为采用DWM处理图7(a)后的效果图;图7(f)为采用EAIF处理图7(a)后的效果图;图7(g)为采用EBDND处理图7(a)后的效果图;图7(h)为采用FRDFN处理图7(a)后的效果图;图7(i)为采用ROR-NLM处理图7(a)后的效果图;图7(j)为采用SBF处理图7(a)后的效果图;图7(k)为采用SDOOD处理图7(a)后的效果图;图7(1)为采用本申请方法处理图7(a)后的效果图;Figure 7 is a ship image of 60\%RVIN and different restoration effects. Figure 7(a) is a ship image of 60\%RVIN; Figure 7(b) is the effect of using AFWMF to process Figure 7(a). Figure; Figure 7(c) is the rendering after using ASMF to process Figure 7(a); Figure 7(d) is the rendering after using BDND to process Figure 7(a); Figure 7(e) is the rendering after using DWM processing The rendering after 7(a); Figure 7(f) is the rendering after using EAIF to process Figure 7(a); Figure 7(g) is the rendering after using EBDND to process Figure 7(a); Figure 7( h) is the rendering after using FRDFN to process Figure 7(a); Figure 7(i) is the rendering after using ROR-NLM to process Figure 7(a); Figure 7(j) is using SBF to process Figure 7(a) ); Figure 7(k) is the rendering after using SDOOD to process Figure 7(a); Figure 7(1) is the rendering after using the method of this application to process Figure 7(a);

图8是一个实施例中前列腺噪声图像的过滤效果图,其中,图8(a)为含有30%RVIN的前列腺图像;图8(b)为修复后的前列腺图像;Figure 8 is a filtering effect diagram of a prostate noise image in an embodiment, wherein Figure 8(a) is a prostate image containing 30% RVIN; Figure 8(b) is a repaired prostate image;

图9是一个实施例中头部噪声图像的过滤效果图,其中,图9(a)为含50%RVIN的头部图像;图9(b)为修复后的头部图像。Figure 9 is a filtering effect diagram of a head noise image in an embodiment, wherein Figure 9(a) is a head image containing 50% RVIN; Figure 9(b) is a repaired head image.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

如图1所示,本实施例提供一种基于像素聚类的RVIN检测和去除的方法,包括如下步骤:As shown in Figure 1, this embodiment provides a method for RVIN detection and removal based on pixel clustering, which includes the following steps:

步骤S101,基于像素点的灰度距离相似性进行聚类分割,将受损图像中的所有像素分成K类。Step S101: Cluster segmentation is performed based on the grayscale distance similarity of pixel points, and all pixels in the damaged image are divided into K categories.

其中,数据的聚类方法有均值漂移聚类法、基于密度的聚类法(DBSCAN)、高斯混合模型(GMM)的最大期望(EM)聚类等。在本实施例中采用较为常用K-means算法,因为其简单,收敛速度快。K-means图像聚类分割又称K均值聚类,利用无监督学习原理将像素点聚成几簇。具体原理如下:Among them, data clustering methods include mean shift clustering method, density-based clustering method (DBSCAN), Gaussian mixture model (GMM) expectation maximum (EM) clustering, etc. In this embodiment, the more commonly used K-means algorithm is used because it is simple and has fast convergence speed. K-means image clustering and segmentation, also known as K-means clustering, uses the principle of unsupervised learning to cluster pixels into several clusters. The specific principles are as follows:

定理1:给定D维欧几里得空间的一组数据{x1,...,xN},假设聚类个数K是已知,从欧几里得空间的角度出发,将距离较近的点聚为一个簇,不同簇的点之间的距离相对较远。Theorem 1: Given a set of data {x 1 ,...,x N } in D-dimensional Euclidean space, assuming that the number of clusters K is known, from the perspective of Euclidean space, the distance Closer points are grouped into a cluster, and points in different clusters are relatively far apart.

由定理1可知,需寻找K个聚类中心μk(k=1,...,K),将受损图像中的所有像素分配到距离最近的聚类中心,使得每个像素点与其相应的聚类中心的一维距离的平方和最小,其中这里的一维距离指二者的灰度差值。我们引入二值变量rnk∈{0,1}来表示受损图像中某一个像素点xn对于聚类k的归属(其中n=1,...,N,k=1,...,K),如果像素点xn属于第k聚类,则rnk=1,否则为0。如此,可定义如下损失函数:It can be seen from Theorem 1 that K cluster centers μ k (k=1,...,K) need to be found, and all pixels in the damaged image are assigned to the nearest cluster center so that each pixel corresponds to The sum of squares of the one-dimensional distance between the cluster centers is the smallest, where the one-dimensional distance here refers to the grayscale difference between the two. We introduce a binary variable r nk ∈ {0,1} to represent the belonging of a certain pixel x n in the damaged image to cluster k (where n=1,...,N, k=1,... ,K), if the pixel x n belongs to the kth cluster, then r nk =1, otherwise it is 0. In this way, the following loss function can be defined:

从公式1可知,需要随机固定聚类中心μk初始值来求取使损失函数J最小的像素点的归属值rnk。给定像素点xn和聚类中心μk的灰度值,损失函数J是rnk的线性函数,由于xn与xn+1之间是相互独立,对于每一个像素点xn,只需将该点分配到距离最近的聚类中心,即It can be seen from Formula 1 that the initial value of the cluster center μ k needs to be randomly fixed to find the attribution value r nk of the pixel that minimizes the loss function J. Given the gray value of pixel point x n and cluster center μ k , the loss function J is a linear function of r nk . Since x n and x n+1 are independent of each other, for each pixel point x n , only The point needs to be assigned to the nearest cluster center, that is

利用公式(2)中求得的rnk带入公式(1)中求聚类中心μk。给定rnk的值,损失函数J是μk的二次函数,令J对μk的导数为0,可得Use r nk obtained in formula (2) and bring it into formula (1) to find the cluster center μ k . Given the value of r nk , the loss function J is a quadratic function of μ k . Let the derivative of J with respect to μ k be 0, we can get

通过上式可推出μk的取值为μk为属于该类里的像素点的灰度均值。From the above formula, it can be deduced that the value of μ k is μ k is the mean gray level of the pixels belonging to this category.

经过上述步骤,图像的像素点会根据相似性进行聚类,其中像素点的相似性根据周围像素和中心簇像素的一维距离即二者的灰度差值进行计算,寻找与中心簇距离最小的像素点归为一类。根据K的取值,一张图像的像素点可以被聚类成K类。通过像素聚类能够精确的将复杂的图像纹理按照逻辑分开,实现类对类的处理,在一定程度上提升修复受损图像的能力。图2(a)展示了K取值为4时RVIN为50%的lena图像的聚类效果,从图中可以看出图像的像素被分成了四类,每类采用不同的颜色展示。同时,对于处于类与类之间的像素,由于聚类中已经把具有一定相似性的像素进行了分类,因此在计算其LCI的时,只需取其邻域内的同一类的像素计算LCI即可。如图2(b)展示了图2(a)中区域A的像素分类结果,对于中心像素x,其邻域中的24个像素里仅有8个像素(221,32,64,22,112,23,23,74)跟它属同一类,那么在计算中心像素x的LCI值时仅考虑这几个像素,以此增加边缘的先验知识。需要指出的是,由于K-means算法的抗干扰性较差,因此我们在对图像进行聚类分割之前,会先进行中值滤波和高斯滤波两种简单的滤波方式,减弱噪声对聚类效果的影响。After the above steps, the pixels of the image will be clustered based on similarity. The similarity of the pixels is calculated based on the one-dimensional distance between the surrounding pixels and the central cluster pixels, that is, the gray difference between the two. The minimum distance to the central cluster is found. pixels are grouped into one category. According to the value of K, the pixels of an image can be clustered into K categories. Through pixel clustering, complex image textures can be accurately separated logically, achieving class-to-class processing, and improving the ability to repair damaged images to a certain extent. Figure 2(a) shows the clustering effect of the lena image with an RVIN of 50% when the K value is 4. It can be seen from the figure that the pixels of the image are divided into four categories, and each category is displayed in a different color. At the same time, for pixels between classes, since the pixels with certain similarities have been classified in the clustering, when calculating its LCI, only the pixels of the same class in its neighborhood are used to calculate the LCI, that is Can. Figure 2(b) shows the pixel classification result of area A in Figure 2(a). For the central pixel x, there are only 8 pixels among the 24 pixels in its neighborhood (221,32,64,22,112,23 ,23,74) belong to the same category as it, then only these pixels are considered when calculating the LCI value of the center pixel x, so as to increase the prior knowledge of the edge. It should be pointed out that due to the poor anti-interference of the K-means algorithm, before clustering and segmenting the image, we will first perform two simple filtering methods, median filtering and Gaussian filtering, to weaken the effect of noise on clustering. Impact.

步骤S102,计算像素的LCI值并基于LCI值确定所述像素所处区域,所述区域包括平坦区域和细节区域,再通过迭代求解获取每类像素的最优检测阈值,根据像素的LCI值和最优检测阈值判断所述像素是否为噪声像素。Step S102, calculate the LCI value of the pixel and determine the area where the pixel is located based on the LCI value. The area includes a flat area and a detailed area, and then obtain the optimal detection threshold for each type of pixel through iterative solution. According to the LCI value of the pixel and The optimal detection threshold determines whether the pixel is a noise pixel.

本实施例中,计算像素的LCI值,具体计算方法如公式(4)-(7)所示:In this embodiment, the LCI value of the pixel is calculated. The specific calculation method is as shown in formulas (4)-(7):

公式(4)中Ωx 0为以像素x为中心的5×5邻域,y为邻域Ωx 0中的任一像素,ux和uy表示像素x和y的灰度值,(m,n)和(s,t)分别为像素x和y的坐标。σλandσs分别为预先设置好的高斯核函数的参数。公式(4)表示两个像素之间的相似度θ(x,y)跟它们的距离和灰度差有关。由公式(5)可以发现,当x为正常像素时,由于其与邻域中的其他每个正常像素相似度较高,ζx的值会较大,反之亦然。因此,通过观察中心像素x的ζx值可以评估其为正常像素的可能性。为了让统计量ζx具有更好的稳定性和判别性,通过公式(6)和(7)对其进行了归一化操作把它限制在领域内[0,1],最终得到了像素x的LCI值。LCI表征了像素是否为噪声的概率,当像素的LCI值越大,表示它越可能是正常像素。通过设置合适的阈值可以筛选出整幅受损图像的正常像素和噪声像素。为了获得最佳的检测效果,先利用LCI来判断像素处于平坦区域还是细节区域,再采用不同的LCI阈值来筛选出噪声。该方法具有计算简单的特点,不需要迭代即可快速检测出受损图像的RVIN。In formula (4), Ω x 0 is a 5×5 neighborhood centered on pixel x, y is any pixel in the neighborhood Ω x 0 , u x and u y represent the grayscale values of pixels x and y, ( m,n) and (s,t) are the coordinates of pixel x and y respectively. σ λ and σ s are the parameters of the preset Gaussian kernel function respectively. Formula (4) indicates that the similarity θ(x,y) between two pixels is related to their distance and grayscale difference. It can be found from formula (5) that when x is a normal pixel, due to its high similarity with every other normal pixel in the neighborhood, the value of ζx will be larger, and vice versa. Therefore, by observing the ζx value of the central pixel x, the possibility that it is a normal pixel can be evaluated. In order to make the statistic ζx have better stability and discriminability, it is normalized through formulas (6) and (7) to limit it to the field [0,1], and finally the pixel x is obtained. LCI value. LCI represents the probability of whether a pixel is noise. The larger the LCI value of a pixel, the more likely it is to be a normal pixel. By setting an appropriate threshold, normal pixels and noise pixels in the entire damaged image can be filtered out. In order to obtain the best detection effect, LCI is first used to determine whether the pixel is in a flat area or a detailed area, and then different LCI thresholds are used to filter out the noise. This method is computationally simple and can quickly detect RVIN of damaged images without iteration.

经过迭代计算后,图像的像素点会根据灰度距离的相似性被聚类成几种不同的簇。显然的,在不同簇中由于像素的灰度和所处的区域不同,对应的噪声检测阈值范围也会不同。因此,现在需要对不同类的像素点进行最优检测阈值的选取。对于二阶段去噪算法,噪声检测器效果越好,则滤波效果越好,这也就意味着最优检测阈值对应着最好的滤波效果。换句话说,TLCI最优检测阈值的选择其实是一个图像去噪模型优化问题的求解过程。After iterative calculation, the pixels of the image will be clustered into several different clusters based on the similarity of gray distances. Obviously, in different clusters, due to different grayscales and different regions of pixels, the corresponding noise detection threshold ranges will also be different. Therefore, it is now necessary to select optimal detection thresholds for different types of pixels. For the two-stage denoising algorithm, the better the noise detector, the better the filtering effect, which means that the optimal detection threshold corresponds to the best filtering effect. In other words, the selection of the optimal detection threshold of TLCI is actually a process of solving the image denoising model optimization problem.

由于像素LCI已经经过归一化处理,其值范围处于[0,1]之间,因此我们可以让检测阈值TLCI从0遍历到1(假设步长为0.1),同时计算图像去噪模型的目标函数,当目标函数最小时对应的TLCI值则为最优检测阈值。全变分模型常用于图像去噪的优化问题求解中,该模型主要依靠梯度下降法对图像进行平滑处理,我们希望在图像的内部对图像进行平滑,使得相邻像素的差值较小,而图像的轮廓(边缘)尽可能不去平滑,基于方向拉普拉斯正则化的图像去噪。因此,我们利用图像属于二维离散信号这一特点对图像进行全变分,如公式(8)所示:Since the pixel LCI has been normalized and its value range is between [0,1], we can let the detection threshold TLCI traverse from 0 to 1 (assuming the step size is 0.1) while calculating the target of the image denoising model function, when the objective function is the smallest, the corresponding TLCI value is the optimal detection threshold. The total variation model is often used to solve optimization problems of image denoising. This model mainly relies on the gradient descent method to smooth the image. We hope to smooth the image inside the image so that the difference between adjacent pixels is small, and The outline (edge) of the image is not smoothed as much as possible, and image denoising is based on directional Laplacian regularization. Therefore, we use the characteristic that the image is a two-dimensional discrete signal to perform total variation on the image, as shown in formula (8):

其中y为图像的任一像素,i,j为y的坐标。由于公式(8)全变分求解较为困难,因此二维全变分有另一种常用各向异性的定义:where y is any pixel of the image, i, j are the coordinates of y. Since it is difficult to solve the total variation of formula (8), there is another commonly used definition of anisotropy in two-dimensional total variation:

公式(9)中,V(y)被称之为TV范数,它可以作为保持图像边缘信息为目标的正则化方法,图像的TV值与矩阵的范数表示相同,图像的各项异性TV范数为矩阵的L1范数,图像的各项同性TV范数与矩阵的L2范数表示方法相同。因此当我们使用各向异性V(y)为模型的目标函数时,修复后图像V(y)值最小则图像的修复效果最佳,通过此方法我们可以确定噪声检测器的最优检测阈值TLCI。In formula (9), V(y) is called the TV norm, which can be used as a regularization method to maintain image edge information. The TV value of the image is the same as the norm representation of the matrix. The anisotropic TV of the image is The norm is the L1 norm of the matrix, and the isotropic TV norm of the image is expressed in the same way as the L2 norm of the matrix. Therefore, when we use anisotropy V(y) as the objective function of the model, the repaired image V(y) value is the smallest, and the image repair effect is the best. Through this method, we can determine the optimal detection threshold TLCI of the noise detector. .

因为通过K-means的方法将图像的像素分成K类,而同属一类的像素又分为处于平坦区域和复杂区域,因此需要利用迭代法选出2K个区域的最优的阈值,然后回复图像的同时计算其TV值(注意这里区域与区域之间相对独立)。经实验发现,随着检测阈值从0到1迭代,V(y)的值呈先降低后升高的变化趋势,因此存在一个阈值使V(y)最小,而此时的阈值也就是我们所需要的最优检测阈值。Because the pixels of the image are divided into K categories through the K-means method, and pixels belonging to the same category are divided into flat areas and complex areas, it is necessary to use an iterative method to select the optimal thresholds for 2K areas, and then restore the image while calculating its TV value (note that the regions here are relatively independent from each other). Experiments have found that as the detection threshold iterates from 0 to 1, the value of V(y) shows a trend of first decreasing and then increasing. Therefore, there is a threshold to minimize V(y), and the threshold at this time is what we call required optimal detection threshold.

步骤S103,针对平坦区域和细节区域的噪声像素分别采用LCI加权均值滤波器和边缘方向滤波器来恢复被随机值脉冲噪声损坏的像素。Step S103: Use the LCI weighted mean filter and the edge direction filter respectively for the noise pixels in the flat area and the detail area to restore the pixels damaged by the random value impulse noise.

本实施例中,在滤波阶段应根据噪声像素所处的不同区域来采用不同的滤波器。设计了一个更稳健的分区决策滤波器来去除RVIN,而不是使用现有的中值或改进中值滤波器。所提出的分区决策滤波器针同时考虑了图像特征和和噪声所处的区域,并且只选择中心像素邻域中被判断为是正常的像素来对中心像素进行滤波,因此它更适合去除RVIN噪声。In this embodiment, different filters should be used in the filtering stage according to different areas where the noise pixels are located. A more robust partition decision filter is designed to remove RVIN instead of using the existing median or improved median filter. The proposed partition decision filter takes into account both the image characteristics and the area where the noise is located, and only selects pixels judged to be normal in the neighborhood of the central pixel to filter the central pixel, so it is more suitable for removing RVIN noise. .

对于被判断为处于平坦区域的噪声像素,通过LCI加权均值滤波器对其进行修复。该LCI加权均值滤波器如下所示:For noise pixels judged to be in flat areas, they are repaired through the LCI weighted mean filter. The LCI weighted mean filter looks like this:

其中,I'x表示滤波后的噪声像素x的灰度值,Y表示在噪声检测阶段被判断为非噪声的Ωx 0中的像素,Iy和LCIy分别表示Y的灰度值和LCI值。采用像素的LCI值作为滤波器中各像素的权重是因为LCI表征像素是正常像素的概率,如果像素的LCI值越大,表明它更可能是正常像素,那么应给与他更多的权重来参与中心噪声像素的修复。考虑到平坦区域的像素灰度分布平滑,滤波器的窗口设置过大容易引入边缘区域的像素,因此LCI加权均值滤波器的滤波窗口设置为5×5。Among them, I' x represents the gray value of the filtered noise pixel x, Y represents the pixel in Ω value. The LCI value of a pixel is used as the weight of each pixel in the filter because LCI represents the probability that a pixel is a normal pixel. If the LCI value of a pixel is larger, it indicates that it is more likely to be a normal pixel, so it should be given more weight. Participate in the repair of center noise pixels. Considering that the pixel grayscale distribution in the flat area is smooth, if the filter window is set too large, it is easy to introduce pixels in the edge area, so the filter window of the LCI weighted mean filter is set to 5×5.

对于被判断为处于细节区域(边缘区域)的噪声像素,其邻域范围内的像素灰度变化剧烈,但是由于边缘的特性,在该邻域中总会存在某一方向的像素的灰度差异较小。因此,我们设计了一种基于最小梯度差的中位数滤波器,具体处理过程如下:For noise pixels that are judged to be in detail areas (edge areas), the grayscale of pixels in its neighborhood changes drastically. However, due to the characteristics of the edge, there will always be a grayscale difference of pixels in a certain direction in this neighborhood. smaller. Therefore, we designed a median filter based on the minimum gradient difference. The specific process is as follows:

步骤S131,对被判定为细节区域的噪声像素,以噪声像素为中心构建7×7的检测框;Step S131: For the noise pixels determined to be detail areas, construct a 7×7 detection frame centered on the noise pixels;

步骤S132,将检测框中以噪声像素为中心的所在行、列、左对角线和右对角线上的被判别为正常像素分别放入集合Dh,Dv,Dl,Dr集合中;Step S132, put the normal pixels in the row, column, left diagonal and right diagonal line centered on the noise pixel in the detection frame into the set D h , D v , D l and D r respectively. middle;

步骤S133,分别计算Dh,Dv,Dl,Dr集合中元素的标准差,选择标准差最小的集合所代表的方向作为边界滤波方向;Step S133, calculate the standard deviation of the elements in the D h , D v , D l , and D r sets respectively, and select the direction represented by the set with the smallest standard deviation as the boundary filtering direction;

步骤S134,将边界滤波方向中的正常像素的灰度值按升序或倒序排列,选举序列中的中位数作为中心噪声像素的新的灰度值。Step S134: Arrange the grayscale values of the normal pixels in the boundary filtering direction in ascending or reverse order, and select the median in the sequence as the new grayscale value of the central noise pixel.

从图3(a)的50%的LENA受损图像选择一块处于边缘的区域A,该区域对应的像素灰度分布情况如图3(b)所示。该区域四方向集合中的元素分别为Dh=[56,95,211],Dv=[106,107,99,85,72],Dl=[90,80,215],Dr=[147,117,67,54,38]。从标准差中可知Dv方向为边界线,从图中也可得知此条边界线方向和我们计算所得的边界线方向相符合。然后经过中值滤波后中心像素的灰度值为Dv集合中的99,跟该像素点的有效正确数据91非常接近。需要指出的是,如果中位数滤波器的窗口过小,那么在边缘方向上的正常像素可能会很少,这导致图像容易出现毛刺,影响滤波效果,因此我们将改进的中位数滤波器的窗口设置为7×7。Select an edge area A from the 50% LENA damaged image in Figure 3(a), and the corresponding pixel grayscale distribution of this area is shown in Figure 3(b). The elements in the four-direction set of this area are D h =[56,95,211], D v =[106,107,99,85,72], D l =[90,80,215], D r =[147,117,67,54 ,38]. From the standard deviation, we can know that the direction of D v is the boundary line. From the figure, we can also know that the direction of this boundary line is consistent with the direction of the boundary line calculated by us. Then after median filtering, the gray value of the central pixel is 99 in the D v set, which is very close to the effective and correct data 91 of the pixel. It should be pointed out that if the window of the median filter is too small, there may be very few normal pixels in the edge direction, which causes the image to be prone to burrs and affects the filtering effect. Therefore, we will improve the median filter. The window is set to 7×7.

实验experiment

在标准自然图像和医学图像上做了大量的实验,测试图像如图4所示,除了图4(c)房子图像的尺寸为256×256,其余的图像尺寸均为512×512。A large number of experiments have been done on standard natural images and medical images. The test images are shown in Figure 4. Except for the house image in Figure 4(c), which is 256×256, the other image sizes are 512×512.

1、参数设置1. Parameter settings

尽管提出的滤波器是基于LCI检测器改进的,但是比原方法减少了很多不必要的参数。对于公式(1)中的参数σλandσs,和用于检测噪声像素处于细节还是纹理区域的参数,我们在原文献给出的取值的基础上进行了微调,其中σλandσs的值分别为1.3和7.1。至于分类参数K,显而易见的,对受损图像分块越多,噪声检测效果越好,但是同时会增加算法的时间成本和复杂度。我们对噪声水平50的pepper图像,分2~6块的实验来验证块的数量对噪声检测的影响,实验数据如表1所示,可以发现分类参数的取值为4的时候,各项指标基本达到最优。Although the proposed filter is improved based on the LCI detector, it reduces many unnecessary parameters than the original method. For the parameters σ λ andσ s in formula (1), and the parameters used to detect whether the noise pixel is in the detail or texture area, we have made fine adjustments based on the values given in the original literature, where the values of σ λ andσ s are respectively are 1.3 and 7.1. As for the classification parameter K, it is obvious that the more blocks the damaged image is divided into, the better the noise detection effect will be, but at the same time it will increase the time cost and complexity of the algorithm. We conducted experiments on pepper images with a noise level of 50 from 2 to 6 blocks to verify the impact of the number of blocks on noise detection. The experimental data are shown in Table 1. It can be found that when the value of the classification parameter is 4, various indicators Basically reach the optimal level.

表1划分不同类的情况下的噪声检测情况Table 1 Noise detection situation when dividing different categories

KK missmiss FALSEFALSE totaltotal psnrpsnr ssimssim 22 53145314 1530615306 2062020620 27.8327.83 0.860.86 33 55885588 1437814378 1996619966 28.1228.12 0.880.88 44 61306130 1274512745 1887518875 28.6628.66 0.920.92 55 62126212 1244312443 1865518655 28.6828.68 0.920.92 66 62666266 1210912109 1837518375 28.7128.71 0.930.93

2、噪声检测器的性能2. Performance of noise detector

由于噪声检测器的检测准确率对滤波器的噪声去除能力影响很大,一个好的噪声检测器应具有较少的漏检像素、误检像素(MD and FD)和较高的真实检测到噪声像素的准确率(true hit)。表2和图5展示了提出的噪声检测器在不同噪声水平的测试图像上的检测效果。从表2可以看出,对于一些图像纹理较少、像素灰度分布较为简单的图像效果会更好,如lena,pepper,前列腺和脑部图像,其MD和FD数量比其他图像要少很多,这是因为平坦区域的噪声像素要比边缘区域的噪声像素更容易检测。尽管baboon,Barbara,boat和bridge这些包含更多细节和纹理的图像在低噪声水平时候的表现要差一些,但从图5可以看出随着噪声水平的提高,图像中噪声像素的检出率在逐步提升,这是由于图像中的正常像素越来越少,检测窗口中的像素灰度分布差异很大,中心像素如果为噪声,那么它跟其邻域中的像素相异程度更加明显,因此更容易被检测出为噪声。甚至在噪声水平达到80%的时候,几乎所有图像的truth hit都在90%以上,这表明了我们提出的噪声检测器具有很好的稳定性和鲁棒性。Since the detection accuracy of the noise detector has a great influence on the noise removal ability of the filter, a good noise detector should have fewer missed pixels, falsely detected pixels (MD and FD) and higher real detected noise. Pixel accuracy (true hit). Table 2 and Figure 5 show the detection effects of the proposed noise detector on test images with different noise levels. It can be seen from Table 2 that the effect will be better for some images with less texture and simpler pixel grayscale distribution, such as lena, pepper, prostate and brain images, whose MD and FD numbers are much less than other images. This is because noisy pixels in flat areas are easier to detect than noise pixels in edge areas. Although images such as baboon, Barbara, boat and bridge, which contain more details and textures, perform worse at low noise levels, it can be seen from Figure 5 that as the noise level increases, the detection rate of noise pixels in the image increases. Gradually improving, this is because there are fewer and fewer normal pixels in the image, and the grayscale distribution of pixels in the detection window is very different. If the central pixel is noise, then the difference between it and the pixels in its neighborhood will be more obvious. Therefore it is easier to detect as noise. Even when the noise level reaches 80%, the truth hit of almost all images is above 90%, which demonstrates the good stability and robustness of our proposed noise detector.

表2 RVIN.该噪声检测器对30%到80%RVIN的不同图像的检测结果Table 2 RVIN. Detection results of this noise detector on different images from 30% to 80% RVIN

通常,对于灰度图像,如果像素值与其相邻像素值之间的绝对差值小于8,则不明显。换句话说,当噪声像素的灰度值跟其原来的真实值相差在8以内时,对于人眼或者噪声检测器都很难分辨出来,它们的存在也不会给图像质量带来明显的降低,因此对于这一部分噪声像素我们可视它们为正常像素。基于这一前提,我们统计了噪声水平为40%~60%的lena,pepper,芭芭拉和大猩猩的漏检像素的灰度跟它们真实值的差异情况,如表3所示,其中D表示噪声像素的新值和真实值之差。从表3可以看出,这些图像大部分的漏检噪声像素灰度值都跟其真实值相差在8bit内,这进一步验证了提出的噪声检测器具有较高的噪声检测准确率。Generally, for grayscale images, it is not noticeable if the absolute difference between a pixel value and its neighboring pixel values is less than 8. In other words, when the gray value of the noise pixel differs within 8 from its original true value, it is difficult for the human eye or the noise detector to distinguish it, and their existence will not significantly reduce the image quality. , so for this part of noise pixels we can regard them as normal pixels. Based on this premise, we calculated the difference between the grayscale of the missed pixels of lena, pepper, barbara and gorilla with the noise level of 40% to 60% and their true values, as shown in Table 3, where D Represents the difference between the new value and the true value of the noise pixel. As can be seen from Table 3, the grayscale values of most of the missed noise pixels in these images are within 8 bits of their true values, which further verifies that the proposed noise detector has a high noise detection accuracy.

表3噪声水平为40%~60%的不同图像的漏检像素的灰度跟真实值的差异情况Table 3 The difference between the grayscale of missed pixels and the true value in different images with noise levels of 40% to 60%

为了客观评价提出的噪声检测器的性能,我们将其与最新提出的和经典的几种算法进行比较,实验结果如表4所示。需要指出的是,对于其他噪声检测算法的FD和MD值,选取了它们文献中提到的最佳值。从表4可以发现,尽管有些方法如Luo,s具有很低的误判数,其漏检像素的数量却非常高,这会导致图像中存在较多的毛刺,影响后续滤波器的恢复性能。而提出的噪声检测器在不同噪声水平下的total数都是最优。实际上,随着噪声水平的提高,MD也逐渐达到最优,这意味着本方法是非常鲁棒的,当噪声密度变得很高时,检测器仍能检测出更多的噪声像素。直观上来说,一个好的噪声检测器应能在尽可能减少误判的同时检测出更多的噪声像素,因此综合几个评价指标来看,我们认为提出的噪声检测器比起其他的方法具有更好的性能。此外,从LCI和提出的滤波器的对比结果也可以发现,随着噪声水平提高,提出的滤波器和LCI的效果差距更加明显,这表明我们针对LCI提出的改进对于检测性能具有明显和实质性的提高。In order to objectively evaluate the performance of the proposed noise detector, we compare it with several newly proposed and classic algorithms. The experimental results are shown in Table 4. It should be pointed out that for the FD and MD values of other noise detection algorithms, the best values mentioned in their literature were selected. It can be found from Table 4 that although some methods such as Luo,s have a low number of false positives, the number of missed pixels is very high, which will lead to more burrs in the image and affect the recovery performance of subsequent filters. The total number of the proposed noise detector is optimal under different noise levels. In fact, as the noise level increases, MD gradually reaches the optimum, which means that this method is very robust and the detector can still detect more noise pixels when the noise density becomes very high. Intuitively speaking, a good noise detector should be able to detect more noise pixels while reducing misjudgments as much as possible. Therefore, based on several evaluation indicators, we believe that the proposed noise detector has better performance than other methods. Better performance. In addition, it can also be found from the comparison results between LCI and the proposed filter that as the noise level increases, the effect gap between the proposed filter and LCI becomes more obvious, which shows that the improvements we proposed for LCI have obvious and substantial effects on detection performance. improvement.

表4比较了不同噪声水平下RVIN污染的Lena图像的检测结果Table 4 compares the detection results of RVIN contaminated Lena images under different noise levels.

3、滤波器在自然图像上的恢复性能3. Filter recovery performance on natural images

为了验证提出的分区决策滤波器的有效性和合理性,我们对50%RVIN的lena图像进行修复,如图6(a)和图6(b)所示。同时,从图像中选取了尺寸为12×12的平坦区域A和细节区域B,将滤波前后的对应像素灰度值展示在图6(c-f)中,其中,图6(c)和图6(d)分别表示滤波前平坦区域A和细节区域B的像素灰度分布,其中灰色标记的像素是噪声,括号中的值是它们的真实值,图6(e)和图6(f)分别表示滤波后平坦区域A和细节区域B的像素灰度分布。通过放大图6(b)中可以发现图像没有明显的毛刺或者残留的噪声团块,这得益于提出的噪声检测器很好的检测出了受损图像中的噪声。正如表3所示的,虽然有6800个噪声像素没被检测出来,但有一半噪声的灰度值跟原值相差很小,因此在视觉上并没有被明显的观测到。从图6(c-f)的对比可以看出,无论是在平坦区域还是细节区域,大部分的噪声像素都被检测出来,而且恢复后的像素灰度值跟真实值十分接近。虽然对于有些被误判为噪声的正常像素,在被滤波后其新值也跟原值相差不大。需要指出的是,细节区域的检测和滤波效果要明显逊色于平坦区域的,比如滤波后平坦区域A里的144个像素跟真实值的误差全部在±3内,而细节区域B里约有37个在±8以上。这是由于边缘和纹理细节的像素灰度分布更加复杂,但从图6(b)的恢复效果来看,提出的滤波器还是较好的保留和还原了图像中的纹理和边缘,没有存在明显的图像模糊现象,这表明我们分区域滤波方法的合理性和有效性。In order to verify the effectiveness and rationality of the proposed partition decision filter, we repair the lena image of 50% RVIN, as shown in Figure 6(a) and Figure 6(b). At the same time, a flat area A and a detailed area B with a size of 12×12 were selected from the image, and the corresponding pixel grayscale values before and after filtering are shown in Figure 6(c-f), where Figure 6(c) and Figure 6( d) Represents the pixel grayscale distribution of the flat area A and detail area B before filtering respectively. The pixels marked in gray are noise, and the values in brackets are their true values. Figure 6(e) and Figure 6(f) respectively represent Pixel grayscale distribution of flat area A and detailed area B after filtering. By zooming in on Figure 6(b), it can be found that there are no obvious burrs or residual noise clumps in the image. This is due to the fact that the proposed noise detector can well detect the noise in the damaged image. As shown in Table 3, although there are 6800 noise pixels that have not been detected, the gray value of half of the noise is very different from the original value, so it is not clearly observed visually. From the comparison in Figure 6(c-f), it can be seen that most of the noise pixels are detected whether in flat areas or detailed areas, and the restored pixel gray values are very close to the real values. Although for some normal pixels that are misjudged as noise, their new values are not much different from the original values after being filtered. It should be pointed out that the detection and filtering effects of detailed areas are significantly inferior to those of flat areas. For example, the 144 pixels in the flat area A after filtering all have an error of ±3 from the true value, while the error in the detailed area B is about 37 Each is above ±8. This is because the pixel grayscale distribution of edge and texture details is more complex. However, judging from the recovery effect in Figure 6(b), the proposed filter still retains and restores the texture and edges in the image better, without any obvious The image blur phenomenon shows the rationality and effectiveness of our regional filtering method.

为了客观评价提出的滤波器的性能,我们选择PSNR和SSIM指标将其与主流的几种滤波器进行比较,其中PSNR用于衡量原始图像和重建图像之间的异同,SSIM用于表征滤波器关注细节保存特征的能力。需要指出的是,对于其他滤波器的PSNR和SSIM值,选取了它们文献中提到的最佳值。从表5的PSNR对比结果可以发现,除了在boat图像上,所提出的滤波器要稍微逊色于AEPWM,但是在其他图像尤其是在50~60的噪声水平下,提出的滤波器表现更加突出。同时,随着噪声水平的提高,提出的滤波器的峰值信噪比值要比AEPWM和其他滤波器衰减的更慢,这得益于我们设计的噪声检测器在高噪声水平下能检测出更多的噪声,表明我们的方法具有很好的鲁棒性。在表6的SSIM对比结果中,除了在bridge图像上要略低于ROR-NLM,提出的滤波器在其它图像上的表现均明显优于其他滤波算法,这表明提出的滤波器能更好的保留图像中的边缘和其他细节方面。In order to objectively evaluate the performance of the proposed filter, we choose PSNR and SSIM indicators to compare it with several mainstream filters, where PSNR is used to measure the similarities and differences between the original image and the reconstructed image, and SSIM is used to characterize the filter attention. The ability of details to preserve characteristics. It should be pointed out that for the PSNR and SSIM values of other filters, the best values mentioned in their literature were selected. From the PSNR comparison results in Table 5, we can find that except for the boat image, the proposed filter is slightly inferior to AEPWM, but in other images, especially at the noise level of 50 to 60, the performance of the proposed filter is more outstanding. At the same time, as the noise level increases, the peak signal-to-noise ratio value of the proposed filter attenuates more slowly than AEPWM and other filters. This is due to the fact that the noise detector we designed can detect more noise under high noise levels. There is a lot of noise, which shows that our method has good robustness. In the SSIM comparison results in Table 6, except for the bridge image which is slightly lower than ROR-NLM, the performance of the proposed filter on other images is significantly better than other filtering algorithms, which shows that the proposed filter can perform better Preserves edges and other detailed aspects in images.

表5 40%~60%RVIN图像的峰值信噪比恢复结果比较Table 5 Comparison of peak signal-to-noise ratio recovery results for 40% to 60% RVIN images

表6 40%~60%RVIN40%~60%RVIN图像在SSIM中恢复效果的比较Table 6 Comparison of the recovery effects of 40%~60%RVIN40%~60%RVIN images in SSIM

同样的,也选取了几种主流的滤波算法来比较滤波器在视觉输出上的效果。如图7所示,可以发现ASMF,DWM,EAIF和SBF中仍存在较多较明显的噪声图像,而SD-OOD的恢复图像存在着明显的模糊现象,ROR-NLM和AFWMF效果相对要好一些,但是在一些边缘和细节的地方没能很好的保留,BDND、EBDND和FRDFN处理效果差。相比之下,如图7(l)所示,本申请采用的方法产生的结果有非常好的视觉质量,不仅图像中没有存在明显的噪声团块和毛刺,通过放大图像中的一些细节区域可以发现,我们的滤波方法比其他方法更好的保留了船体的线条和色彩,这要得益于噪声检测器的高检测准确率和滤波器的分区滤波设计。可以认为,对于噪声密度为60%的复杂图像,我们的方法仍然可以检测出和去除大部分的噪声像素,并保留大部分的图像细节。Similarly, several mainstream filtering algorithms were also selected to compare the effects of filters on visual output. As shown in Figure 7, it can be found that there are still many obvious noise images in ASMF, DWM, EAIF and SBF, while the restored image of SD-OOD has obvious blurring phenomenon, and the effects of ROR-NLM and AFWMF are relatively better. However, some edges and details are not well preserved, and the processing effects of BDND, EBDND and FRDFN are poor. In contrast, as shown in Figure 7(l), the results produced by the method used in this application have very good visual quality. Not only are there no obvious noise clumps and burrs in the image, but also by enlarging some detailed areas in the image It can be found that our filtering method preserves the lines and colors of the hull better than other methods, thanks to the high detection accuracy of the noise detector and the partitioned filtering design of the filter. It can be considered that for complex images with a noise density of 60%, our method can still detect and remove most of the noise pixels and retain most of the image details.

4、滤波器在医学图像上的恢复性能4. Restoration performance of filters on medical images

如图8所示的前列腺噪声图像的过滤效果图和图9所示的头部噪声图像的过滤效果图,可以看出,提出的去噪算法能够在不同RVIN强度下恢复不同纹理和分辨率的生物医学图像。从复原后的医学图像也可以直观地观察到具有良好的纹理和边缘保持能力,这有助于保证后续正确的诊断和治疗。As shown in the filtering effect diagram of the prostate noise image shown in Figure 8 and the filtering effect diagram of the head noise image shown in Figure 9, it can be seen that the proposed denoising algorithm can restore different textures and resolutions under different RVIN intensities. Biomedical images. It can also be intuitively observed from the restored medical images that they have good texture and edge preservation capabilities, which helps ensure correct subsequent diagnosis and treatment.

以上所述仅为本发明所公开的一种基于像素聚类的RVIN检测和去除的方法的优选实施方式,并非用于限定本说明书实施例的保护范围。凡在本说明书实施例的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本说明书实施例的保护范围之内。The above description is only a preferred implementation of the RVIN detection and removal method based on pixel clustering disclosed in the present invention, and is not intended to limit the scope of protection of the embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of this specification shall be included in the protection scope of the embodiments of this specification.

Claims (9)

1. A method for RVIN detection and removal based on pixel clustering, comprising the steps of:
clustering and segmentation are carried out based on the gray distance similarity of the pixel points, and all pixels in the damaged image are classified into K classes;
calculating LCI values of pixels, determining an area where the pixels are located based on the LCI values, wherein the area comprises a flat area and a detail area, obtaining an optimal detection threshold value of each type of pixels through iterative solution, and judging whether the pixels are noise pixels or not according to the LCI values of the pixels and the optimal detection threshold value, wherein the LCI value calculating method comprises the following steps:
omega in equation (4) x 0 Is a 5×5 neighborhood centered on pixel x, and y is a neighborhood Ω x 0 Any one of the pixels, u x And u y The gray values (m, n) and (s, t) representing the pixels x and y are the coordinates, σ, of the pixels x and y, respectively λ Sum sigma s Parameters of a preset Gaussian kernel function are respectively set; θ (x, y) is the similarity between pixels x and y; ζx is a statistic for evaluating the likelihood that the center pixel x is a normal pixel; normalization by equations (6) and (7) limits the result to [0,1]]In the range of (2), the LCI value of the pixel x is finally obtained;
noise pixels for flat and detail regions are recovered with LCI weighted mean filters and edge direction filters, respectively, to recover pixels corrupted by random value impulse noise, as follows:
wherein I' x A gray value representing the noise pixel x after filtering, y representing Ω determined to be non-noise in the noise detection stage x 0 Pixels in (I) y And LCI y The gray value and LCI value of y are represented, respectively.
2. The method of pixel cluster-based RVIN detection and removal of claim 1, further comprising the steps of, prior to cluster segmentation:
the image is smoothed, which includes median filtering and gaussian filtering.
3. The method for detecting and removing RVIN based on pixel clustering according to claim 1, wherein the clustering segmentation is performed based on gray distance similarity of pixel points, and the clustering method adopts a K-means clustering method, and specifically comprises the following steps:
find K cluster centers μ k (k=1, …, K) assigning all pixels in the corrupted image to the nearest cluster center such that the sum of squares of the one-dimensional distances of each pixel point from its corresponding cluster center, where one-dimensional distance refers to the gray difference of the two, introducing a binary variable r nk E {0,1} to represent a pixel point x in the corrupted image n For the assignment of cluster K (where n=1, …, N, k=1,..k), if pixel point x n Belonging to the kth cluster, r nk =1, otherwise 0, the following loss function can be defined:
from the above, it is known that the cluster center μ needs to be fixed randomly k The initial value is used for obtaining the attribution value r of the pixel point minimizing the loss function J nk Given pixel point x n And cluster center mu k Is the gray value of (1), the loss function J is r nk Due to the linear function of x n And x n+1 Are mutually independent, for each pixel point x n Only the point needs to be allocated to the nearest cluster center, i.e
Using r obtained in the formula (2) nk Carrying out clustering center mu in formula (1) k Given r nk Is a value of mu, the loss function J is k To make J vs. mu k The derivative of (2) is 0, and can be obtained
Mu can be pushed out by the above method k The value of (2) isμ k The gray average value of the pixel points belonging to the class.
4. A method of pixel clustering based RVIN detection and removal as claimed in claim 3, wherein the clustering method employs mean shift clustering, density based clustering or maximum expected clustering of gaussian mixture models.
5. The method of claim 1, wherein the LCI values of the computed pixels are computed from the same class of pixels in the neighborhood of the pixel.
6. The method for RVIN detection and removal based on pixel clustering as claimed in claim 1, wherein said obtaining the optimal detection threshold for each type of pixel by iterative solution includes the steps of:
traversing the detection threshold from 0 to 1, calculating an objective function of the image denoising model, and when the objective function is minimum, the current detection threshold is the optimal detection threshold, wherein the objective function is as follows:
where y is any pixel of an image, i, j is the coordinate of y, V (y) is called TV norm, and is a regularization method for keeping image edge information as a target.
7. The method of pixel cluster based RVIN detection and removal of claim 1, wherein the LCI weighted mean filter has a filter window set to 5 x 5.
8. A method of RVIN detection and removal based on pixel clustering as claimed in claim 1, wherein the noisy pixels for detail areas employ an edge direction filter to recover pixels corrupted by random value impulse noise, comprising the steps of:
constructing a detection frame with noise pixels which are judged to be detail areas as centers;
the pixels which are distinguished as normal on the row, the column, the left diagonal and the right diagonal and are centered on the noise pixel in the detection frame are respectively put into a set D h ,D v ,D l ,D r In the collection;
respectively calculate D h ,D v ,D l ,D r The standard deviation of the elements in the set, and selecting the direction represented by the set with the smallest standard deviation as the boundary filtering direction;
the gray values of normal pixels in the boundary filtering direction are arranged in an ascending order or an inverse order, and the median in the election sequence is used as a new gray value of the central noise pixel.
9. The method of pixel cluster based RVIN detection and removal of claim 8, wherein the filtering window of the edge direction filter is set to 7 x 7.
CN202210539711.0A 2022-05-17 2022-05-17 RVIN detection and removal method based on pixel clustering Active CN114998632B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210539711.0A CN114998632B (en) 2022-05-17 2022-05-17 RVIN detection and removal method based on pixel clustering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210539711.0A CN114998632B (en) 2022-05-17 2022-05-17 RVIN detection and removal method based on pixel clustering

Publications (2)

Publication Number Publication Date
CN114998632A CN114998632A (en) 2022-09-02
CN114998632B true CN114998632B (en) 2023-10-24

Family

ID=83026976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210539711.0A Active CN114998632B (en) 2022-05-17 2022-05-17 RVIN detection and removal method based on pixel clustering

Country Status (1)

Country Link
CN (1) CN114998632B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5025476A (en) * 1988-10-31 1991-06-18 Nathaniel Gould Diagnostics, Inc. Redotopography apparatus and method using moire fringe analysis to measure foot shapes
US5148155A (en) * 1990-11-13 1992-09-15 Wang Laboratories, Inc. Computer with tablet input to standard programs
CN106815806A (en) * 2016-12-20 2017-06-09 浙江工业大学 Single image SR method for reconstructing based on compressed sensing and SVR

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3719461A1 (en) * 2019-04-03 2020-10-07 Mecwins, S.A. Biosensor platform and method for the simultaneous, multiplexed, ultra-sensitive and high throughput optical detection of biomarkers

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5025476A (en) * 1988-10-31 1991-06-18 Nathaniel Gould Diagnostics, Inc. Redotopography apparatus and method using moire fringe analysis to measure foot shapes
US5148155A (en) * 1990-11-13 1992-09-15 Wang Laboratories, Inc. Computer with tablet input to standard programs
CN106815806A (en) * 2016-12-20 2017-06-09 浙江工业大学 Single image SR method for reconstructing based on compressed sensing and SVR

Also Published As

Publication number Publication date
CN114998632A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN111985329B (en) Remote sensing image information extraction method based on FCN-8s and improved Canny edge detection
CN106910169B (en) A Method of Removing Salt and Pepper Noise from Image to Prevent Blurred Edges
Wang et al. Iterative non-local means filter for salt and pepper noise removal
CN108416789A (en) Method for detecting image edge and system
CN109461163B (en) Edge detection method for magnetic resonance standard water model
CN108765332B (en) A Non-local Mean Denoising Method with Ellipse Search Window and Parameter Adaptive
Sulaiman et al. Denoising-based clustering algorithms for segmentation of low level salt-and-pepper noise-corrupted images
CN105913396A (en) Noise estimation-based image edge preservation mixed de-noising method
CN115661135A (en) Focus region segmentation method for cardio-cerebral angiography
CN107169962B (en) Gray level image fast segmentation method based on space density constraint kernel fuzzy clustering
CN113989168B (en) Self-adaptive non-local mean value filtering method for spiced salt noise
CN110675340A (en) Single image defogging method and medium based on improved non-local prior
CN113344810B (en) Image enhancement method based on dynamic data distribution
CN106910170B (en) A kind of minimizing technology of image salt-pepper noise
CN109377450A (en) An edge-preserving denoising method
CN103400357A (en) Method for removing salt-pepper noises in images
CN117745751B (en) Pulmonary tuberculosis CT image segmentation method based on feature extraction
CN115908154A (en) Video late-stage particle noise removing method based on image processing
Alhatami et al. Advanced fuzzy denoising technique for agricultural remote sensing: Modified partition filter for suppressing impulsive
CN105590301A (en) Impulse noise elimination method of self-adaption normal-inclined double cross window mean filtering
CN116912115A (en) Underwater image self-adaptive enhancement method, system, equipment and storage medium
CN104751426A (en) High density impulse noise removing method based on three dimensional block match switching
Ali A new method to remove salt & pepper noise in Magnetic Resonance Images
CN109242797B (en) Image denoising method, system and medium based on fusion of homogeneous and heterogeneous regions
CN114998632B (en) RVIN detection and removal method based on pixel clustering

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
GR01 Patent grant
GR01 Patent grant