Date post: | 06-Apr-2018 |
Category: |
Documents |
Upload: | anushmita-kaushik |
View: | 227 times |
Download: | 0 times |
of 47
8/3/2019 Performance Evaluation and Comparison of Various
1/47
8/3/2019 Performance Evaluation and Comparison of Various
2/47
An edge is the boundary between anobject and the background, and
indicates the boundary betweenoverlapping objects.
Edges in images are areas with strong
intensity contrastsa jump in intensityfrom one pixel to the next.
8/3/2019 Performance Evaluation and Comparison of Various
3/47
significantly reduces theamount of data
filters out useless information
preserves the importantstructural properties Useful in applications such as:
object detection and recognition
segmentation
tracking
Why edgedetection?
Refraction or poor focus
False edge detection
Missing true edges
Edge localization
High computational time
Problems due to noise
Why not:The
problems
8/3/2019 Performance Evaluation and Comparison of Various
4/47
To do the comparison of various edgedetection techniques and analyze the
performance of the various techniques indifferent conditions
8/3/2019 Performance Evaluation and Comparison of Various
5/47
PROBLEM:We have analyzed and did the visual comparison of the
most commonly used Gradient and Laplacian based EdgeDetection techniques for problems of inaccurate edgedetection, missing true edges,producing thin or thick lines and problems due to noise etc.The software is developed using MATLAB 7.6.0 (R2008a).
8/3/2019 Performance Evaluation and Comparison of Various
6/47
The ability to measure gray-level transitionsin a meaningful way.
(R.C. Gonzales & R. E. WoodsDigitalImage Processing)
8/3/2019 Performance Evaluation and Comparison of Various
7/47
IDEAL EDGE RAMP EDGE
8/3/2019 Performance Evaluation and Comparison of Various
8/47
Gradient: The gradient method detects theedges by looking for the maximum andminimum in the first derivative of the image.
Laplacian: The Laplacian method searchesfor zero crossings in the second derivative ofthe image to find edges. An edge has the one-
dimensional shape of a ramp and calculatingthe derivative of the image can highlight itslocation.
8/3/2019 Performance Evaluation and Comparison of Various
9/47
MARR HILDRETH EDGE DETECTOR CANNY EDGE DETECTOR
SOBEL EDGE DETECTOR
ROBERTS EDGE DETECTOR
PREWITT EDGE DETECTOR
8/3/2019 Performance Evaluation and Comparison of Various
10/47
DetectedEdgeTRSH
x
yxI
,
x
yxI
,
TRSH
yxI ,
x x
8/3/2019 Performance Evaluation and Comparison of Various
11/47
Original First Derivative
yxI , x
yxI
,
DetectedNotEdgeTRSHx
yxI
,
TRSH
8/3/2019 Performance Evaluation and Comparison of Various
12/47
Gradient requires computing partialderivatives:
Since were dealing with digitalquantities , so we use a digital
approximation about a point :
8/3/2019 Performance Evaluation and Comparison of Various
13/47
Cross gradient operators
Diagonal edge detection needs 2-D
mask*Gx = (z9-z5) Gy = (z8-z6)
0 0 0
0 -1 0
0 0 1
0 0 0
0 0 -1
0 1 0
8/3/2019 Performance Evaluation and Comparison of Various
14/47
*Masks that are symmetric about thecentre point are more useful for
computing edge detection: smallest onebeing 3X3
They take into account nature of dataon opposite sides of the center pointand thus carry more informationregarding the direction of an edge.
8/3/2019 Performance Evaluation and Comparison of Various
15/47
Uses 3X3 convolution masks, one estimatingthe gradient in x-direction (rows) and theother in the y-direction (columns).
These approximations are more accuratethan Roberts operators.
-1 -1 -1
0 0 0
1 1 1
-1 0 1
-1 0 1
-1 0 1
321987zzzzzzGx 741963 zzzzzzGy
8/3/2019 Performance Evaluation and Comparison of Various
16/47
A slight variation in Prewitt operators, aweight of 2 in the center coefficient,
which provides image smoothing. Performs a 2-D spatial gradient
measurement on an image
Calculates the approximate absolutegradient magnitude at each point ininput image (which should be ingrayscale)
8/3/2019 Performance Evaluation and Comparison of Various
17/47
321987
22 zzzzzzGx 741963 22 zzzzzzGy
Prewitt masks are simpler to implementthan these but Sobel masks have betternoise suppression, which makes thempreferable.*
-1 -2 -1
0 0 0
1 2 1
-1 0 1
-2 0 2
-1 0 1
8/3/2019 Performance Evaluation and Comparison of Various
18/47
Prewitt
Sobel
0 1 1
-1 0 1
-1 -1 0
-1 -1 0
-1 0 1
0 1 1
0 1 2
-1 0 1
-2 -1 0
-2 -1 0
-1 0 1
0 1 2
8/3/2019 Performance Evaluation and Comparison of Various
19/47
Coefficients of all the masks sum to zero
thus giving a response of zero in uniformregions(areas of constant intensity)
Computing the magnitude requiressquares and square roots calculationswhich are pose computational burdenso an approach which is frequently usedto approximate grad values is
It still preserves relative changes inintensity levels
8/3/2019 Performance Evaluation and Comparison of Various
20/47
The Laplacian of an image highlightsregions of rapid intensity change and istherefore often used for edge detection.
Its often applied to an image that has firstbeen smoothed with somethingapproximating a Gaussian Smoothing filterin order to reduce its sensitivity to noise*.
It normally takes a single gray level imageas input and produces another gray levelimage as output.
8/3/2019 Performance Evaluation and Comparison of Various
21/47
Gradientbased Operator with use ofLaplacian to take 2nd derivative.
Step difference will be represented by azero crossing in the 2nd derivative asshown earlier.
8/3/2019 Performance Evaluation and Comparison of Various
22/47
1. Smooth the image using a Gaussian. Thissmoothing reduces the amount of error
found due to noise.2. Apply a two dimensional Laplacian to
the image:
This operation is the equivalent of taking the secondderivative of the image.
8/3/2019 Performance Evaluation and Comparison of Various
23/47
This Laplacian will be rotation invariant and is oftencalled the Mexican Hat operator because of itsshape.
3. LoopthroughLaplacianand look for sign changes.If there is a sign change and the slope across this signchange is greater than some threshold, mark thispixel as an edge.
8/3/2019 Performance Evaluation and Comparison of Various
24/47
Since both the Gaussian and theLaplacian kernels are usually much
smaller than the image, this methodusually requires far fewer arithmeticoperations.
The LoG (Laplacian of Gaussian)
kernel can be pre-calculated inadvance so only one convolution needsto be performed at run-time on theimage.
8/3/2019 Performance Evaluation and Comparison of Various
25/47
Created by JohnCanny for his
Masters thesis atMIT in 1983 [2], andstill outperformsmany of the newer
algorithms thathave beendeveloped.
8/3/2019 Performance Evaluation and Comparison of Various
26/47
Low error rate: It is important that edgesoccurring in images should not be
missed and that there be no responsesto non-edges.
The second criterion is that the edgepoints be well localized.*
A third criterion is to have only oneresponse to a single edge*.
8/3/2019 Performance Evaluation and Comparison of Various
27/47
STEP-1. Smooth the image with a twodimensional Gaussian. In most cases thecomputation of a two dimensionalGaussian is costly, so it is approximatedby two one dimensional Gaussians*, onein the x-direction and the other in the y-direction.
8/3/2019 Performance Evaluation and Comparison of Various
28/47
2. Take the gradient of the image. Thisshows changes in intensity, and highlightsregions with high spatial derivatives,which indicate the presence ofedges.*Calculate the approx. magnitudeor edge strength:
The direction is computed:
=arctan(gy/gx)
{Exception for gx=0 case:
=0 if gy=0o & =90oif gy0}
8/3/2019 Performance Evaluation and Comparison of Various
29/47
Next comes resolving the edgeorientation into one of the four possible
direction in a matrix:the edge orientation has to be resolvedinto one of these four directionsdepending on which direction it is closestto (e.g. if the orientation angle is foundto be 3o, make it 0o).
Color range & setvalue
Orientation
Yellow - 0o 0o to 22.5o &157.5o to 180o
Green45o 22.5o to 67.5o
Blue90o 67.5o to 112.5o
Red135o 112.5o to 157.5o
8/3/2019 Performance Evaluation and Comparison of Various
30/47
3. Non maximal suppression: Edges willoccur at points the where the gradient is
at a maximum. Therefore, all points notat a maximum should be suppressed.
Trace along the edge in the edgedirection and suppress any pixel value(set it equal to 0) that is not consideredto be an edge.
This will give a thin line in the outputimage.
8/3/2019 Performance Evaluation and Comparison of Various
31/47
8/3/2019 Performance Evaluation and Comparison of Various
32/47
Image File
MATLAB
Display
EdgeDetection
8/3/2019 Performance Evaluation and Comparison of Various
33/47
Threshold :specifies the sensitivitythreshold for the Laplacian of Gaussian
method. Sigma: is the standard deviation of the
LoG filter. The default sigma is 2; the sizeof the filter is nXn, where n =
ceil(sigma*3)*2+1.
8/3/2019 Performance Evaluation and Comparison of Various
34/47
Threshold: specifies sensitivity thresholds forthe Canny method. thresh is a 2-elementvector in which the 1is the low threshold,
and the 2 is the high threshold. If youspecify a scalar forthresh, this value is usedfor the high threshold and 0.4*thresh is usedfor the low threshold.
Sigma: is the standard deviation of theGaussian filter. The default sigma is 1; thesize of the filter is chosen automatically,based on sigma.
8/3/2019 Performance Evaluation and Comparison of Various
35/47
One test image was artificial and theother was a real world photograph.
All color images were converted tograyscale using MatlabsRBG2GRAYfunction.
Various threshold, sigma, slope, etc.values were chosen by hand.
High threshold for Canny = 0.15 andlower threshold=0.4*0.15
8/3/2019 Performance Evaluation and Comparison of Various
36/47
Edge detection of all five types wasperformed on wheel.jpg. Canny yielded thebest results.
Canny yields thin lines for its edges by usingnon-maximal suppression. Canny alsoutilizes hysteresis with thresholding.
Second order derivative tests yield better
results than first order derivatives If hysteresis is used with LoG operator, results
would be close to Canny method. edge_detection1.m
http://edge_detection1.m/http://edge_detection1.m/8/3/2019 Performance Evaluation and Comparison of Various
37/47
for Marr Hildreth Operator withthreshold=0: If a threshold of 0 is
specified, the output image has closedcontours, because it includes all the zerocrossings in the input image.
Cannys method is still preferred since it
produces single pixel thick, continuousedges.
edge_detection2.m
http://edge_detection2.m/http://edge_detection2.m/8/3/2019 Performance Evaluation and Comparison of Various
38/47
Motion blur was applied to wheel.jpg
Four edge detection methods: Prewitt,
Sobel, Roberts and Canny were utilized.
No method appeared to be useful for
real world applications. However, Cannyproduced the best the results out of theset.
edge_detection3.m
http://edge_detection3.m/http://edge_detection3.m/8/3/2019 Performance Evaluation and Comparison of Various
39/47
Gaussian blur was applied to wheel.jpg
The edge detection methods previously
used were utilized again on this new image. No method appeared to be useful for real
world applications. This was expected asGaussian noise corrupts edges and image
detail making it difficult to distinguish clearregions in an image.
edge_detection4.m
http://edge_detection4.m/http://edge_detection4.m/8/3/2019 Performance Evaluation and Comparison of Various
40/47
Gaussian blur was applied to wheel.jpg. Then,a 3x3 average filter was applied to this image.
No method appeared to be useful for realworld applications.
However, Prewitt and Sobel were the mostaffective out of the set. This was because thesefilters have a larger mask size than Roberts andthus can show gradient information over a
larger area. This is useful because image averaging spreads
each pixels information over an area largerthan one pixel, in this case a 3x3 area.
edge_detection5.m
http://edge_detection5.m/http://edge_detection5.m/8/3/2019 Performance Evaluation and Comparison of Various
41/47
We studied Canny, Marr Hildreth, Roberts, Sobel,and Prewitt edge detection masks.
Noise can affect the results of these edge detection
algorithms. In environments where edge detection is used,motion blur is often a problem. For non noisy images, Canny appeared to work the best. In noisy environments, Prewitt or Sobel yield best results
after an average filter is applied. However, these resultsappeared to not be very useful in real-world applications.
In motion blurry environments, Canny seemed to be themost affective of the four filters. However, the results itproduced would be hard to utilize in a real worldenvironment.
8/3/2019 Performance Evaluation and Comparison of Various
42/47
Canny algorithm is adaptable to various environments- Real time implementations in DSPs or FPGAs- Fast embedded PCs
Edge detection algorithms have been modified in
many ways to solve multiple problems like:
- Feature extraction: chin contour estimation.A modified canny edge detector to detect the
potential chin edges, that is edges connectedtogether to form a continuous form.- Removing facial blemishes.
The program would remove them and fill them in witha value that would render the removed blemish
undetectable to the human eye
8/3/2019 Performance Evaluation and Comparison of Various
43/47
As a conclusion, we usually use the edge
detectors in some of these fields, which
are highly interrelated : Computer vision
Digital image processing
Feature extraction Edge detection
Scale space
8/3/2019 Performance Evaluation and Comparison of Various
44/47
[1] Canny, John, "A Computational Approach to EdgeDetection," IEEE Transactions on Pattern Analysis andMachine Intelligence,Vol. PAMI-8, No. 6, 1986, pp. 679-698.
[2] Lim, Jae S., Two-Dimensional Signal and Image Processing,Englewood Cliffs, NJ, Prentice Hall, 1990, pp. 478-488.
[3] Parker, James R., Algorithms for Image Processing andComputer Vision, New York, John Wiley & Sons, Inc., 1997,pp. 23-29.
[4] Gonzalez R.C., Woods R.E., Digital Image Processing, ThirdEdition, Prentice Hall, 2009.
[5] W. E. Grimson and E. C. Hildreth. Comments on Digitalstep edges from zero crossings of second directionalderivatives. IEEE Trans. Pattern Anal. Machine Intell., vol.PAMI-7, no. 1, pp. 121-129, 1985
8/3/2019 Performance Evaluation and Comparison of Various
45/47
[6] Nadernejad E., Edge Detection Techniques:Evaluations and Comparisons, Applied MathematicalSciences, Vol. 2, 2008, no. 31, 15071520
[7] R. Owens, "Lecture 6", Computer Vision IT412,10/29/1997.http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT6/node2.html
[8] S. Price, "Edges: The Canny Edge Detector", July 4, 1996.http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MARBLE/low/edges/canny.html
[9] Seventh International Conference onControl,Automation, Robotics and Vision(ICARCV02),Dec 2002, Singapore. Chin ContourEstimation Using Modified Canny Edge Detector.
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT6/node2.htmlhttp://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT6/node2.htmlhttp://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MARBLE/low/edges/canny.htmlhttp://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MARBLE/low/edges/canny.htmlhttp://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MARBLE/low/edges/canny.htmlhttp://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MARBLE/low/edges/canny.htmlhttp://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT6/node2.htmlhttp://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT6/node2.html8/3/2019 Performance Evaluation and Comparison of Various
46/47
8/3/2019 Performance Evaluation and Comparison of Various
47/47