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

23 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Mark Sherstan
Mark Sherstan il 15 Dic 2018
Refer to some of the tutorials found here and here then come back with specific quesitons you might have.
  4 Commenti
Miralem Ikanovic
Miralem Ikanovic il 15 Dic 2018
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 !

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by