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

조회 수: 20 (최근 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