Image segementation of cement paste complex structure!

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.
Joanna

2 Comments

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

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: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

15 Comments

Dear Image Analyst,
Thanks for your kind reminder, I think here is a minor mistake about the boundary stuff. What I would like to address is that the complex structures inside this image are hard to segment, I tried use the 'BlobCoin' method but the different of those coins they have clear edge but in my case those aggregates and the cement matrix is messly mix together, so I kind of have no clue how to segment with gray value about the pores(the edge is irregular somehow) and other products have similar intensity. Should I use some erode and dilate or interpolation, but I am a layman about Matlab programming.
Cheers,
Joanna
Sean's code does segmentation by intensity thresholding, so you do have a clue. And I'm not sure why erosion or dilation would be necessary. Do you have any reason for suggesting those methods? Can you upload an image where you have traced out the 4 different compositions so we can see what they look like?
Dear Analyst,
I don´t have any image done with the four main compositions tracing yet. Yes, from his scripts I know it works but this is just initial part of my work I would like to continue with the statistical analysis about the porosity and the volume calculation of different phases, then in this case I might need to use the filter or erosion. I read your recommendation page about the segmentation, I think the Lecture 21 Image Segmentation with MATLAB could be useful for my case but it´s color RGB image, can you give me a hint about how to make it applicable for the normal gray image?
Many thanks in advance!
Joanna
Sean's code can give area fractions for each class on a pixel by pixel basis. Is that what you want? I still don't know why getting porosity or volume or area fractions would require spatial filtering. Can you explain why you'd need them, because I'm not seeing it.
My Image Segmentation Tutorial uses a monochrome image of coins. I don't know what this "Lecture 21" is or what color RGB image you're talking about.
Dear Analyst,
Sorry, I mean the one lecture about 'SimpleColorDetection' will be useful for the segmentation but I don't know how to adopt it for the gray images I have.
And I want to use the spatial filtering to remove the noise before the porosity calculation.
Cheers,
Joanna
Why? Are you sure that will improve your data? What is the noise?
Color detection does not apply to monochrome images really. You just do normal image segmentation based on intensity. If you want, you could try anisotropic diffusion or mean shift filters. I attach a anisotropic diffusion demo for you to try.
I could see perhaps doing an opening to remove some of the noise...
doc imopen
Dear Sean,
I just had an analysis about the possible composition in this cement sample and figured it out there are following parts inside this 2Da image: Pores, CaCO3, ettringite, unhydrated cement clinkers, Calcium aluminate hydrates, Ca(OH)2, and hydrated products. And I would also like to calculate the volume of the pores and the hydrated products and the clinkers. Is that possible using your code to make this?
I tried to modified this code, like in the multithresh we can set the threshold number as 5 or 7 but it always goes to mistake. Could you please so kind to help me out?
Many thanks!
Joanna
I'm still a little confused as to what you want to measure. Can you get what you want by analayzing the density or texture of the material? OK, then CT would be appropriate. But if these different types of material in the composite sample are different chemicals, then perhaps a chemical imaging method would be more appropriate. There a bunch of chemical imaging methods we use in my company to determine and map out chemicals in a scene. For example methods like MALDI, DESI, CARS, Raman spectroscopy, Mass Spec imaging, SIMS, IR spectroscopy, etc. I'm not a chemist so I don't really know the advantages or disadvantages of those various methods, like what their field of view is, or if they could detect each of the chemical species that you want to find. But it could be worth looking into.
If you think those methods are not applicable and want to continue with CT, then please attach your m-file.
@IA, CT is fine for some of this, the energy required to pass through a pore is less than the energy to pass through unhydrated cement which is different from hydrated cement.
One can interpret a CT of concrete as a phase map. If you look at the area fraction for each of the labels in my above image, you get the first step of what I believe Joanna is looking for: pore volume, large aggregate volume, unhydrated cement volume (and unhydrated cement is some mixture of the other chemicals).
@Joanna, multihtresh is only useful for identifying different intensity classes. If you want to make decisions based on any other characteristic, e.g. size/shape/location/adjacency, you'll need to use slightly more advanced techniques (the same techniques shown in some of IA's demos).
Personally, if this was my research and I had control over the scanner, I would put more energy (lame pun) into getting better CTs.
@Sean, I don't think here energy is a problem. We have synchrotron monochromatic beam 18keV. I will try to apply your scripts to first detect the pores and calculate the pores. @IA. All the chemistry measuring modality we already had but the thing is that with all the Roman or TEM they only have very limited sectional view which might not representative of the whole specimen and destructive of the sample preparation. With the CT we can scanning the bulk material and non-destructive.
@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?
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.
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)

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
%%visualize
cmap = [1 1 1;lines(3)]; % colormap
Lrgb = label2rgb(L,cmap); % to view
% view it
imshow(Lrgb);
colormap(cmap);
hCb = colorbar;
set(hCb,'YTick',0:3);
set(hCb,'YTickLabel',{'Background','Porous','Cement Matrix','Aggregate'});

7 Comments

Dear Sean,
Thanks so much for your quick guide! And I would like to answer your two questions: 1) This is one slice cross-section of 3D CT reconstruction of the cement cylinder sample. The background is the air with a gray value around 118, and the sample has no sealing or other environment to embedded during the scanning. 2) This is the .jpg image transferred from the original 16bits tiff file in order to upload, I didn´t make any change about the intensity or other information. If I understand your point correctly, there should have some peaks or multi-modal of the intensity to indicate the four main composition like: pores, HP, CH and AH, right? I think because this is a modified blending sample so the pores peak and the CH, AH ṕeak is too trivial in this histogram. And here is my continuous question about the imaging processing: 1) I would like to have statistic analysis about the main composition, so I want to get the volume of the pores, the aggregates, the hydration products and the undryated phases. Is that possible? 2) With simple threshold segmentation we can get roughly distinguished about the different parts, is it possible to have some precise and segmentation about the holes and the other parts? And then with the calculation of the volume?
Many thanks in advance!
Joanna
I mean region growing or the erode and dilate some areas?
Hi Joanna,
I would highly recommend starting with the 16bit image. Can you post it? I would guess a lot of this information was lost with the conversion to 8 bits and to jpeg.
I would do this before trying anything more complex or working on a more general algorithm.
ps. My MS thesis was on CT scanning and calculations with CT images :)
Here we go. I attached the image since it´s exceed the limitation 5Mb.
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.
Thanks
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.
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.

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!