Three phase separation and analysis


I am a new user and I want to use count the number of pixels for the three colours shown on the attached image (blue, pink and grey).

Is this possible with imageJ, can anyone help with the step-by-step approach to solve this?

Many thanks! :heart_eyes:


This might be a task for pixel classification. Try WEKA trainable segmentation, Knime or Zen Intellesis.

1 Like

Many Thanks Sebi06…
I did see that they can do the job but I’m not sure which one is more accurate.

Hi Ephraim,

what is the exact task? your want to segment different objects first and then get the number of pixels within them? Or just global?

To help you we would need a test file, please provide a format without lossy compression (jpg is bad) such as .tif or .png.

Getting the number of pixels for each color can be done with the following plugin: be aware you have to change the name of the .class to Color_Pixel_Counter.class


1 Like

I can only say that Intellesis is especially suited for color images, but also works for every other.

1 Like

Thanks again! Your response are very helpful

Hi Christopher,

Thank you for your reply.

In this example, One pore.tif (1.6 MB)

I want to get the number of pixels that represent the blue and pink colours only. Even though the image contains other colours like black around the edges of the circle, and light brown as the background.

Also, the link to the plugin isn’t opening.

Many thanks for you input.


Ah ok now I get it. Best is to use the Color Threshold Plugin:
Image > Adjust > Color Threshold…
From the mask you generate you can get the area using the particle analyzer:

Weka Segmentation should also give good results:
The generated image can then be separated in the individual classes of colors so you can measure their area.

Just experiment with these two tools a bit. See if they produce useful results.

If you need help for further processing of the generated segmentation and doing the measurements I am happy to give you more detailed instructions.