Automatic cell counting and diameter measurement (Need guidance)

Hi I’m new to imagej, I want to know if It is possible to automaticly count the number of cells and measure their diameter in a histological slide like the one below, I watched some tutorials in youtube using the treshhold method but didn’t work for me, I noticed that the particles they were analysing kind of had a homeougenous color so It was easy to isolate them while the cells in my slides have uncolored spaces inside them, I don’t know if that’s why It didn’t work or maybe I was doing something wrong, looking forward to your advices.

Hi
@Jameb
Yes it’s possible.
Have you read this?
https://imagej.nih.gov/ij/docs/guide/index.html
To be helped it is advisable to deposit two photos:

  • an original photo (not jpeg)
  • an annotated photo of what you are looking for.

No, we are not all biologists.
But am I a little surprised at the size of your “particles”?

The average sizes are of this order:
1 μm for bacteria.
50 µm for animal cells.
100 µm for plant cells

Greetings

@Mathew I’m reading that guide right now, these are fish oocytes at different stages of maturation, they’re bigger than the other type of animal cells, I just wanted to know if It is possible with the images that I have and what method is best.
I appreciate your reply.

1 Like

@Jameb
A work track …

run("Duplicate...", "title=1 ");
run("Duplicate...", "title=2 ");
run("RGB to CMYK");
selectWindow("CMYK_2");
run("Stack to Images");
selectWindow("Y");
selectWindow("M");
run("Enhance Contrast...", "saturated=10");
setAutoThreshold("MaxEntropy dark");
//run("Threshold...");
run("Convert to Mask");
run("Fill Holes");
run("Set Measurements...", "area redirect=None decimal=2");
run("Analyze Particles...", "display add");
selectWindow("1");
roiManager("Set Color", "black");
roiManager("Set Line Width", 0);
roiManager("Show All without labels");
n=roiManager("Count");
print("Number="+n);type or paste code here

Good Luck

1 Like

M.tif (3.7 MB)
@Mathew Thanks a lot for the help I appreciate It, but how can I make the color of the other cells of the image (image attached to the comment), to have a single color and be recognized as single particles like the medium size ones in the middle because I got 1371 measurements after running the code, most of them are particles inside those cells that have those uncolored empty spaces, It’s the problem I encountered before.

1 Like

Hello
Threshold: Huang
on Image K
You will get fewer small points.
You can also play on the criteria of size measurements in “Analyze particles”.
Good luck

1 Like

@Mathew Thank you so much Mathew this was the closest to what I’m looking for, does It require some prior editing before setting the huang autotreshhold because I don’t get the same results, could you mention the exact steps if It please you It would be greatly appreciated.

@Jameb

run("Duplicate...", "title=1 ");
run("Duplicate...", "title=2 ");
run("RGB to CMYK");
selectWindow("CMYK_2");
run("Stack to Images");
selectWindow("K");
setAutoThreshold("Huang dark");
//run("Threshold...");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Fill Holes");

Greetings

1 Like

@Mathew Thank you you’re a lifesaver, sorry to ask too much, is It possible to make boundaris between those cells that got clumped together and to count those three big cells who are empty, thank you again

@Jameb
Maybe you should try Cellprofiler (?). But I don’t use it.

1 Like

@Mathew allright, thanks a lot for the help.

I was able to get this using Trainable Weka Segmentation followed by Analyse Particles…you will be the best chooser of the variables in the analysis steps since you know best what in the image is relevant.

image

Ron

Thanks a lot @rondespain, I’m going to try It out, did you do any prior editing to the image before TKS?


You can see the training set selections below

Below is the model overlaid on the image

Below is the Create Result output

Use Analyze Particles next to count the blobs

Here is a great intro for TWS usage

@rondespain Thanks a lot for the help, I appreciate It.