Need help for segmentation

Tags: #<Tag:0x00007fd54215ec98> #<Tag:0x00007fd54215eab8>


Hi was wondering on how to do segmentation on this image,

The picture is a sample picture taken from white cast iron alloy.As you can see the microstructure is in the same color. The task is to calculate the carbide volume fraction. I understand that I have to do the segmentation thingy on phases shown in the picture which only contains two phases (carbide and austenite).

Someone please help me to show me how to segment these two phases so I can get the total percentage of the volume? Thank you Hope someone can help me fast.


Hello @kemaladitia and welcome to the ImageJ forum!

It looks like a problem you can solve using the Morphological Segmentation plugin from MorphoLibJ.

Here you are a macro that takes your image, converts it to 8-bit, inverts it and runs the plugin to obtain the segmentation:

// select your image
selectWindow("100-Spot 5-Sample 70_56.JPG");
// convert it to 8-bit
// invert it so borders are whitish
// call the Morphological Segmentation plugin
run("Morphological Segmentation");
// wait for the plugin to load
wait( 1000 );
// run segmentation with default parameters
call("inra.ijpb.plugins.MorphologicalSegmentation.segment", "tolerance=10", "calculateDams=true", "connectivity=4");

This is the result:

You can play with the tolerance parameter to obtain more or less segments.


Hey thanks for the reply :slight_smile:
But I still dont know how to differ both phases. As in your method segmented the image into several groups of phases, but I only want to separate 2 phases (one phases is those with shapes and the other is just the background)

I tried to do it using trainable weka but apparently its still wont do :frowning: