Expanding boundary of an object identified by a few pixels

18 vues (au cours des 30 derniers jours)
Shuppar
Shuppar le 12 Sep 2016
I want to move boundaries of objects identified in an image by a few pixels within or without, so that I have uniformly expanded or shrunk object of almost the same shape. I was thinking of finding the neighbourhood of the pixels on the boundary and then take an appropriate union of them all - this might work for expanding the boundaries, but as of shrinking, I am not sure. Is there any other simpler way, which could work for both the things equally well?
  1 commentaire
Shuppar
Shuppar le 13 Sep 2016
Actually, I want the annular region around the boundaries detected comprising at least the 9th immediate neighbour. So I have this mask obtained from nuclei segmentation and I want an annular region around each nuclei detected. Hope, I made it clearer.

Connectez-vous pour commenter.

Réponse acceptée

Shuppar
Shuppar le 13 Sep 2016
Okay, got it. so I do the following: Let's say, I have the mask of segmented nuclei L. I will expand it (dilate) by the disk of appropriate radius and store the resulting image in P:
P = imdilate(L, strel('disk', 20));
After which I will subtract the original image (L) from the one obtained (p):
Q = P - L;
And that's it - I dunno why didn't it strike me earlier!

Plus de réponses (0)

Catégories

En savoir plus sur Image Segmentation and Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by