This is a micrograph of a hybrid material that contains glass fiber (small white dots), carbon fibers (big grey dots) and a matrix that contains everything! I would like to calculate the surface area (volume fraction) of each of the elements.

enter image description here

  • $\begingroup$ Standard references are How to count cells and Analyze segmented cells in an image. They can be a good starting point, especially since it looks like Binarize should be pretty good at separating the different types of elements from each other. $\endgroup$
    – C. E.
    Jun 21, 2019 at 13:17

1 Answer 1


This is all quite crude and largely done by eye.

img =

enter image description here

totalMeasure = 
 ImageMeasurements[Binarize[1 - ImageSubtract[img, img]], "Total"]

(* Out[348]= 170240. *)

Get the glass part by playing with blurring and binarization.

imgGlass = 
  Blur[MorphologicalBinarize[Blur[img, 1], .5], 2], .15]
ImageMeasurements[imgGlass, "Total"]
ImageMeasurements[imgGlass, "MeanIntensity"]

enter image description here

(* 49506.

0.290801 *)

Now subtract and binarize to get the carbon part.

imgCarbon = 
 Binarize[ImageSubtract[img, Blur[imgGlass, 4]], .18]
ImageMeasurements[imgCarbon, "Total"]
ImageMeasurements[imgCarbon, "MeanIntensity"]

enter image description here

(* Out[585]= 66975.

Out[586]= 0.393415 *)

To see if this is at all consistent, also get the matrix part.

imgBlack = Binarize[ColorNegate[img], .75]
ImageMeasurements[imgBlack, "Total"]
ImageMeasurements[imgBlack, "MeanIntensity"]

enter image description here

(* Out[709]= 55782.

Out[710]= 0.327667 *)

So it comes to around 100% but still this was all from using eyeballing to see if the pictures were in the right ballpark. I'd expect maybe up to 10% relative error in each of the measurements.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.