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
image
clustering
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 Processing (AREA)
  • Image Analysis (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 detection and removal method based on pixel clustering
Technical Field
The application relates to the technical field of image processing, in particular to a RVIN detection and removal method based on pixel clustering.
Background
The digital image is easy to be interfered by noise in the process of generating and transmitting, the subsequent processing of the image is influenced, and the image denoising is one of the bottom visual tasks which are needed to be solved urgently. The image denoising model may be represented as y=x+b, where Y and X represent a corrupted image and a clear image, respectively, and B represents adaptive noise. Noise present in natural and medical images is mainly gaussian noise and random impulse noise (RVIN). Algorithms for gaussian noise removal are numerous and perform well. When the image is polluted by random impulse noise, only partial pixels in the image are destroyed, and the new gray values of the partial pixels are randomly between 0 and 255. This random nature gives more trouble with noise removal than gaussian noise, pretzel noise, and other types of noise.
Several filters for gaussian noise removal, such as gaussian filtering, mean filtering and bilateral filters, have been tried to remove RVIN. The linear and nonlinear edge-preserving filtering methods combine spatial proximity of images and pixel value similarity to achieve the purpose of edge-preserving denoising by considering spatial domain information and gray level similarity, but have no obvious effect on random impulse noise and easily blur the repaired images. The median filter and its variant CWM order the pixels of the local area by gray level, taking the median or weighted median of the gray levels in the area as the gray value of the current pixel. In contrast, they have a better effect on removing impulse noise while overcoming the problem of blurring of image details to some extent by linear filters. Therefore, a new adaptive weighted median filter (ACWM) is proposed that obtains a center weight within each block using a Least Mean Square (LMS) algorithm-based learning method, and then gradually applies a noise filtering procedure through multiple iterations to obtain an optimal filtering effect. However, for images with more detail textures such as points, lines, peaks and the like, the median filters and the improved algorithm thereof can easily remove normal pixels in details and textures as noise pixels, and can not fundamentally solve the problems of image blurring and detail information loss.
The two-stage RVIN denoising algorithm based on noise detection and filtering can effectively solve the problems of repairing image blurring and detail loss by detecting noise pixels in a damaged image and then removing the noise pixels. It is apparent that 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 a damaged image, a noise detection method based on local statistical order absolute difference (ROAD) is proposed, which determines whether a pixel is noise by counting the gray level difference between a central pixel in a local window and a neighboring pixel thereof. Inspired by the ROAD method, DONG proposes to amplify the difference between the center pixel and the pixels in its neighborhood by converting the ROAD value of the center pixel into a form of a rol using a logarithmic function, thereby improving the accuracy of impulse noise detection. Yu in combination with ROAD and hold proposed a Rank Ordered Relative Differences (RORD) based noise detection method. But these methods do not take into account statistical information, such as variance, of pixels within a window, and prior knowledge of noise, such as noise level.
In practice, the level of noise has a large impact on the performance of the denoising algorithm. In order to fully utilize the priori knowledge of the noise level of the image, a noise detection method based on Local Consensus Index (LCI) is proposed, the similarity degree of the center pixel and other pixels in the neighborhood is measured by calculating the LCI value of the center pixel, and then the noise level of the damaged image is estimated to set a proper LCI threshold value so as to screen out normal pixels and noise pixels. In order to improve the detection accuracy of noise, a calculation formula of an LCI threshold value and an image noise level is obtained through a large number of experiments and polynomial fitting. However, for some images with complex textures and severe damage, the LCI values of the pixels are generally low, and the number of misjudged pixels is easily increased. Document [ Triple Threshold Statistical Detection filter for removing high density random-valued impulse noise in images ] devised a method of three threshold detection of standard deviation, average value and quartile to solve the problem of image denoising at high noise levels. However, the multi-threshold detection method has little effect on noise detection while increasing algorithm complexity, and normal pixels and noise pixels in detail or texture areas cannot be well distinguished. To solve this problem, nadem devised a switching technology based blur noise detector that is able to distinguish well between noise pixels and edge pixels of detail and texture regions. In the noise detection phase, pixels in the image can be identified as normal pixels, noise pixels, or candidate noise pixels by using appropriate thresholds, but there is no specific choice here as to how edge pixels are filtered from candidate noise. The document [ Liu ] describes in detail an ordered ROAD difference (ROD-ROAD) and local image statistical Minimum Edge Pixel Difference (MEPD) method to identify edge pixels from candidate noise, preventing edges from being misidentified as noise. The detection and filtering methods based on the neighborhood pixels basically only consider the pixel gray value information in the limited window range, and do not consider the pixel distribution characteristics of the whole image, so that the algorithm has no good generalization performance. And when the image damage reaches 60% or more, these methods are easy to misjudge normal pixels as noise pixels because there is more noise in the neighborhood than normal pixels.
The deep learning technology developed in recent years is also widely used in image denoising, and the denoising method based on the convolutional neural network is used for removing Gaussian noise and is a strong nonlinear mapping model in image processing, but the flexibility of the model is severely limited and is not applicable to RVIN. To solve this problem, a blind CNN model for RVIN denoising is proposed, employing a flexible Noise Ratio Predictor (NRP) as an index. However, training these end-to-end neural network denoising models requires a large amount of computational cost, and there is no obvious advantage over the conventional denoising method, and the complexity of the model also makes implementation of the algorithm on the floor difficult.
In summary, although various image noise reduction algorithms are newly added, many noise detection methods designed by manually setting a detection threshold or based on local window information do not have good generalization performance, cannot effectively process damaged images with high noise level, and cannot accurately distinguish noise pixels from edge pixels, so that details or edge information of images are often lost while noise is reduced.
Disclosure of Invention
In order to solve the technical problems, the application provides a RVIN detection and removal method based on pixel clustering, and in order to improve the generalization performance of a denoising algorithm, enough detail information can be kept while rapid denoising is achieved; according to the noise detection result, the application provides a filter for partition decision, and different filters are adopted for noise pixels in different areas to recover pixels damaged by random value impulse noise. Numerous experimental results indicate that the proposed method is applicable to RVIN in either natural or medical images and is substantially superior to other advanced RVIN filtering techniques in terms of visual and objective quality measurements.
In order to achieve the above purpose, the technical scheme of the application is as follows:
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;
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.
Preferably, the cluster segmentation further comprises the following steps:
the image is smoothed, which includes median filtering and gaussian filtering.
Preferably, the clustering segmentation is performed based on the gray distance similarity of the 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 each pixel point is clustered with its corresponding clusterThe square sum of the one-dimensional distance of the center is minimum, wherein the one-dimensional distance refers to the gray level difference value of the two, and a binary variable r is introduced 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 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.
Preferably, the clustering method adopts a mean shift clustering method, a density-based clustering method or a maximum expected clustering of a Gaussian mixture model.
Preferably, the LCI value of the calculated pixel is calculated by the same class of pixels in the neighborhood of the pixel.
Preferably, the obtaining the optimal detection threshold value of each type of pixel through iterative solution includes the following steps:
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.
Preferably, the LCI weighted mean filter is as follows:
wherein I' x Represents the gray value of the noise pixel x after filtering, and Y represents Ω 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.
Preferably, the filtering window of the LCI weighted mean filter is set to 5×5.
Preferably, the edge direction filter is used for recovering the pixel damaged by the random value impulse noise for the noise pixel of the detail area, and the method specifically comprises the following steps:
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.
Preferably, the filtering window of the edge direction filter is set to 7×7.
Based on the technical scheme, the application has the beneficial effects that: the noise detector in the application is based on the idea of grouping and clustering, and classifies all pixels in a damaged image into several classes according to the characteristics of the pixels, and then identifies the noise of each group of pixels through the self-adaptive threshold; according to the noise detection result, the application provides a filter for partition decision, and different filters are adopted for noise pixels in different areas to recover pixels damaged 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.
Drawings
Figure 1 is a flow diagram of a method for pixel cluster-based RVIN detection and removal in one embodiment;
figure 2 is a graph of clustering effects and pixel classification results in a method of pixel cluster-based RVIN detection and removal, in one embodiment, where figure 2 (a) is an effect graph of Lena image clustering with 50% noise level at k=4; FIG. 2 (b) is a pixel classification result for region A, wherein red, green and white labeled pixels indicate that they are subject to different membership;
figure 3 is a case of LENA damaged image noise detection in a pixel cluster based method of RVIN detection and removal in one embodiment, where figure 3 (a) is a 50% LENA damaged image; FIG. 3 (b) is a diagram of the pixel detection case of region A in FIG. 3 (a);
figure 4 is a diagram of 6 experimental tests in a method of pixel cluster based RVIN detection and removal in one embodiment;
FIG. 5 is a graph of the detection effect of a noise detector on test images of different noise levels in one embodiment;
FIG. 6 is a graph of a 50% rena image restoration contrast in one embodiment, wherein FIG. 6 (a) is a 50% rena image; FIG. 6 (b) is a rena image after repair;
FIG. 7 is a 60\% RVIN ship image and a different recovery effect graph, wherein FIG. 7 (a) is a 60\% RVIN ship image; FIG. 7 (b) is a graph showing the effect of AFWMF treatment after FIG. 7 (a); FIG. 7 (c) is a graph showing the effect of ASMF treatment of FIG. 7 (a); FIG. 7 (d) is an effect diagram of the BDND treatment of FIG. 7 (a); FIG. 7 (e) is an effect diagram of the DWM process of FIG. 7 (a); FIG. 7 (f) is an effect diagram of the EAIF treatment of FIG. 7 (a); FIG. 7 (g) is a graph showing the effect of EBDND treatment of FIG. 7 (a); FIG. 7 (h) is a graph showing the effect of FRDFN treatment of FIG. 7 (a); FIG. 7 (i) is a graph showing the effect of the ROR-NLM treatment of FIG. 7 (a); FIG. 7 (j) is an effect diagram of the SBF process of FIG. 7 (a); FIG. 7 (k) is an effect diagram of the SDOOD treatment of FIG. 7 (a); FIG. 7 (1) is a graph showing the effect of the method of the present application after the treatment of FIG. 7 (a);
figure 8 is a graph of the filtering effect of a prostate noise image in one embodiment, wherein figure 8 (a) is a prostate image containing 30% rvin; fig. 8 (b) is an image of the prostate after repair;
figure 9 is a diagram of the filtering effect of a head noise image in one embodiment, wherein figure 9 (a) is a 50% RVIN containing head image; fig. 9 (b) is a restored head image.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
As shown in fig. 1, the present embodiment provides a method for detecting and removing RVIN based on pixel clustering, including the following steps:
step S101, clustering segmentation is carried out based on the gray distance similarity of the pixel points, and all pixels in the damaged image are classified into K classes.
The clustering method of the data comprises a mean shift clustering method, a density-based clustering method (DBSCAN), a maximum Expectation (EM) clustering of a Gaussian Mixture Model (GMM) and the like. In this embodiment, the K-means algorithm is more commonly used because of its simplicity and fast convergence. K-means image clustering segmentation is also called K-means clustering, and the unsupervised learning principle is utilized to cluster pixel points into a plurality of clusters. The specific principle is as follows:
theorem 1: set of data { x } for a given D-dimensional Euclidean space 1 ,...,x N It is assumed that the number of clusters K is known, and from the viewpoint of euclidean space, the points closer to each other are clustered into one cluster, and the distances between the points of different clusters are relatively longer.
From theorem 1, K cluster centers μ need to be found k (k=1,..a., K) assigning all pixels in the corrupted image to cluster centers closest to each other such that the sum of squares of the one-dimensional distances of each pixel point from its corresponding cluster center is minimized, where one-dimensional distance refers to the gray level difference of the two. We introduce 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. Thus, the following loss function may be defined:
from equation 1, it can be seen that a random fixed cluster center μ is required 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.
Through the steps, the pixel points of the image are clustered according to the similarity, wherein the similarity of the pixel points is calculated according to the one-dimensional distance between the surrounding pixels and the pixels of the central cluster, namely the gray level difference value of the surrounding pixels and the pixels of the central cluster, and the pixel points with the minimum distance with the central cluster are found to be classified. According to the value of K, the pixels of an image can be clustered into K classes. The complex image textures can be accurately separated according to logic through pixel clustering, class-to-class processing is realized, and the capability of repairing damaged images is improved to a certain extent. Fig. 2 (a) shows the clustering effect of the lena image with RVIN of 50% at a value of 4, and it can be seen from the figure that the pixels of the image are divided into four classes, each class being shown in a different color. Meanwhile, for pixels in the classes, because pixels with a certain similarity are already classified in the clusters, when LCI is calculated, LCI is calculated only by taking pixels in the same class in the neighborhood. As fig. 2 (b) shows the pixel classification result of the region a in fig. 2 (a), for the center pixel x, only 8 pixels (221,32,64,22,112,23,23,74) out of 24 pixels in the neighborhood belong to the same class, and 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 noted that, because the anti-interference performance of the K-means algorithm is poor, before the clustering segmentation is performed on the image, two simple filtering modes of median filtering and gaussian filtering are performed first, so that the influence of noise on the clustering effect is reduced.
Step S102, calculating LCI values of pixels, determining areas where the pixels are located based on the LCI values, wherein the areas comprise flat areas and detail areas, obtaining optimal detection thresholds 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 thresholds.
In this embodiment, the LCI value of the pixel is calculated according to the following specific calculation methods:
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 representing pixels x and y, (m, n) and (s, t) are the coordinates of pixels x and y, respectively. Sigma (sigma) λ andσ s Parameters of the Gaussian kernel function are preset respectively. Equation (4) shows that the similarity θ (x, y) between two pixels is related to their distance and gray scale difference. As can be seen from equation (5), when x is a normal pixel, the value of ζx will be larger due to its higher similarity to every other normal pixel in the neighborhood, and vice versa. Thus, the likelihood of being a normal pixel can be evaluated by observing the ζx value of the center pixel x. In order to make the statistic zeta x have better stability and discrimination, it is calculated by formulas (6) and (7)Normalized operation limits it to the field [0,1]]The LCI value for pixel x is finally obtained. LCI characterizes the probability of whether a pixel is noisy, the larger the LCI value of a pixel, the more likely it is a normal pixel. Normal pixels and noise pixels of the whole damaged image can be screened out by setting a proper threshold value. In order to obtain the best detection effect, LCI is used for judging whether the pixel is in a flat area or a detail area, and then different LCI thresholds are used for screening noise. The method has the characteristic of simple calculation, and RVIN of the damaged image can be rapidly detected without iteration.
After iterative computation, the pixels of the image are clustered into several different clusters according to the similarity of the gray scale distances. Obviously, the corresponding noise detection threshold ranges will also be different in different clusters due to the different gray levels of the pixels and the different areas in which the pixels are located. Therefore, selection of the optimal detection threshold value for different types of pixel points is needed. For the two-stage denoising algorithm, the better the noise detector effect, 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 TLCI optimal detection threshold is actually a process for solving the image denoising model optimization problem.
Because the pixel LCI has undergone the normalization processing, its value range is between [0,1], so we can let the detection threshold TLCI traverse from 0 to 1 (assuming that the step size is 0.1), and calculate the objective function of the image denoising model, and when the objective function is minimum, the corresponding TLCI value is the optimal detection threshold. The total variation model is often used in the solution of the optimization problem of image denoising, and the model mainly performs smoothing processing on an image by means of a gradient descent method, so that the image is hoped to be smoothed in the image, the difference between adjacent pixels is smaller, the contour (edge) of the image is not smoothed as far as possible, and the image denoising based on the Laplace regularization is performed. Therefore, we use the feature that the image belongs to two-dimensional discrete signals to perform total variation on the image, as shown in formula (8):
where y is any pixel of the image and i, j is the coordinate of y. Since the solution of the total variation of equation (8) is difficult, there is another definition of the common anisotropy for the two-dimensional total variation:
in the formula (9), V (y) is called a TV norm, which can be used as a regularization method for keeping image edge information as a target, TV values of an image are the same as a matrix norm representation, an anisotropic TV norm of an image is an L1 norm of a matrix, and an isotropic TV norm of an image is the same as an L2 norm matrix representation method. Therefore, when we use the anisotropy V (y) as the objective function of the model, the image restoration effect is the best if the value of the restored image V (y) is the smallest, and by this method we can determine the optimal detection threshold TLCI of the noise detector.
Since the pixels of the image are classified into K classes by the K-means method, and the pixels belonging to the same class are classified into flat regions and complex regions, it is necessary to iteratively select the optimal threshold values of 2K regions, and then calculate the TV values while restoring the image (note that the regions are relatively independent from each other). It is found through experiments that as the detection threshold iterates from 0 to 1, the value of V (y) is in a change trend of decreasing and then increasing, so that a threshold exists to minimize V (y), and the threshold at this time is the optimal detection threshold required by us.
Step S103, an LCI weighted mean filter and an edge direction filter are respectively adopted for noise pixels of the flat area and the detail area to recover pixels damaged by random value impulse noise.
In this embodiment, different filters should be used in the filtering stage according to the different regions where the noise pixels are located. A more robust partition decision filter is designed to remove RVIN rather than using an existing median or modified median filter. The proposed partition decision filter considers both the image features and the region where the noise is located and only selects the pixels in the neighborhood of the center pixel that are judged to be normal to filter the center pixel, so it is more suitable for removing the RVIN noise.
For noise pixels that are determined to be in a flat region, they are repaired by an LCI weighted mean filter. The LCI weighted mean filter is as follows:
wherein I' x Represents the gray value of the noise pixel x after filtering, and Y represents Ω 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. The LCI value of a pixel is used as a weight for each pixel in the filter because LCI characterizes the probability that a pixel is a normal pixel, and if a pixel's LCI value is greater, indicating that it is more likely to be a normal pixel, then more weight should be given to him to participate in the restoration of the center noise pixel. Considering that the pixel gray distribution of the flat area is smooth, the window setting of the filter is too large to easily introduce pixels of the edge area, and thus the filtering window of the LCI weighted average filter is set to 5×5.
The pixel gradation of the noise pixel judged to be in the detail region (edge region) varies drastically in the neighborhood thereof, but the gradation difference of the pixel in a certain direction always exists in the neighborhood due to the characteristics of the edge is small. Therefore, we have devised a median filter based on minimum gradient differences, and the specific processing procedure is as follows:
step S131, constructing a 7X 7 detection frame with noise pixels as the center for the noise pixels determined as the detail region;
step S132, the pixels which are identified as normal on the row, column, left diagonal and right diagonal of the detection frame centering on the noise pixel are respectively put into the set D h ,D v ,D l ,D r In the collection;
step S133, calculating D h ,D v ,D l ,D r AggregationThe standard deviation of the medium elements, selecting the direction represented by the set with the smallest standard deviation as the boundary filtering direction;
step S134, the gray values of the 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 taken as the new gray value of the central noise pixel.
A region a at the edge is selected from the LENA damaged image of 50% of fig. 3 (a), and the pixel gray distribution corresponding to this region is shown in fig. 3 (b). The elements in the regional four-direction set are D respectively 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, D is known v The direction is a boundary line, and it can be known from the figure that this boundary line direction coincides with the boundary line direction calculated by us. Then the gray value of the central pixel after median filtering is D v 99 in the set is very close to the valid correct data 91 for that pixel. It is noted that if the window of the median filter is too small, normal pixels in the edge direction may be small, which results in an image that is prone to glitches, affecting the filtering effect, so we set the window of the modified median filter to 7×7.
Experiment
A great deal of experiments were performed on standard natural and medical images, and the test images are shown in fig. 4, with the exception of fig. 4 (c) where the house image is 256×256 in size and the rest of the images are 512×512 in size.
1. Parameter setting
Although the proposed filter is improved based on an LCI detector, a number of unnecessary parameters are reduced compared to the original method. For parameter sigma in equation (1) λ andσ s And parameters for detecting whether the noise pixel is in detail or texture region, we have fine-tuned on the basis of the values given in the original document, wherein σ λ andσ s The values of (2) are 1.3 and 7.1, respectively. As for the classification parameter K, it is obvious that the more the damaged image is segmented, the better the noise detection effect is, but at the same time, the time cost and complexity of the algorithm are increased. We haveFor the peak image with the noise level of 50, experiments of 2-6 blocks are used for verifying the influence of the number of the blocks on noise detection, experimental data are shown in table 1, and when the value of the classification parameter is found to be 4, each index basically reaches the optimum.
Table 1 noise detection cases in case of dividing different classes
K miss FALSE total psnr ssim
2 5314 15306 20620 27.83 0.86
3 5588 14378 19966 28.12 0.88
4 6130 12745 18875 28.66 0.92
5 6212 12443 18655 28.68 0.92
6 6266 12109 18375 28.71 0.93
2. Performance of noise detector
Since the detection accuracy of the noise detector has a great influence on the noise removal capability of the filter, a good noise detector should have fewer missing pixels, false detection pixels (MD and FD), and a higher accuracy of actually detecting the noise pixels (true hit). Table 2 and fig. 5 show the detection effect of the proposed noise detector on test images of different noise levels. As can be seen from table 2, for some images with less texture and simpler pixel gray distribution, such as lena, pepper, prostate and brain images, the MD and FD numbers are much less than for other images, because the noise pixels in the flat areas are more easily detected than the noise pixels in the edge areas. Although the images of baboon, barba, band and bridge, which contain more detail and texture, perform less well at low noise levels, it can be seen from fig. 5 that as the noise level increases, the detection rate of noisy pixels in the image increases progressively, since the number of normal pixels in the image is less and less, the gray level distribution of pixels in the detection window varies greatly, and if the central pixel is noisy, it is more distinct from the pixels in its neighborhood and is therefore easier to detect as noise. Even when the noise level reaches 80%, the truth hit of almost all images is above 90%, which indicates that the noise detector we propose has good stability and robustness.
TABLE 2 RVIN. Detection results of the noise detector on different images of 30% to 80% RVIN
In general, for a gray image, it is not obvious if the absolute difference between a pixel value and its neighboring pixel value is less than 8. In other words, when the gray value of the noise pixel is within 8 from the original true value, it is difficult for the human eye or the noise detector to distinguish, and their presence does not bring about a significant decrease in image quality, so that for this part of the noise pixel we can see them as normal pixels. Based on this premise, we have counted the difference between the gray levels of the missing pixels and their true values for lena, pepper, ballet and gorilla at noise levels of 40% -60%, as shown in table 3, where D represents the difference between the new and the true values for the noise pixels. As can be seen from table 3, most of these images have undetected noise pixel gray values within 8 bits of their true values, which further verifies that the proposed noise detector has a high noise detection accuracy.
TABLE 3 difference of gray scale and true value for missed pixels for different images with noise levels of 40% -60%
To objectively evaluate the performance of the proposed noise detector, we compared it to several algorithms, recently proposed and classical, and the experimental results are shown in table 4. It should be noted that for FD and MD values of other noise detection algorithms, the best values mentioned in their literature are chosen. It can be seen from table 4 that although some methods such as Luo, s have a low false positive number, the number of missed pixels is very high, which can result in more burrs in the image, affecting the recovery performance of the subsequent filter. While the proposed noise detector is optimal for total numbers at different noise levels. In fact, as the noise level increases, the MD also gradually reaches an optimum, which means that the method is very robust, and the detector can still detect more noise pixels when the noise density becomes very high. Intuitively, a good noise detector should detect more noise pixels while minimizing false positives, so combining several evaluation metrics we consider the proposed noise detector to have better performance than other approaches. Furthermore, it can be seen from the comparison of LCI and proposed filter that as the noise level increases, the gap between the effects of the proposed filter and LCI is more pronounced, which suggests that our proposed improvement for LCI has a significant and substantial improvement in detection performance.
Table 4 compares the detection results of RVIN contaminated Lena images at different noise levels
3. Restoration performance of filter on natural image
To verify the validity and rationality of the proposed partition decision filter, we repaired the lena image of 50% rvin as shown in fig. 6 (a) and 6 (b). Meanwhile, a flat area a and a detail area B of 12×12 in size are selected from the image, and the corresponding pixel gradation values before and after filtering are shown in fig. 6 (c-f), wherein fig. 6 (c) and 6 (d) respectively show the pixel gradation distributions of the flat area a and the detail area B before filtering, wherein the gray-marked pixels are noise, the values in brackets are their true values, and fig. 6 (e) and 6 (f) respectively show the pixel gradation distributions of the flat area a and the detail area B after filtering. By enlarging fig. 6 (b) it can be seen that the image has no significant glitches or residual noise clusters, which benefits from the proposed noise detector detecting the noise in the corrupted image well. As shown in table 3, although 6800 noise pixels were not detected, half of the noise was slightly different in gray level from the original value, and thus was not visually observed significantly. As can be seen from a comparison of fig. 6 (c-f), most of the noise pixels are detected, both in the flat area and in the detail area, and the restored pixel gray values are very close to the true values. Although for some normal pixels that are misinterpreted as noise, the new value will be less different from the original value after being filtered. It should be noted that the detection and filtering effects of the detail area are significantly inferior to those of the flat area, for example, the error between 144 pixels in the flat area a and the true value is all within ±3 after filtering, and about 37 pixels in the detail area B are above ±8. This is because the pixel gray level distribution of the edge and texture details is more complex, but from the point of view of the restoration effect of fig. 6 (b), the proposed filter better retains and restores the textures and edges in the image, and no obvious image blurring phenomenon exists, which indicates the rationality and effectiveness of our zonal filtering method.
To objectively evaluate the performance of the proposed filter, we choose PSNR, which is used to measure the dissimilarity between the original image and the reconstructed image, and SSIM, which is used to characterize the ability of the filter to focus on detail preserving features, and compare it to several filters of the main stream. It is noted that for the PSNR and SSIM values of the other filters, the best values mentioned in their literature are chosen. From the PSNR comparison results of table 5, it can be found that the proposed filter is slightly inferior to AEPWM except on the boot image, but the proposed filter is more prominent in other images, especially at noise levels of 50 to 60. Meanwhile, as the noise level is improved, the peak signal-to-noise value of the proposed filter is slower than that of AEPWM and other filters, which benefits from the fact that the noise detector designed by us can detect more noise at high noise level, and shows that the method has good robustness. In the SSIM comparison results of table 6, except that the bridge image is slightly lower than ROR-NLM, the proposed filter performs significantly better on other images than other filtering algorithms, which indicates that the proposed filter can better preserve edges and other detail aspects in the image.
Table 5 peak SNR recovery results comparison of 40% -60% RVIN images
TABLE 6 comparison of recovery effects of 40% -60% RVIN images in SSIM
Similarly, several mainstream filtering algorithms have been chosen to compare the effect of the filter on visual output. As shown in fig. 7, it can be found that more and more obvious noise images still exist in ASMF, DWM, EAIF and SBF, while obvious blurring phenomenon exists in the restored image of SD-OOD, the ROR-NLM and AFWMF effects are relatively better, but are not well preserved at some edges and details, and the BDND, EBDND and FRDFN processing effects are poor. In contrast, as shown in fig. 7 (l), the method adopted by the application has very good visual quality, not only does no obvious noise clusters and burrs exist in the image, but also can be found by amplifying some detail areas in the image, and the filtering method better retains the lines and colors of the ship body than other methods, which benefits from the high detection accuracy of the noise detector and the partition filtering design of the filter. It is believed that for a complex image with a noise density of 60%, our method can still detect and remove most of the noise pixels and preserve most of the image details.
4. Recovery performance of filters on medical images
As can be seen from the filtering effect diagram of the prostate noise image shown in fig. 8 and the filtering effect diagram of the head noise image shown in fig. 9, the proposed denoising algorithm can recover biomedical images with different textures and resolutions at different RVIN intensities. Good texture and edge retention can also be visually observed from the restored medical images, which helps to ensure proper subsequent diagnosis and treatment.
The foregoing is merely a preferred implementation of a method for detecting and removing RVIN based on pixel clustering disclosed in the present application, and is not intended to limit the scope of the embodiments of the present specification. Any modification, equivalent replacement, improvement, or the like made within the spirit and principles of the embodiments of the present specification should be included in the protection scope of the embodiments of the present 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
CN105913396B (en) A kind of image border holding mixing denoising method of noise estimation
Sulaiman et al. Denoising-based clustering algorithms for segmentation of low level salt-and-pepper noise-corrupted images
CN110009638B (en) Bridge inhaul cable image appearance defect detection method based on local statistical characteristics
CN113989168B (en) Self-adaptive non-local mean value filtering method for spiced salt noise
Panwar et al. Image Segmentation using K-means clustering and Thresholding
CN103400357B (en) A kind of method removing image salt-pepper noise
CN106296763B (en) A kind of metal material Industry CT Image Quality method for quickly correcting
CN108416740A (en) A kind of iteration self-adapting median filtering algorithm for eliminating salt-pepper noise
Ramadan Efficient restoration method for images corrupted with impulse noise
CN115830022A (en) Filter screen defect detection method based on machine vision
CN117745751B (en) Pulmonary tuberculosis CT image segmentation method based on feature extraction
Thirilogasundari et al. Fuzzy based salt and pepper noise removal using adaptive switching median filter
Rani et al. An improved denoising algorithm for removing noise in color images
CN114998632B (en) RVIN detection and removal method based on pixel clustering
CN110378271B (en) Gait recognition equipment screening method based on quality dimension evaluation parameters
Shukla et al. Directional order statistics filtering for suppression of salt and pepper noise
Karthikeyan et al. Hybrid approach of efficient decision-based algorithm and fuzzy logic for the removal of high density salt and pepper noise in images
Lin et al. Adaptive Noise Detector and Partition Filter for Image Restoration.
Shi A gray level indicator-based nonlinear diffusion equation for the removal of random-valued impulse noise
Alhatami et al. Advanced Fuzzy Denoising Technique for Agricultural Remote Sensing: Modified Partition Filter for Suppressing Impulsive
Alhassan et al. A SURVEY OF IMAGE DENOISING FILTERS BASED ON BOUNDARY DISCRIMINATION NOISE DETECTIO
CN110097558B (en) SAR image coastline detection method
Lin et al. Adaptive Noise Detector and Partition Filter for Removing Impulse Noise from Grayscale Images
Vijaykumar et al. Adaptive window based efficient algorithm for removing gaussian noise in gray scale and color images

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