Edge detection using morphology in Matlab
Show older comments
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 Comment
Mary Gh
on 18 Jun 2021
what are built-in functions? Did you find any answer? If you found please share it here I need it. Thank you
Answers (0)
Categories
Find more on Object Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!