Edge detection using morphology in Matlab

I'm trying to figure out how to detect edges using morphology in Matlab. I have this image:
and I'm trying to get the following results:
but I can't get anything close to that. The only thing I was able to do is this:
a = imread("mri.png");
SEedge = strel('square',5);
b = imdilate(a, SEedge);
c=b-a;
imshow(c),title("1");
And I got the following results:
But this is not good enough. I know about built-in functions in Matlab but I don't want to use them, I want to do it with erosion or dilation and my own structuring element. Could anyone help me figure this out or provide some useful resources?

댓글 수: 1

Mary Gh
Mary Gh 2021년 6월 18일
what are built-in functions? Did you find any answer? If you found please share it here I need it. Thank you

댓글을 달려면 로그인하십시오.

답변 (0개)

질문:

2020년 6월 16일

댓글:

2021년 6월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by