MATLAB Answers

Image segementation of cement paste complex structure!

17 views (last 30 days)
xsfeng on 9 Dec 2013
Commented: Image Analyst on 6 Apr 2019
Dear all,
I have a cement paste gray image of the CT, now I want to do some quantative analysis of the porosity and the microstructure characterization. From the image we at least can get 4 main composition, how can I use the histogram or threshold to finely distinguish different parts in this image? Can anybody help me with the Matlab programming? I tried the standard segmentation but it doesn´t work so well since the boundary of cement material is almost invisible. Thank you so much for your help.


Maria Huguett
Maria Huguett on 5 Apr 2019
Could you tell me please, where can I find the "Sean's intensity thresholding method"? I would like to try it, since I need a method to segmentate pores, grains and paraffin of my sediment sample, to get porosity values. Thanks!

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 9 Dec 2013
I'm not sure what you meant by "the boundary of cement material is almost invisible" - perhaps you could explain.
If Sean's intensity thresholding method doesn't work, like say you had some structures that were of the same brightness but just different textures, you could combine that with some texture segmentation. Try stdfilt() or entropyfilt(). Or you could try simulated annealing (I have a demo fro that if you want). Again, only for cases where intensity thresholding doesn't do the job well enough.
If you want an intensity thresholding segmentation demo, see my Image Segmentation Tutorial:


Sean de Wolski
Sean de Wolski on 13 Dec 2013
@xsfeng, are you taking dark frames? If so, how often? How are you generating the maps that you pass into a reconstruction algorithm (like iradon ) or is this all handled by the scanner?
xsfeng on 13 Dec 2013
Yep, we have both flat field and dark field and for the reconstruction we use filtered back projection algorithm. But the imaging principle is the same as the conventional CT.
Sean de Wolski
Sean de Wolski on 13 Dec 2013
I guess I'm having a hard time understanding why there isn't more contrast and why the background (air) isn't the darkest part...

Sign in to comment.

More Answers (1)

Sean de Wolski
Sean de Wolski on 9 Dec 2013
Edited: Sean de Wolski on 9 Dec 2013
There are a few things a little weird about your image:
  1. First, for a CT image, I'd expect the background to have a lower intensity than everything else since this is void space (unless is was scanned in a liquid of some kind). What do you know about the setup of the system and do you have control over it?
  2. Second, it appears the histogram has already been modified in some way. I would expect this to be fairly bimodal for an object in the forground.
As far as identifying the cement matrix, here's a rough first pass to get you started:
I = imread('cct.jpg');
mask of the concrete part
disk = getnhood(strel('disk',4)); %disk
Istd = stdfilt(I,disk); %std filter tor emove backgoryund
Mcyl = Istd>2;
C = (conv2(double(I),double(disk),'same'));
levels = multithresh(C,2); %otsu thresholding
L = imquantize(C,levels); %apply thresholds
L = L+1; %increment
L(~Mcyl) = 0; %remove background
cmap = [1 1 1;lines(3)]; % colormap
Lrgb = label2rgb(L,cmap); % to view
% view it
hCb = colorbar;
set(hCb,'YTickLabel',{'Background','Porous','Cement Matrix','Aggregate'});


Show 4 older comments
xsfeng on 4 Mar 2015
It's quite helpful but still a small question: how can I remove the artifacts inside the pores? I mean the green dots inside the pore blue area should be kind of artifact.
Sean de Wolski
Sean de Wolski on 5 Mar 2015
A morphological opening ( imopen) with a small structuring element should do it. Alternatively, you could create a mask of the pores and then use imfill(pores,'holes') to fill in all of the holes inside a pore.
Image Analyst
Image Analyst on 5 Mar 2015
To get rid of holes in blobs smaller than a certain amount, say 500 pixels, I use bwareaopen
binaryImage = ~bwareaopen(~binaryImage, 500);

Sign in to comment.

Sign in to answer this question.