How to detect the edges in the picture using Robert, Sobel and Prewitt's operator?

23 次查看(过去 30 天)
Hi, I'm pretty new to Matlab and I need help in the task. It is necessary to apply Robert's, Sobel's and Prewitt's edge detectors to a picture, then interruptions in the contour edges fill and connect the contour.
Any help would be greatly appreciated.
Thank you

采纳的回答

Mark Sherstan
Mark Sherstan 2018-12-15
Refer to some of the tutorials found here and here then come back with specific quesitons you might have.
  4 个评论
Miralem Ikanovic
Miralem Ikanovic 2018-12-15
i=imread('slika64_1.jpg');
subplot(2,2,1);
I=rgb2gray(i);
imshow(I);
title('Orginal');
BW1=edge(I,'prewitt');
subplot(2,2,2);
imshow(BW1);
title('Prewitt');
se90 = strel('line', 6, 90);
se0 = strel('line', 6, 0);
BW2dil = imdilate(BW1, [se90 se0]);
subplot(2,2,3);
imshow(BW2dil);
title('Dilation');
BW3fill = imfill(BW2dil, 'holes');
subplot(2,2,4);
imshow(BW3fill);
title('Impact zone');
Done !

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by