ImageJ Workflow

How to Count Cells in ImageJ (and Fix Touching Nuclei in Batch)

ImageJ / Fiji can count clean, sparse nuclei in under two minutes. The workflow breaks when you have 100+ fields of view with uneven illumination, dim marker channels, or densely clustered cells where binary watershed either under-splits pairs or shreds irregular nuclei.

Segmented overlay for Fluorescence Cell Counting & Positive Rate
Raw micrograph for Fluorescence Cell Counting & Positive Rate
RawQuantified
Reference output for this workflowDrag the divider to compare the unmodified micrograph with automated quantification for Fluorescence Cell Counting & Positive Rate.View Fluorescence Cell Counting & Positive Rate specs

Standard ImageJ / Fiji cell counting steps (single image)

For a single 8-bit or 16-bit nuclear channel (such as DAPI or Hoechst), the conventional Fiji pipeline converts intensity into a binary mask and counts connected components:

  1. Split channels

    Image Color Split Channels, then duplicate the nuclear channel so raw pixel intensities stay untouched.

  2. Remove illumination gradient: Process Subtract Background (Rolling ball radius: 50 px for typical 20x mammalian nuclei).

  3. Threshold

    Image Adjust Auto Threshold (try Otsu or Huang; avoid manual per-image sliders across treatment groups).

  4. Split touching nuclei

    Process Binary Fill Holes, then Process Binary Watershed.

  5. Measure

    Analyze Analyze Particles (Size: 30–Infinity µm², Circularity: 0.30–1.00, check Exclude on edges and Summarize).

Three failure modes when scaling ImageJ to a full experiment

Once an experiment exceeds 30–150 micrographs across multiple drug concentrations, classical binary thresholding creates systematic bias that peer reviewers flag immediately:

Failure modeWhat happens in ImageJImpact on your paper
Clustered / touching nucleiDistance-map Watershed only splits convex pairs; elongated or 3+ cell clusters merge into one giant ROI.Under-counts high-density control wells and distorts positive-cell percentages.
Uneven exposure or photobleachingA global threshold tuned on well 1 drops dim nuclei in well 96; per-image tuning introduces observer bias.Reviewer 2 asks why thresholds differed between control and treated groups.
Marker co-quantificationRedirecting nuclear ROIs onto a cytoplasmic marker channel misses perinuclear signal unless you script ring dilation.Hours of debugging ImageJ macro syntax and mismatched CSV rows.

Reproducible Python alternative (batch-safe)

Modern microscopy segmentation models (InstanSeg and Cellpose-SAM) predict cellular boundaries directly from learned spatial gradients rather than fragile intensity cutoffs, keeping one locked protocol across every image in your study.

Minimal reproducible batch count check (Python)
from bioio import BioImage
import numpy as np

img = BioImage("well_A01.czi")
dapi = img.get_image_data("YX", C=0, T=0, Z=0)
marker = img.get_image_data("YX", C=1, T=0, Z=0)
px_um = img.physical_pixel_sizes.X  # preserved automatically from .czi metadata

Skip the macro debugging on your next 150-image batch

If you have a full folder of CZI, ND2, LIF, or TIFF images ready for group statistics, test 1 image in the free MicroQuant preview first. The $199 Standard Batch delivers per-cell Excel/CSV tables, positive-cell percentages, ANOVA/Welch statistics, 300 dpi SVG figures, QC overlays, and an editable one-click review sheet within 24 hours.