0
$\begingroup$

I am doing a segmentation of some objects in a 3D image img3d: enter image description here

image-stack can be downloaded from https://www.dropbox.com/sh/nsszin69z5sfzs2/AABeN2IOV4CwheJkOWq0G34na?dl=0

I wish to divide the image into five morphological components (equal to the objects seen in the stack).

I follow the procedure:

morph = MorphologicalComponents[Binarize@img3d,CornerNeighbors -> True];
morph // Colorize

the image i get at the end is shown below (viewed from two angles):

enter image description here

the segmentation seems ok when viewed from the top, however, not too good when viewed from the bottom; one reason is because these tiny components (specks) can be merged with the nearest bigger components!

enter image description here

One scheme i can think of uses Nearest (constructed from the centroids of the five bigger components) and ReplacePart to re-label small components in morph with the label of the nearest big component. The method proves to be very slow.

Is there an efficient way to merge the smaller components (specks) with bigger components?

$\endgroup$
  • $\begingroup$ How to get your img3d $\endgroup$ – yode Apr 17 '17 at 17:38
  • $\begingroup$ @yode just added the link $\endgroup$ – Ali Hashmi Apr 17 '17 at 17:38
  • $\begingroup$ Quickly fix your code.Colorize[MorphologicalComponents[ Closing[DeleteSmallComponents[Binarize@img3d, 50], 1]]] $\endgroup$ – yode Apr 17 '17 at 18:05
  • $\begingroup$ @yode the problem is even if i use your current code and change 50 to say 1 we have the same problem. Also, will closing artificially interpolate? $\endgroup$ – Ali Hashmi Apr 17 '17 at 18:11
  • $\begingroup$ @yode i removed the DeleteSmallComponents from the question. $\endgroup$ – Ali Hashmi Apr 17 '17 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.