Monday 30 January 2017

Image Processing ► Canny Edge Detector - Prewitt Edge Dectector -Sobel Edge Detector


Code:

A = imread(‘cameraman.jpg’);    %needs image file “cameraman.jpg”
can = edge(A,'Canny');          %detecting edges using canny method
pre = edge(A,'Prewitt');        %detecting edges using prewitt methd
sob = edge(A,'Sobel');          %detecting edges using sobel method
imshow(can);
imshow(pre);
imshow(sob);


Output:


                      Original Image                                                       Canny Edge Detector



                    Prewitt Edge Detector                                               Sobel Edge Dector



Conclusion for Edge Detectors


Among these 3 edge detectors, Canny edge detector is the better one. This is because canny detects deep edges inside an image and also reduces the number of ‘False’ edges as compared to sobel and prewitt edge detectors.

No comments:

Post a Comment