algorithm, based on the idea that images contain
repeated structures and that averaging these
structures, the noise of an image can be reduced.
Given a discrete image with noise
y the
restored value
nm
y
,
ˆ
, for the pixel at location
()
Anm ∈, , is computed as the weighted average of
all pixels of the image,
∑
∈
=
Aji
ji
nm
jinm
ywy
),(
,
,
,,
ˆ
(3)
where the family of weights
{}
nm
ji
w
,
,
depends on the
similarity between pixels at positions
()
Anm
, and
()
Aji ∈, , and it satisfies the conditions 10
,
,
≤≤
nm
ji
w
and
∑
∈
=
Aji
nm
ji
w
),(
,
,
1 .
Structural similarity between
ji
y
,
and
nm
y
,
depends on similarity between vectors
)(
, ji
V Ω
and
)(
,nm
V Ω , where
lk,
Ω denotes a fixed size
neighbourhood and centered at pixel
lk
y
,
.
Similarity between above mentioned vectors is
measured by a decreasing function of Euclidean
distance,
2
,,
,
,
)()(
jinm
nm
ji
VVd Ω−Ω= . Pixels with
similar neighbourhood to
)(
,nm
V Ω will have large
weights, which are defined as
2
,
,
,
,
,
1
H
d
nm
nm
ji
nm
ji
e
Z
w
−
=
(4)
where
nm
Z
,
is a normalization constant, and the
parameter H acts as a filtering degree, that is, it
controls the decay of weights as a function of
distances. For implementation purposes, a window
of size
1
W is used to compute the average with a
limited number of neighbours, instead of averaging
all pixels of the image. Also, a window of size
2
W is
used to define the structure of the neighbourhood
and the size of vector
)(
,lk
V Ω .
In general, the Non-Local Means algorithm gives
good results in terms of noise reduction, however,
this does not always happen, especially in images
with high salt and pepper noise level.
4 SALT AND PEPPER NOISE
DETECTION AND
SUPPRESION PROPOSAL
In this work, the Non-Local Means algorithm will be
used to provide a preliminary estimate of the
restored image, with the aim of detecting salt and
pepper noise, even with high density.
In order to consider the presence of objects whose
pixels intensity values are equal to the maximum or
minimum values on image, in other words, black or
white objects in the image without noise, we propose
a segmentation, which is performed by grouping
neighbouring pixels with similar intensity values,
based on a threshold TI.
The purpose of making this segmentation is to
find a partition
S of an image
y
ˆ
on a set of regions,
in such a way that
∪
smallbig
RR
y
ˆ
(5)
where
}
PRhRR
ssbig
>
)(:
, and
(6)
and,
}
PRhRR
sssmall
≤
)(:
,
(7)
big
R
is the set of regions considered relevant
objects, that is, regions whose number of pixels
represent a percentage of image greater than a
threshold P. Obviously,
small
R is the set of regions
that are, by their size, regarded as details or noise.
The function
)(
s
Rh computes the percentage of the
image that corresponds to a region
s
R . Thus, one
can discriminate between pixels that can be
considered corrupt and those that belong to an
object, although in both cases the pixels intensities
are extreme value.
Considering the above exposed, our proposal to
detect salt and pepper noise can be described, in
general, through the following steps:
1
y
ˆ
=Compute_Estimation( y ,TW,PAR)
2
S=Segmentation(
y
ˆ
,TI)
3
=Pixels_Classification( y ,S)
4
x
ˆ
=Noise_Suppression( y
ˆ
, α ,W
min
,W
max
)
where PAR
is a vector containing the parameters H,
W
1
and W
2
.
The preliminary estimate, described in Figure 1,
is performed by calculating the weights of the pixels
in the neighbourhood for a corrupt pixel candidate
according to expression (4), and its estimated value
will be the median value only of intensity values of
pixels with weights greater than a threshold TW. In
this way, only pixels whose structure is similar to
the pixel in question are involved. The median value
SALT AND PEPPER NOISE DETECTION BASED ON NON-LOCAL MEANS
345