Help counting cells


I am a stundent and I am currently trying to count some “cells”. Well they are not exactly cells but more like tracks. The background is white and the tracks are all black.

. I tried using ImageMath to invert the background to black and tracks to white. After that I used Identify Primal Objects but after the analize the window that open does not contain what it interest me: the number of objects counted.

I am new to this program so if you could help me with some steps. Thanks!


Hello there,

In the second picture, the “Input image” still shows “dark cells on white background”, which means in the input of your module IdentifyPrimaryObject, you have not yet chosen the inverted version, (which may be named “ImageAfterMath” by default).

Please try to select the correct input again and use threshold algorithm such as MoG or RobustBackground.


Thank you, Minh! It worked now. I did not chose the inverted version. Now I face two more problems. First one is about memory I think.

. I do have 8 gb of Ram so I don’t know what is the problem.

The second problem is about one of RunImageJ function. I am curently trying to split channels of a TIF and to chose the Blue one. In ImageJ program there is a function called Split channels that let me split the channels and to chose the one that I want ( blue, red, green). I tried using Macros and Command but I did not get any results. I will show you a pic from ImageJ program.

This is what I hope to achieve in this program. I need the blue channel TIF so I could extract the background.

I am grateful to you for your help.



The first issue wasn’t so clear for me whether the error appears when you used the inverted version? and no errors when you used original version?

The second issue is easier to fix: inside CellProfiler, we have a module called ColorToGray, where you can choose “Split” operation to do exactly the same ImageJ procedure. So no need for extra steps in ImageJ.


The error appeared when I tried to use some RunImageJ functions. It is now resolved. Thank you for your time.