2D SEM (White) Grain Segmentation
This recipe segments and calculate the physical attributes of the white grains in the 2D SEM image

This receipt expects a 2D image acquired from SEM. The image should have lots of small white
grains that may be look a bit connected together, and yet they should be
separate. Therefore the white grains
cannot be easily segmented by the traditional thresholding method, as multiple
grains would be incorrectly identified as one grain. Therefore a more accurate approach would
require a more advanced image processing to identify each individual grain.
The recipe first upscales the image, and then identify the
white grains using traditional thresholding method. Then after the recipe locates the vague separation
area among the grains by using tophat method, the separation areas area subtracted
from the previously identified white grains.
Labeling and closing is used to make sure the grains are completely
filled. Then the result are further
separated according to its morphology before the final label analysis is done
to calculate their physical attributes such as volume and surface area.