Counting grains in a CT-Scan (..automatically?)


I made a CT scan of a rock sample and now I’m looking for a feasible approach to evaluate it (I’m new to imageJ).

The sample consists of

  • White + bright grey grains [yellow circle]
  • A few dark grey spherical objects [red]
  • And material in-between the spherical objects, unfortunately with similar grey levels

A large portion of the white phase is located outside the spherical objects. A small fraction, however, lies inside the spherical objects [green circle]. With thresholding it is quite easy to select all the white grains and, therefore, I can easily determine the fraction of this phase in the whole sample. I have, however, difficulties to find a way to only determine the fraction of the white phase that is located inside the spherical objects. Is that possible at all with the low contrast between the spherical objects and the surrounding material? Is there a plugin that could help me? I really hope that there is a way to avoid counting them manually, so any ideas are welcome!


Good day,

not sure a reliable analysis is possible.

Please provide a typical original raw image in TIFF- or PNG-format.
(An image converted from a JPG-image won’t help.)




Hi, thanks for your reply! Here’s the .tiff image and another .tiff from a different sample (easier to evaluate?).

(I’m not sure if the upload worked, the image doesn’t show but apparently I can download it…)



but I wasn’t able to find a preprocessing and threshold by which the dark areas could reliably be isolated. This holds for both sample images.

Perhaps you can adapt the X-ray energy to achieve a better contrast.



A local adaptive threshold may help.
A corresponding plugin is partt of Fiji.