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
No comments:
Post a Comment