Isolating almost-round shape grain out of air and capillary


Dear ImageJ community,

I am quite new using Image J and I am stuck trying to segment this image. My first goal is to be able to isolate the whole roughly-round-shape grain from the air (homogeneous environment around it) and the capillary (perfect circles on the outer edge) because I want to calculate its volume (I have 600 sections similar to this one), and then quantifying minerals in it.

I tried different combinations of processing steps but I didn’t find anything satisfying yet.

Is there an easy solution that appears clearly to you by any chance?

Here are 4 section images of the volume:





Welcome to ImageJ and the Forum. So … your images are not so easy to segment. If you want to know more about Segmentation in ImageJ and just getting started in general with ImageJ/Fiji… here are some helpful links:

For one of your image examples… I tried using MorphoLibJ’s Morphological Segmentation tool (linked just above). Here are the settings I used - note: this was just a quick ‘test’ and could very much be refined - and the resulting segmentation looked like:

You have variations in the grain - so those smaller features are being segmented separately - but it seems you ultimately want that information as well. Just play around a bit with that tool and see if it does what you need.

If you have more specific questions - just post again! We are all here to try to help.

eta :slight_smile:


Hi Eta,

Thanks for your great answer, I’m looking at it. Thanks a lot for giving me an example on my data!




yeeah, that’s awesome thanks, I could separate the grain from the background. I’m looking for the option to fill the dark blue part of the image with pixel value = 0
Do you know how I do this?
I am watching the segmentation video also :slight_smile:




I’m glad you found this helpful! :slight_smile:

Is there a reason you want to set background to zero? You should be able to segment the shape you want/need without doing so…



Hi Eta,

I was thinking that:

  • if I am able to put zero values to the voxels where the dark blue color is (background),
  • then I can easily threshold my 3D volume above 0.
  • That means I will be able to nicely visualize my grain in 3D
  • and do statistics on the grain only, without being parasited by the background.



You can technically used the Fill command to change the values of pixels.

But you should be able to segment what you need using the labeled image you get as output. Read this section of MorpholibJ’s page on the ImageJ wiki for more help. As it says… “… MorphoLibJ provides the Label Edition plugin (available under Plugins :arrow_forward: MorphoLibJ :arrow_forward: Labels :arrow_forward: Label Edition).” That guy should help you process your labels, etc.

Unless I’m off base here - @iarganda??



To add to what @etarena already said, you can also

  1. Replace the label you want by zero using Plugins :arrow_forward: MorphoLibJ :arrow_forward: Label Images :arrow_forward: Replace/Remove Label(s).
  2. If you know that your background label is the largest one in the image, you can use Plugins :arrow_forward: MorphoLibJ :arrow_forward: Label Images :arrow_forward: Remove Largest Label.