(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
Robust edge and corner detection using noise identification and adaptive thresholding techniques
1. IEEE EIT 2007 Proceedings 102
.
1-4244-0941-1/07/$25.00 c 2007 IEEE
Robust Edge and Corner Detection
Using Noise Identification and Adaptive Thresholding Techniques
Yixin Chen
Technical Center Brighton
Delphi Corporation
Brighton, MI 48116-8326
yixin.chen@delphi.com
Manohar Das
Dept. of Electrical and Computer Engineering
Oakland University
Rochester, MI 48309-4401
das@oakland.edu
Abstract This paper presents a robust, two-
step method for edge and corner detection in noisy
images. First it identifies the type of noise using a
new pattern classification approach and then
restores the image using a good restoration
technique suitable for the type of noise identified.
The types of noise considered here include uniform
white, Gaussian white, speckle, and salt-and-pepper
noise. From the restored image, edge and corner
strengths are determined using gradient based
techniques, and finally, a fuzzy k-means clustering
algorithm is used to find adaptive thresholds for
detecting the edge and corner points. Results of
some simulation studies are presented here and
they seem to indicate that the proposed algorithm
works very well.
1. INTRODUCTION
DGES and corners represent two important image
features that are widely used in many areas of
image processing and computer vision. In the
commonly used approach for edge or corner extraction,
first image gradients are calculated using a standard
mask, such as Sobel operator or Prewitt operator. Then
the edge or corner strength is calculated for each pixel
using either gradient or corner strength. In the final
step, a threshold is needed to classify each pixel into
edge/non-edge or corner/non-corner based on the edge
or corner strength.
The above method assumes the image to be clean to
start with, and its performance will deteriorate if input
image is noisy. Therefore, a two-step approach is often
called for. In the first step, an image de-noising
algorithm is used to remove noise. Over the past
decades, many image de-noising algorithms have
appeared in the literature. They usually work very well
for the types of noise they have been designed for. For
instance, Wiener filter [1], [2] works well for removal
of additive uniform or Gaussian distributed white noise,
Kalman filter [3] works fine for additive Gaussian
noise, homomorphic filter [3], [4] works well for
multiplicative speckle noise, and median filter [3]
works very well for removal of salt-and-pepper noise.
If the noise type can be identified automatically and
then the filter, which is known to work best for
removing this type of noise, can be used to restore it,
one can achieve excellent de-noising results.
In the second step, first edge or corner strengths are
calculated using a gradient based technique. Then the
images pixels are categorized into either edge/non-
edge or corner/non-corner categories using a threshold
detector. However, choice of a correct threshold is very
important, because a fixed threshold seldom gives
satisfactory results.
In this paper, a robust two-step edge and corner
detection algorithm is proposed. The novelty of the
proposed method includes usage of a pattern
classification based noise identifier in the first step and
a fuzzy k-means clustering based adaptive threshold
estimator in the second step. The performance of the
proposed method is evaluated using extensive
simulation studies.
2. AUTOMATIC NOISE IDENTIFICATION
We consider four different types of image noise
that commonly occur, namely, uniform white,
Gaussian white, speckle, and salt-and-pepper noise.
Among these four types of noise, the speckle noise is
of multiplicative type and the other three are of
additive nature. Since different types of noises are
characterized by different statistical properties, such as
kurtosis and skewness, they can be identified using a
simple feature based pattern classifier.
In this study, the noise filters selected for the above
four types of noise are Wiener filter for uniform or
Gaussian white noise, homomorphic filter for speckle
noise, and median filter for salt-and-pepper noise.
Table 1 lists the probability density functions,
kurtosis and skewness values, and the filters that
proved to be good for these four types of noise. From
Table 1, we can see that different types of noise have
E
2. IEEE EIT 2007 Proceedings 103
.
Table 1: pdf, Kurtosis, Skewness, suitable filters for four different noises
Probability Density Function Kurtosis Skewness Proved Good
Filter
Uniform
White
≤≤
−=
others,0
,
1
)(
bxa
abxf
1.8 0 Wiener Filter
Gaussian
White 2
2
2
)(
2
1
),;( σ
µ
πσ
σµ
−
−
=
x
exf
3 0 Wiener Filter
Speckle
(exponential
distribution)
<
≥
=
0,0
0,exp
1
)( 22
x
x)
σ
-x
(
xf σ
9 2 Homomorphic
filter
Salt & Pepper No analytic pdf Large 0 Median Filter
different kurtosis or skewness and these differences
can be used to identify them. After identifying the
noise type, the corresponding filter can be used to
remove the noise.
Kurtosis is a measure of how outlier-prone a
distribution is and skewness is a measure of the
asymmetry of the data around the sample mean.
Specifically, kurtosis and skewness are respectively 4th
and 3rd
order moments:
44
/)( σµ−= xEKURT (1)
33
/)( σµ−= xESKEW (2)
Assuming the original M×N image ),( jiy to be
contaminated by additive or multiplicative type of
noise ),( jiω , then the observed image ),( jif can be
modeled by Eq. (3) for additive noise, and Eq. (4) for
multiplicative noise:
),(),(),( jijiyjif ω+=
Nj1,1 ≤≤≤≤ Mi (3)
),(),(),( jijiyjif ω=
Nj1,1 ≤≤≤≤ Mi (4)
First, three proved-good filters, namely, Wiener
filter, homomorphic filter and median filter, are applied
to the noisy image ),( jif to get three different
estimates ),(ˆ jiyn for the original image ),( jiy as
shown below:
),(),(),(ˆ jiHjifjiy WienerWiener ∗= (5)
),(),(),(ˆ jiHjifjiy MedianMedian ∗= (6)
[ ]),()),(log(),(ˆ jiHjifExpjiy WienerHomo ∗= (7)
where, the symbol ∗ above denotes convolution
operation. In Eq. (7), logarithm and exponential
operations are needed for homomorphic filtering.
Then we get three noise estimates based on outputs
from above filters as shown below:
),(ˆ),( jiyjif WienerWiener −=ω (8)
),(ˆ),( jiyjif MedianMedian −=ω (9)
),(ˆ/),( jiyjif HomoHomo =ω (10)
The noise estimates obtained in Eqs. (8), (9), (10)
can be used to identify the noise type. Suppose ),( jiω
is Gaussian white noise, then ),(ˆ jiyWiener should give
the best estimate of ),( jiy and therefore Wienerω
should be close to Gaussian white noise (with kurtosis
close to 3 and skewness close to 0).
A similarity measure is used to evaluate how close
Wienerω is to Gaussian or uniform white noise, how
close Medianω is to salt-and-pepper noise, and how
close Homoω is to speckle noise. The similarity
measures found to work well from our experimental
studies are shown below:
If 20≤MedianKURT :
+=
),max(
),min(
),max(
),min(
*5.0
_
_
_
_
WienerUWWiener
WienerUWWiener
WienerUWWiener
WienerUWWiener
UW
SKEWSLEW
SKEWSKEW
KURTKURT
KURTKURT
S (11)
where WienerUWKURT _ = 3.48, WienerUWSKEW _ = 0.04 (which are trained values).
+=
),max(
),min(
),max(
),min(
*5.0
_
_
_
_
WienerGWWiener
WienerGWWiener
WienerGWWiener
WienerGWWiener
GW
SKEWSLEW
SKEWSKEW
KURTKURT
KURTKURT
S (12)
3. IEEE EIT 2007 Proceedings 104
.
where WienerGWKURT _ = 4.38, WienerGWSKEW _ = 0.04 (which are trained values).
+=
),max(
),min(
),max(
),min(
*5.0
_
_
_
_
HomoSpeckleHomo
HomoSpeckleHomo
HomoSpeckleHomo
HomoSpeckleHomo
Speckle
SKEWSLEW
SKEWSKEW
KURTKURT
KURTKURT
S (13)
where HomoSpeckleKURT _ = 6.48, HomoSpeckleSKEW _ = 1.45 (which are trained values).
0& =PSS
If 20>MedianKURT :
0=GWS , 0=UWS , 0=SpeckleS
+=
),max(
),min(
),max(
),min(
*5.0
_&
_&
_&
_&
&
MedianPSMedian
MedianPSMedian
MedianPSMedian
MedianPSMedian
PS
SKEWSLEW
SKEWSKEW
KURTKURT
KURTKURT
S (14)
where MedianPSKURT _& = 36.5, MedianPSSKEW _& = 0.2 (which are trained values).
In Eq. (12), WienerKURT and WienerSKEW denote
kurtosis and skewness of Wienerω ; WienerGWKURT _
and WienerGWSKEW _ denote the expected kurtosis and
skewness of Wienerω if the original noise ),( jiω is
really Gaussian white noise. The ratio between real
kurtosis WienerKURT and the expected kurtosis
WienerGWKURT _ , as well as the ratio between real
skewness WienerSKEW and the expected skewness
WienerGWSKEW _ , are used as a similarity measure.
Minimum and maximum operations are used to assure
the maximum similarity value is 1. The similarities of
kurtosis and skewness are equally weighted to get GWS ,
the final similarity measurement between Wienerω and
real Gaussian white noise. In addition, because Wiener
filter doesn’t completely filter Gaussian or uniform
white noise, the expected kurtosis WienerGWKURT _
and skewness WienerGWSKEW _ are most likely not
equal to the ideal values (3 and 0) shown in Table 1
and should be trained with Gaussian input noise. We
have used WienerGWKURT _ = 4.38, WienerGWSKEW _ =
0.04 based on the training data, namely average
kurtosis and skewness values of Wienerω when ),( jiω
is Gaussian white noise in training simulations. A
similar method is used to train the expected kurtosis
and skewness values for speckle noise and salt-and-
pepper noise.
With similarity values obtained from Eqs.
(11)~(14), first noise type is identified. Then, two
kinds of filters, as described below, are evaluated.
Filter 1: Select the best candidate filter based on the
identified noise as below:
• Noise Type: )(arg i
i
SMaxC = , where i = 1
(uniform white), 2 (Gaussian white), 3
(speckle), 4 (salt-and-pepper).
• Filter Output:
),(),(),(ˆ jiHjifjiy C∗= (15)
where ),(1 jiH and ),(2 jiH are Wiener filter,
),(3 jiH is homomorphic filter, ),(4 jiH is
median filter.
Filter 2: Mix the multiple filter outputs as shown
below:
• Find the probability that the noise belongs to a
specific type by:
∑=
=
N
n
nk SSkp
1
/)( (16)
where k = 1, 2, 3, 4; N = 4.
• Mix the multiple filter outputs as below:
∑=
∗⋅=
N
n
n jiHjifnpjiy
1
)],(),([)(),(ˆ (17)
3. FUZZY k-MEANS BASED ADAPTIVE
THRESHOLD SELECTION FOR ROBUST EDGE
AND CORNER DETECTION
After getting the restored image using either Eq.
(15) or (17), we can use a classical edge or corner
detection algorithm to extract image edges or corners.
In our experiment, the image gradient magnitude is
calculated by:
),(),(),( 22
jiGjiGjiG yx += (18)
where ),( jiGx and ),( jiGy denote the gradients in
horizontal and vertical directions, respectively. An
4. IEEE EIT 2007 Proceedings 105
.
edge is declared to be present at ),( ji if ),( jiG is
larger than a threshold eT .
For corner strength, we use Harris corner detector
[8] as an example. The corner degree is calculated by:
><+><
><−>><<
= 22
222
),(
yx
yxyx
GG
GGGG
jiC (19)
where >•< denotes an image smoothing operation,
such as Gaussian smoothing.
In Eq. (19), the bigger the value of C is, the more
likely the pixel is a true corner. When ),( jiC is bigger
than a threshold cT , the pixel in ),( ji is declared as a
corner point.
Given the image gradient magnitude or image
corner degree calculated from Eq. (18) or (19), a
threshold is needed to classify each pixel into
edge/non-edge, or corner/non-corner categories. A
fixed threshold obviously cannot always provide a
satisfactory classification result and therefore, an
adaptive threshold which will adapt to the image
lighting conditions is desired. Fuzzy k-means
clustering technique is used here to find an adaptive
threshold. In the following subsection, we use edge
detection as an example to describe the edge point
clustering using fuzzy k-means algorithm.
3.1. Data Sample Reduction
Given n data samples, )( jx , nj ...,,2,1= , the fuzzy
k-means clustering algorithm [5] classifies an input
data )( jx to c different categories by seeking to
minimize the following cost function
[ ] 2
1 1
, ||||)ˆ|(ˆ
ij
bc
i
n
j
jifuz PJ µXθX −= ∑∑= =
ω (20)
where iµ is the mean value of category i, )ˆ|(ˆ
,θX jiP ω
is the conditional probability that jX belongs to
category iω , b is a “blending” parameter to allow each
input data to belong to multiple clusters while b > 1.
For an M (row) × N (column) image, there are
M×N input data samples if we directly use the original
gradient data ),( jiG as inputs to fuzzy k-means
algorithm. For example, for our image size of 240×352,
there are 84480 input samples, which would require a
great deal of time to cluster.
In our experiment, instead of using the original
gradient data ),( jiG , we use the following method to
dramatically reduce the amount of the sample data:
• Normalize ),( jiG to the range of [0, 255]. Here
we denote the normalized data as ),( jiNG ;
• Get the histogram of ),( jiNG , which is denoted
as )(nHistNG , n = 0, 1, …, 255 ;
• Use )](,[ nHistNGn as the new data set for fuzzy
k-means algorithm. There are totally 256 sets of
input data now.
3.2. Edge or Corner Point Clustering Using
Fuzzy k-Means Algorithm
Let us denote non-edge category as 0ω , and edge
category as 1ω . Given a data sample:
2550)],(,[ ≤≤= jjHistNGjjX , the conditional
probability that jX belongs to non-edge or edge is
)|(ˆ
0 jP Xω or )|(ˆ
1 jP Xω , respectively. In addition,
based on the histogram )( jHistNG , we initialize the
means for non-edge or edge points to
))((arg0 jHistNGMax
j
=µ , 2/)255( 01 += µµ , based on
the assumptions that most of the pixels are non-edge
points and gradient will be higher for the edge points.
First we normalize the probabilities of cluster
membership as shown below:
1)|(ˆ
1
0
=∑=
ji
i
P Xω , j = 0, 1, …, 255. (21)
This is done by assigning
,2.0)|(ˆ,8.0)|(ˆ
10 == jj PP XX ωω if
2
10 µµ +
≤j ,
and 8.0)|(ˆ,2.0)|(ˆ
10 == jj PP XX ωω if
2
10 µµ +
>j .
The new mean values for 0ω , 1ω are calculated by:
∑
∑
=
=
= 255
0
255
0
)]|(ˆ[
)]|(ˆ[
j
b
ji
j j
b
ji
i
P
P
X
XX
µ
ω
ω
(22)
where i = 0, 1; b is chosen to be 2.
The conditional probability )|(ˆ
jiP Xω is updated by:
∑ =
−
−
= 1
0
)1/(1
)1/(1
)/1(
)/1(
)|(ˆ
r
b
rj
b
ij
ji
d
d
P Xω (23)
where 2
|||| ijijd µX −= , which is the distance
measurement between jX and iµ . The smaller ijd is,
the larger is )|(ˆ
jiP Xω .
The Eqs. (22), (23) are repeated until there are very
small changes in iµ and )|(ˆ
jiP Xω or a pre-selected
number of iterations, such as 50, have been exceeded.
5. IEEE EIT 2007 Proceedings 106
.
After getting )](,[ 000 µµ HistNG=µ , )|(ˆ
0 jP Xω ,
and )](,[ 111 µµ HistNG=µ , )|(ˆ
1 jP Xω , the final edge
classifier is designed as shown below:
Given 2550)],(,[ ≤≤= jjHistNGjjX , if 0µ>j and
βωω >− )|(ˆ)|(ˆ
01 jj PP XX (24)
then 1ω∈jX (edge point); otherwise, 0ω∈jX (non-
edge point), where 10 << β . The selection of β can
affect how many non-edge points are mistakenly
classified as edge points. In general, the larger β is,
the lesser is the chance that non-edge points will be
classified as edge points, and higher is the chance that
edge points will be classified as non-edge points.
4. EXPERIMENT RESULTS AND CONCLUSION
All experiments were carried out using Matlab
Image Processing Toolbox. Matlab function “imnoise”
is used to generate Gaussian white noise and salt-and-
pepper noise; “rand” function is used to create uniform
white noise. Also, for speckle noise, we have used the
following model [3]:
),(),(),( 22
jiajiajis IR += (25)
),(),(),(),( jisjiyjiyjif ∗+= (26)
where ),( jiaR and ),( jiaI are independent Gaussian
sequences with zero mean and variance 2
aσ , and
),( jis has an exponential distribution with variance
22
2 aσσ = and mean [ ] 2
),( σµ == jisEs .
We conducted simulations on many different image
sequences. Fig. 1 is one of the original image
sequences used as an example here. With four different
noise inputs, the calculated kurtosis, skewness,
similarities, and identified noise types are shown in
Table 2. For example, given uniform white noise input,
the kurtosis, skewness from Wienerω matches the
expected kurtosis and skewness values of a typical
uniform white noise better than other types of noises,
which results in UWS having the maximum similarity
value and therefore uniform white noise is identified.
For adaptive thresholds using fuzzy k-means
method, we use edge detection on Gaussian white
noise image as an example. Fig. 2 shows the histogram
plot of edge strength )( jHistNG with a peak at low
strength area, which means most pixels are non-edge
points in the image. Fig. 3 shows the plots of the
conditional probabilities )|(ˆ
0 jP Xω and )|(ˆ
1 jP Xω .
From Fig. 3, we can see that )|(ˆ
0 jP Xω is much
bigger than )|(ˆ
1 jP Xω in low edge strength area, and
the opposite is true for high edge strength area. In our
experiments, we chose 9.0=β to avoid classifying
non-edge points to edge points by mistake.
Fig. 1: Original image ),( jiy
Fig. 2: Histogram of Fig. 3: )|(ˆ
0 jP Xω (red)
)( jHistNG and )|(ˆ
1 jP Xω (blue)
Figures 4, 5, 6, 7 show the filter outputs, edge and
corner detection results for 4 different noises. The edge
and corner detection results are satisfactory.
In conclusion, a robust, two-step edge and corner
detection method for noisy images is presented in this
paper. The noise classifier proposed here uses some
statistical properties of typical noises to identify the
noise type so that the best proved-filter is always used
to assure best image de-noising. For edge or corner
detection, a fuzzy k-means algorithm calculates
adaptive thresholds for edge/non-edge or corner/non-
corner classification. The combination of the two
algorithms allows us to get robust edge and corner
detection results.
Table 2: Kurtosis, skewness, similarity, and identified noise type for different noise inputs
Noise
Input
WienerK HomoK MedianK WienerSK HomoSK MedianSK UWS GWS SpeckleS PSS &
Noise
Type
Identified
UW 3.48 2.94 3.16 0.05 0.14 0.03 0.88 0.78 0.28 0 1
GW 4.40 80.23 4.15 0.08 7.11 -0.0219 0.64 0.74 0.14 0 2
Speckle 19.41 6.39 5.72 -2.83 1.44 -0.93 0.1 0.12 0.99 0 3
Salt &
Pepper
49.43 105.78 38.68 -.02 9.52 0.53 0 0 0 0.66 4
6. IEEE EIT 2007 Proceedings 107
.
(a) Uniform white noisy (b) Wiener filter (c) Edge detection (e) Corner detection
image (5 dB) output (12.78 dB)
Fig. 4: Wiener filter de-noising, edge and corner detections in uniform white noise image
(a) Gaussian white noisy (b) Wiener filter (c) Edge detection (e) Corner detection
image (6 dB) output (13 dB)
Fig. 5: Wiener filter de-noising, edge and corner detections in Gaussian white noise image
(a) Speckle noise (b) Homomorphic filter (c) Edge detection (e) Corner detection
image (5.8 dB) output (12.4 dB)
Fig. 6: Homomorphic filter de-noising, edge and corner detections in speckle noise image
(a) Salt-and-pepper (b) Median filter (c) Edge detection (e) Corner detection
noise image (5.65 dB) output (19.6 dB)
Fig. 7: Median filter de-noising, edge and corner detections in salt-and-pepper noise image
REFERENCES
[1] Lee, J. S., “Digital Image Enhancement and Noise
Filtering by Use of Local Statistics”, IEEE Transactions
on Pattern Analysis and Machine Intelligence, PAMI-2,
1980, 165-168
[2] Lim, Jae S. Two-Dimensional Signal and Image
Processing. Englewood Cliffs, NJ: Prentice Hall, 1990.
pp. 536-540.
[3] A. K. Jain, Fundamentals Of Digital Image Processing,
Prentice Hall, New Jersey, 1989
[4] H. H. Arsenault and G. April, “Properties of Speckle
Integrated with a finite Aperture and Logarithmically
Transformed”, Speckle in Optics, Special Issue, J. Opt.
Soc. Am. 66 (Nov. 1976), pp. 1160-1163
[5] Richard O. Duda, Peter E. Hart, David G. Stork, Pattern
Classification, 2nd
edition, 2001, John Wiley & Sons,
Inc.
[6] R. C. Gonzalez and R. E. Woods, Digital Image
Processing, Assison-Wesley, 1992.
[7] A. K. Jain, S. Ranganath, Image Restoration and Edge
Extraction Based On 2-D Stochastic Models, Proc.
IEEE Int’l Conf. on ASSP, 1992, pp. 1520-1523.
[8] C.G. Harris and M. J. Stephens. A Combined Corner
and Edge Detector. Proceedings of the Fourth Alvey
Vision Conference, Manchester, pp. 147-151, 1988.