# Nuclei counter

> Count and measure cell nuclei in a fluorescence image, right in your browser. Your image never leaves your device.

Source: https://khushisingh.in/tools/nuclei-counter/
Author: Khushi Singh (khushisingh.in). Licence: CC BY 4.0 for text and original illustrations, unless a credit says otherwise.
Evidence labels used on this site: established, strong evidence, emerging, hypothesis, debated. Where a page has Simple, Curious and Expert versions, all three follow.

---

Tools · Image analysis

Private by design

The image is read and analysed by your own browser; it is never uploaded or saved anywhere, and this page makes no outside requests. Even so, think before sharing results from unpublished or clinical images.

*[Here the web page has an interactive tool; open the source URL to use it.]*

## How it works

This tool uses classic image analysis, not AI, so every step is visible and adjustable:

1. **Smooth** the image a little, to calm pixel noise.
2. **Threshold:** Otsu’s method picks the brightness that best separates two populations of pixels (nuclei and background). You can override it, or click the histogram. (evidence: established)
3. **Fill holes**, so nucleoli and dim centres count as part of their nucleus.
4. **Split touching nuclei:** every nucleus pixel gets its distance to the background. Centres of nuclei are the peaks, and a watershed grows each nucleus out from its peak until neighbours meet. (evidence: established)
5. **Measure** each object: area, equivalent diameter, circularity and intensity (from the original, unsmoothed pixels).

**How good is it?** On the two demo fields, from the public BBBC039 benchmark (U2OS cells stained with Hoechst), the default settings find about 95% and 88% of the experts’ annotated nuclei with matching outlines (F1 scores). The second field is harder: clustered and dying cells are where simple methods struggle most. Always check the outlines by eye.

For crowded tissue or unusual shapes, deep-learning tools such as Cellpose and StarDist usually do better, at the cost of larger downloads or a Python setup. (evidence: strong evidence)

### Tips

- Use the nuclear channel (DAPI or Hoechst, often blue) and an image that is not saturated.
- Enter the pixel size from your microscope to get areas in µm².
- If two nuclei are counted as one, lower *Min. distance between centres*; if one nucleus is cut in two, raise it.
- 16-bit TIFFs are analysed at full precision; colour images are split into channels.

Demo images: BBBC039v1 (Caicedo et al. 2019), from the Broad Bioimage Benchmark Collection (Ljosa et al. 2012), CC0. Converted from 16-bit to 8-bit for the web; the expert masks are used only to score the result.

## References

1. Otsu N. 1979. A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics 9:62–66. [doi:10.1109/TSMC.1979.4310076](https://doi.org/10.1109/TSMC.1979.4310076)
2. Felzenszwalb PF, Huttenlocher DP. 2012. Distance transforms of sampled functions. Theory of Computing 8:415–428. [doi:10.4086/toc.2012.v008a019](https://doi.org/10.4086/toc.2012.v008a019)
3. Vincent L, Soille P. 1991. Watersheds in digital spaces: an efficient algorithm based on immersion simulations. IEEE Transactions on Pattern Analysis and Machine Intelligence 13:583–598. [doi:10.1109/34.87344](https://doi.org/10.1109/34.87344)
4. Caicedo JC, et al. 2019. Evaluation of deep learning strategies for nucleus segmentation in fluorescence images. Cytometry Part A 95:952–965. (Image set BBBC039v1.) [doi:10.1002/cyto.a.23863](https://doi.org/10.1002/cyto.a.23863)
5. Ljosa V, Sokolnicki KL, Carpenter AE. 2012. Annotated high-throughput microscopy image sets for validation. Nature Methods 9:637. [doi:10.1038/nmeth.2083](https://doi.org/10.1038/nmeth.2083)
6. Stringer C, et al. 2021. Cellpose: a generalist algorithm for cellular segmentation. Nature Methods 18:100–106. [doi:10.1038/s41592-020-01018-x](https://doi.org/10.1038/s41592-020-01018-x)
7. Schmidt U, et al. 2018. Cell detection with star-convex polygons (StarDist). MICCAI 2018, Lecture Notes in Computer Science 11071:265–273. [doi:10.1007/978-3-030-00934-2_30](https://doi.org/10.1007/978-3-030-00934-2_30)
