Cell detection is not working/displayed

Sample image and/or code


blue: nuclei
red: staining of interest

Analysis goals

I want to quantify cell positive for the red staining.


I tried to display all cells via analyze/cell detection. I selected the blue staining for the nuclei. After clicking run, no positive cells are annotated although in the workflow it is showed that a cell detection was performed.

Are the parameters wrong?
Or did I miss to select something else?

Your help is very appreciated!


Hi @Kristina, try changing the threshold. For fluorescence images, 25 might be completely wrong (brightfield images tend to work with thresholds in a much narrower range).

To get an idea what threshold might work, move your mouse over the image and check what the pixel values are on the bottom right of the screen. These should be ordered according to the channels that are displayed. In your second screenshot I see 38 and 104. (I don’t know which channels they correspond to, if you temporarily toggle off channels you don’t want to consider then the number will be easier to interpret.)

For the relevant channel, a suitable threshold should be roughly equal to a typical pixel value inside a nucleus minus the typical pixel value outside of all nuclei.

I would also recommend checking to see if the pixel size is correct in the Image tab. In some processed exported TIF files, the pixel size is not set and defaults to something like 264 microns, which will prevent any normal cell detection sizes from working. I would guess your pixel size “should” be below 0.5 microns.
That number in particular looks rather large for the size image you seem to have.

1 Like

Hi @petebankhead,
thank you for your answer.
I realized, that the Pixel size was not recognized properly (thanks to @Research_Associate ). Is there a possibility that I don’t have to set the Right Pixel size for every Picture in a Project manually?

Thank you!

See here: QuPath batch pixel size - #2 by Research_Associate

Thank you very much, this helped alot!

1 Like