Foam analysis : cell size distribution

Dear all,

I’m just starting to work on Image J.
I took pictures of foams with an optical microscope and now,I would like to know size and size distribution of cells.
I tried several modifications of my pictures to increase the contrast like binarization and threshorld before starting the “analyse particule” tool.
The result is not good at all because the material is quite transparent and the software doesn’t make the difference between cells in the different 3D plan.
Do you have any advice to overcome this difficulty ?
Find attached one of my pictures.
Thank you a lot for your help.


1 Like

Yes, foams can be challenging! There is a recent posting on this forum with a similar question, where @dlegland suggested the Morphological Segmentation plugin. A very quick application to your image is below. It’s far from perfect, but I didn’t spend too much time with it. You should be able to improve the results some. I think if you export the “Watershed Lines” image from this plugin, you could then Threshold and run Analyze Particles.

I would also go back to the imaging step, and see if you can improve the contrast in the initial image. Depending on your sample and mounting, you may be able to do something as simple as running a marker over the foam surface to make it stand out from features deeper in the foam.


Thank you very much for your quick answer.
I have already tried this plugin and as you find it’s not perfect but you’re right maybe I would be able to improve it with the threshold tool.
The marker is a good idea but what kind of marker do you preconized for a polymer foam?
Again thanks for your help,


What kind of marker? Honestly, I haven’t done it much, but someone else in my company mentioned they had done it. When I tried it, I just grabbed whatever was lying around. Probably a ubiquitous Sharpie or something similar with a blunt tip.

I would try different illumination techniques. This image is several millimeters across, based on the scale bar, so I’m guessing it’s taken with a stereo microscope? I would try oblique illumination, for example, to emphasize the surface. Another possibility is to try to cut a thin “sliver” so the deeper layers aren’t present. Transmitted light works well if you can do this. Unfortunately, I don’t have a sure solution.

This is getting into a discussion more of microscopy than ImageJ. To keep it on topic, I’ll point out that this illustrates the importance of the first step in image analysis–image acquisition!


Wow, in our age of genetic dyes, I didn’t realize you literally meant to draw on the foam. :laughing:

Just want to chime in that no one here is going to be a bureaucrat about that. If the discussion is helpful to the community, no worries.

Ok for the marker I will consider your idea.
This pictures has been taken with a stereo microscope and I tried different illumination techniques : raking and normal incidence , transmission… I found that the raking incidence is the best solution to at ease the cells on the bottom.

To cut my samples, I tried the microtome but it wasn’t successful for the moment, I have maybe to consider to put resin inside the cell to form a stiff block.

I attached two pictured of my samples. I tried to cut a thin slice with a blade but again it’s not perfect.

Thank you for your help,


1 Like

I think this problem cannot be resolved easily from single images of a projection. The image shows cut bubbles as well as embedded bubbles and some of those have other bubbles in them. You won’t be able to estimate anything very reliably from semi-transparent sections.
Perhaps you need some kind of confocal microscope image so you can get a single, very thin cut plane and work out the size of the holes without counting embedded bubbles (but that are not cut at that section plane). Then look at a stereology book (Weibel’s Stereological Methods is a classic) to work out the size or volume distribution out of the set of sectioned bubbles. Or maybe you could microCT the foam and work out the size of the bubbles with a 3D particle plugin.

1 Like

Dear Gabriel,

Thanks a lot for your suggestions.
So for you it’s more a problem of choosing the good analysis apparatus?
The book looks interesting, I’m still working on it…