Need help quantifying between two phase

Evening All,

Can somebody please help,

I have an image below. With dark grey, light grey and background.

It is possible to separate these out to get a volume fraction?


Can somebody help, as i’m not getting very far with this. I assume its simple but don’t know where to start. Look at my images, surely i’m going the long way round?

image image

Hi @Jblakes,
For this type of image use grey value (8-bit or, preferably, 16 bit grey) instead of color.
You have a bit of vignetting; the consequence of uneven illumination such that the edges are darker. After countering this with a ‘Process>Remove Background’, the image is quite thresholdable with various levels. The scratches in the image are a bit annoying but you can distinguish most areas.
You might want to change your illumination to have more than the current (178-129=)51 grey levels. Using 16-bit theoretically gives you 65536 levels with much better chances.
Also try to avoid reflection. Is this a bluish lamp reflecting through the ocular of a microscope we see at Rectangle Selection X: 1210 Y: 493 Width: 383 Height: 260?

Afternoon eljonce,

I have had a mess around with imageJ and don’t seem to be getting any closer. I thought the process was straight forward.

The image was taken from a optical microscope and 500um, how do I go about changing the illumination?




This macro works “a little” for your imageof this post. .
Does not work for the other image.
You will need 2 plugins:

  • Polynomial Shading Corrector
makeRectangle(264, 156, 940, 834);
run("Duplicate...", "title=2 ");
run("Duplicate...", "title=3 ");
// Measure phase 1
setOption("BlackBackground", true);
run("Convert to Mask");
run("Set Measurements...", "area bounding display add redirect=None decimal=2");
run("Analyze Particles...", "display add");
// Combine ROI
// Select Roi
roiManager("Show All without labels");
roiManager("Set Color", "blue");
roiManager("Set Line Width", 0);

// Measure phase 2
run("Polynomial Shading Corrector", "degree_x=2 degree_y=2 regularization=2");
run("CLAHE ", "blocksize=154 histogram=256 maximum=6");
run("Gaussian Blur...", "sigma=4");
run("Subtract Background...", "rolling=50");
setAutoThreshold("Triangle dark");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Analyze Particles...", "display add");
roiManager("Show All without labels");


@Jblakes Hi James,

Obviously there is quite some room for improvement, to that end we need to know more about your imaging setup and the way you obtained the images you posted.

The first and third image you posted look like they have been made with a camera from a computer screen, or are a screenshot of some sort of software. That could explain the reflecting blue rectangle half way down on the right hand side. I’m not sure what you mean by ‘500 µm’ and how the scale bar (with the text) came into the image.

Please be verbose as on how you create these images.
Mention magnification (objective), adaptive optics, camera brand, type or specification, interface between camera and computer, software that controls the camera, how you have your imaging settings in that software, how you save your images (format, bits per pixel etc.), everything helps.

Briefly some points for improvement: Köhler illumination, optimised exposure time to use largest dynamic range possible, maximum number of bits the camera can produce, not colour but monochrome image, no processing by acquisition software, save as raw data: tiff, not jpg.

With optimised settings, any subsequent processing will yield better results.