Extracting Pores from Image with Noise and different Brightness

Hello and a wonderful day,

I am currently working with ImageJ/Fiji and i am kind of new to this software.

I have a lot of TIF data (from a CT-Scan of a cylindrical object) and trying to extract the pores (darker points of different size in the inner part of the picture). My goal is to get a binary picture with on the one hand the pores and on the other hand the material so i can further process it.
If i want to threshold the picture it shows also the noise in the image (this can be slightly reduced by appling filters but i didnt get a satisfactory result) and its kind of hard to get the pores on the edges because in this area the picture is slightly brighter.

N362014.tif (5.4 MB)

I would appreciate every help and thanks a lot in advance


Your CT-image suffers not only from noise but also from uneven background intensity.
For the latter I’m quite unsure regarding the cause. Is the density of the material decreasing versus the border?
Concerning the noise, you need to improve the image acquisition process, i.e. increase the dose, I guess.
Perhaps @steinr is willing to help.

Here is what I get at best:

1 Like

@anon1754903 No the density is the same over the whole cross section, but its a very dense material (steel) so maybe the penetration of the CT-Scan at the outer edges is a lot better then in the middle section.
Sadly i cant really increase the power, because its already on max power.

Well to me that looks quite good. Thats by far better then what i was possible to get. How did you do it?

Thank you a lot and i really appreciate your help!

Here is what I get:

Uploading: 2-1.jpg…
With this macro:

run("Duplicate...", "title=1");
run("Set Scale...", "distance=0 known=0 unit=pixel");
run("Duplicate...", "title=2");
run("Bandpass Filter...", "filter_large=40 filter_small=3 suppress=None tolerance=25");
run("Unsharp Mask...", "radius=30 mask=0.60");
run("Gaussian Blur...", "sigma=3");
setOption("BlackBackground", false);
run("Convert to Mask");
run("Set Measurements...", "area mean redirect=None decimal=4");
run("Analyze Particles...", "size=0-1000 display exclude clear add");

NB: I just reviewed my result. It seems to me that the macro detects “no existing” points!


Instead of trying to “rescue” this image I would instead try to rescan it with better quality. The noise you see here is due to insufficient input data; the details seen in the original X-Ray image are too few to provide enough data for a decent reconstruction. I suggest you increase the scan time (longer exposure with less power) or increase the number of projection images by at least a factor 5. How many projections do you use? My guess is 1500 or less. Try to increase to 6000 or more, that makes a big difference. Yes it takes longer time and costs more in instrument rental, but you get that back many times in the time you will save in the post-processing with better data.

What CT instrument are you using? Are the X-Rays filtered through a metal first? Can you upload the metadata files as well? There is probably a file in some text format or XML that describes the instrument settings for this scan.

Yes you are kind of right here. When the X-rays (which are polychromatic when using non-synchrotron radiation) enter the sample, the longest wavelengths are lost first, shortly after entering the sample. The remaining traveling X-rays are thus of a shorter wavelength, which more easily penetrates the remaining material. The reconstruction software then thinks the material is less dense at the inside, which is not the case in reality. This effect is called “beam hardening” and is quite normal. It is also difficult to correct, as it is a physical limitation of the method. The best remedy is to increase the acceleration voltage as much as you can, and then use physical filtering of the X-rays to deliberately remove the longest wavelengths before they hit the sample. My guess is that this is already done here. When you say the instrument is on “max power” I assume this is what you mean. If this is a steel sample (what diameter?) I would say that the beam hardening effect is quite little here; so the chosen power / filtering seems already adequate.

The instrument I am using (Nikon/XTek 225S) has an option to compensate for beam hardening in the software. I have found that to give better results than physical filters, as the latter gives a big increase in the noise. Perhaps your setup already filters too much; you can filter using a lighter metal and instead accept a more uneven background, but with less noise.