Pore Recognition from SEM images

Hi experts,
I am very new in processing images. I have lots of SEM images of shale and want to recognize all the pores within the organic matter (the dark color area). Since the color of pores varies and sometimes it is close to the color of organic matter, I believe texture classification should be used. I have tried FIJI Trainable Meta Segmentation, but the result is not good, and I continue to try it. Also, I want to try KNIME and ILASTIK. Any suggestions? Can any help me to run a test using KNIME or ILASTIK? Thanks.
Two images are attached. The first one is the origional SEM image, and the second one is the pore I recognized manually.a02_017.tif (3.7 MB) a02_017_Edited.tif (11.1 MB)

Hello Guochang Wang

Is that what you want? It’s pretty close to your expectations.
If so, then you must use the following plugin:Statistical Region Merging

Hi @gxw116,

if you want to give ilastik a try, I’d suggest to do the following:

  1. do Pixel Classification with two classes: Foreground (pores) and background (anything else). You can check this tutorial on youtube to see pixel classification in action. You should export the resulting probability maps (ideally to an hdf5 file, since you want to use it in a second ilastik workflow. If you want to view the resulting hdf5 file in Fiji, consider using the ilastik import/export plugin in fiji.)

  2. do Object classification [raw data + pixel prediction map] using the original image as raw data and the result from step 1 as the prediction map. In this step you go from pixels to objects by thresholding. Object classification is really great to further refine which objects you want, and get rid of objects that you are not interested in, but have such a similar appearance on a pixel level, that pixel classification highlighted those as well. See this tutorial on youtube.


Hi Mathew,

The result is much better than using grayscale only, but still several pores missed. Thank you very much for your help. I will try it.

Hi Dominik,
Thank you very much for your suggestion. I will try it. Exciting.


Hi @gxw116,

Just found this fantastic presentation on segmentation from @iarganda