how can I obtain Boundary of an image with morphological operators?

1 Ansicht (letzte 30 Tage)
how can I obtain Boundary of an image with morphological operators? for example my image is A...I want to obtain Boundary and fill Within the image. thanks
  1 Kommentar
sara
sara am 5 Sep. 2014
ok thanks Image Analyst and Matt
if I want to fill my image I should use an other input arguments for imerode...do you know what I can use?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 5 Sep. 2014
I agree with Matt J. If you want an image you could also use bwperim(). To do it morphologically you'd call imerode() to shrink the blobs out one layer, then subtract that from the original
perimImage = binaryImage - imerode(binaryImage);
  7 Kommentare
sara
sara am 5 Sep. 2014
Sure Image Analyst but when I want to run imfill it wants to select some points and Because of this my result has a little Differences.but I ask a new question for this and hope that you help me.
Image Analyst
Image Analyst am 5 Sep. 2014
No it doesn't. I do it all the time. Just do this:
filledImage = imfill(binaryImage, 'holes');
Again, I do it all the time so I know for a fact that it works.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Matt J
Matt J am 5 Sep. 2014
Bearbeitet: Matt J am 5 Sep. 2014
You can use bwboudaries to find the boundaries, but if you're just going to end up filling them, you could probably just use imfill.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by