How to count number of neuronal cells in fluorescence staining


Hi Guys,
I have a question and need your helps and experiences regarding counting number of cell in fluorescence staining by using Image J ? I attached a sample picture to give you some information
some general information of my staining:
Thickness of sections : 40 mikrons
Sample: Rat brain tissue
taken by X10 objective in zeiss epifluorescence microscope


Hi @sertanarkan

No image was attached to your post… can you try attaching it again? This is the best way we can get you some help.

eta :slight_smile:


Hi Eta,
Thanks so much for quick respond. I tried to upload it as tiff format. however, not working. I convert from tiff to jpeg


Hello Sertanarkan,

Is this precise enough for you? If not it can probably be improved, but it looks Ok at first glance.

Edit: It finds 260 nuclei/cells.

I can post the method if you like it, it’s easy and takes just a couple of minutes.



Dear Sverre
You are awesome, thanks so much for your helps. I am really appreciated and grateful for your help.
Could you please send me your method ?

Thanks in advance



Ok, so this is a very general method and I’m sure you can find a lot of videos of it if you need more info (key words: analyze particles imagej, counting cells imagej, countine nuclei imagej).

Usually to analyze nuclei you would use the analyze particle tool after thresholding the image. However, the threshold is not very good with this much background. The rolling ball background subtraction tool in imagej handles this very well, and improves the thresholding giving you a more sensitive segmentation of nuclei (it doesn’t only register the very bright ones).


Process >> Subtract Background… >> Play around with the settings, I used a ball radius of 100 px, it worked fine. See the wiki for more info on the settings.

On the subtracted image: Image >> Adjust >> Threshold >> Manually adjust threshold untill you have a satisfactory mask.

On the thresholded image: Analyze particles >> Again, experiment with settings, the most important for you is the size of the smallest and largest objects you want to detect, I used 50-500 I think. And circularity 0-1. >> Check the add to manager box.

Your cell number is the number of ROIs added to the manager. I assume you don’t care about measuring intensities in the nuclei, so I won’t elaborate on how to do this. But you can figure it out with the help of google if you need it!

PS. If you want to create an overlay of the ROIs to the original image, like the one I posted:

Image >> Overlay >> From ROI manager




Or even easier:

Process >> Find Maxima (noise tol. 15), output count >> 298 cells. Might be too sensitive though.


Hey @sertanarkan & @Sverre

I just wanted to jump in quick on something…

Just a word of warning for manual thresholding… if you want to reproducibly count nuclei - especially when processing multiple images - it is best to use automatic thresholding methods. (MaxEntropy seems to work well on your image for example.) Manual thresholding can introduce bias and vary from image-to-image - consistency is key.

Other reproducible tools you can look into:

run("Find Maxima...", "noise=50 output=[Point Selection]"); 

Take a look at [this forum thread]( as well - they proposed a few good options that you could also apply that are more robust.

Hope this helps!

eta :)


I agree, I don’t think any thresholding is needed here though, really. Find maxima should be fine, I just forgot when I was bored and playing around with this image…

Weka will probably be good but maybe overkill for this specific task.

Thanks for your input eta :slight_smile:


Dear @Sverre and @etarena,
thank so much for your help. I am really grateful both of you. I will use these protocols and show my results to my mentor.

again, thank so much



Hi @Sverre and @etarena
Sorry for disturbing you so often. I have another question to you. How can I measure the size of my cells? (the biggest and smallest size)

Thank so much
Best regards


Do you mean the size of your nuclei? This is a DAPI stain, no?

If you want to measure the size of your cells you need a different marker.


These are not nuclei. Neurons that include parvalbumin protein. But I need to count shiny, clear and big neurons ?



Ah, I see now that you said 10x objective. Essentially just apply the ROIs you found above to the original image and hit measure.

(Select the add to manager option in the analyze particles tool.)

Your output is a table of measurements. You can define which measurements to do in analyze >> set parameters.

edit, more info @sertanarkan:
If you wish to apply this widely to analyze a large number of pictures, auto thresholding might not work. Look into the trainable weka segmentation that Ellen mentioned above. See my last forum post in a different thread for a script you could apply!