# Count γH2AX or 53BP1 foci per nucleus in ImageJ (Find Maxima, step by step)

> Count γH2AX or 53BP1 foci per nucleus in ImageJ: nuclei as ROIs, Find Maxima with the right prominence, counts per nucleus and % of cells with ≥5 foci.

Published 2026-11-06 by LabCanvas team. https://www.labcanvas.com/blog/count-foci-per-nucleus

![ImageJ 1.54f counting γH2AX foci on a synthetic image: thirty nuclei outlined in yellow with a white cross on every focus, an enlarged nucleus, and the Find Maxima dialog with a prominence of 300](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-step4.webp)

To count γH2AX or 53BP1 foci per nucleus in ImageJ, make one ROI per nucleus from the DAPI channel (**Image › Adjust › Threshold…**, then **Analyze › Analyze Particles…** with **Add to Manager**), run **Process › Find Maxima…** on the foci channel with a **Prominence** that marks every focus once, output **Single Points**, divide that image by 255 (**Process › Math › Divide…**) and click **Measure** in the ROI Manager: the **RawIntDen** column is the number of foci in each nucleus. The share of nuclei with 5 or more foci then takes one line of macro.

Find Maxima finds every local peak that stands out from its surroundings by more than the prominence, so the whole method stands or falls on that one number. This guide shows how to choose it.

> **What you need:** ImageJ 1.x or Fiji (all commands are in both). A two-channel image: nuclei (DAPI or Hoechst) and foci (γH2AX, 53BP1, RAD51 or similar). The example is a synthetic DNA-damage image made for practice: 512 × 512 pixels at 0.2 µm per pixel, 30 nuclei (three pairs touching) with 199 foci in all, 0 to 14 per nucleus. Time: about 15 minutes.

## What is a focus, and what does Find Maxima count?

A **focus** is a small bright spot of a repair protein at a DNA break, about 0.3 to 1 µm across. **Find Maxima** puts a point on every pixel that is higher than its neighbours and stands out by at least the **prominence**: the drop you would have to walk down from the peak before you could climb to a higher one. Noise makes many tiny peaks with a small prominence; a real focus is a tall one. So a prominence between the two separates them.

## How do I count foci per nucleus in ImageJ? Step by step

### Step 1: Open the image and split the channels

Open the file with **File › Open…**, then choose **Image › Color › Split Channels**. C1 holds the nuclei, C2 the foci. For viewing only, **Image › Adjust › Brightness/Contrast… › Auto** makes the foci easier to see; it does not change the pixel values.

![ImageJ after Split Channels: DAPI nuclei and γH2AX foci side by side](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-step1.webp "Step 1 in ImageJ 1.54f: Image › Color › Split Channels on the synthetic DNA-damage sample. C1 is DAPI, the nuclei 1; C2 is γH2AX, with the foci you will count 2.")

### Step 2: Threshold the nuclei

Click C1, make a copy with **Image › Duplicate…** and blur it with **Process › Filters › Gaussian Blur…** (Sigma 2) so each nucleus becomes one smooth blob. Open **Image › Adjust › Threshold…**, choose **Otsu**, tick **Dark background** and click **Apply**.

![ImageJ Threshold window with Otsu on the DAPI channel](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-step2.webp "Step 2: the Threshold window on the blurred DAPI copy with Otsu 1 and Dark background 2. Every nucleus is red; Apply 3 makes the mask.")

### Step 3: Make one ROI per nucleus

On the mask, run **Process › Binary › Fill Holes** and **Process › Binary › Watershed** (it splits the touching pairs). Then **Analyze › Analyze Particles…** with a size of **10-Infinity** (µm²), **Include holes** and **Add to Manager** ticked. The ROI Manager now holds 30 nuclei. If some nuclei touch the image edge, tick **Exclude on edges** too, so half nuclei are not counted.

![ImageJ Analyze Particles dialog over the nuclear mask](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-step3.webp "Step 3: Analyze Particles on the nuclear mask, size 10-Infinity µm² 1, Include holes 2 and Add to Manager 3. Result: 30 nuclei in the ROI Manager.")

### Step 4: Find the foci and choose the prominence

Click C2. Choose **Process › Find Maxima…**, type a **Prominence** (start with 300 for a 16-bit image like this one), set **Output type** to **Point Selection** and click **OK**. A small cross appears on every peak. Zoom in on a few nuclei: every focus should have one cross and the nuclear background none. If noise gets crosses, raise the prominence; if dim foci are missed, lower it. **Preview point selection** shows the crosses while you type.

![ImageJ Find Maxima dialog and the γH2AX channel with a cross on every focus](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-step4.webp "Step 4: Process › Find Maxima on the γH2AX channel with a prominence of 300 1 and Output type Point Selection 2, then OK 3. Every focus inside the nuclei yellow outlines has one cross, as the enlarged nucleus shows.")

### Step 5: Turn the foci into a points image

Run **Process › Find Maxima…** again with the same prominence, but set **Output type** to **Single Points** and click **OK**. ImageJ makes a new black image, "C2 Maxima", with one white pixel (value 255) at each focus.

![ImageJ Find Maxima with Output type Single Points and the resulting points image](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-step5.webp "Step 5: the same prominence of 300 1 with Output type Single Points 2 and OK 3. The new image is black with one white pixel per focus enlarged.")

### Step 6: Make each point worth 1

With the points image selected, choose **Process › Math › Divide…**, type **255** and click **OK**. Every focus pixel now has the value 1, so the sum of the pixels inside a nucleus is its number of foci.

![ImageJ Process Math Divide dialog over the points image](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-step6.webp "Step 6: Process › Math › Divide on the points image. The dialog opens with 1.25; type 255 1 and click OK 2. Each focus pixel becomes 1.")

### Step 7: Measure every nucleus

Tick **Integrated density** in **Analyze › Set Measurements…** (Area too, if you like). Keep the points image selected, click **Deselect** in the ROI Manager so that all ROIs are used, then click **Measure**. One row per nucleus appears; **RawIntDen** (the plain sum of the pixel values) is the foci count. (IntDen is the same sum times the pixel area, so ignore it here.)

![ImageJ ROI Manager and Results table with RawIntDen, the foci count per nucleus](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-step7.webp "Step 7: Measure in the ROI Manager 1 on the points image. RawIntDen is the number of foci 2, one row per nucleus 3: 14, 6, 1, 9 and so on.")

To get the share of positive nuclei, run this after Step 7 (**Plugins › New › Macro**, paste, **Run**):

```
// Share of nuclei with at least "cutoff" foci, from the RawIntDen column
cutoff = 5;
pos = 0;
for (i = 0; i < nResults; i++)
  if (getResult("RawIntDen", i) >= cutoff) pos++;
print(pos + " of " + nResults + " nuclei have " + cutoff + " or more foci (" + d2s(100 * pos / nResults, 1) + "%)");
```

## The result on the sample

**Analyze › Distribution…** on the RawIntDen column gives the summary:

![ImageJ Distribution of foci per nucleus: n 30, mean 6.700, SD 4.203](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-result.webp "ImageJ 1.54f, Analyze › Distribution on RawIntDen: 30 nuclei, 6.700 ± 4.203 foci per nucleus 1.")

ImageJ counts **201 foci in 30 nuclei: 6.70 ± 4.20 per nucleus**, and the macro reports **18 of 30 nuclei (60.0%) with 5 or more**. The image was made with 199 foci (6.63 ± 4.30 per nucleus, 18 nuclei with 5 or more), and 28 of the 30 nuclei are counted exactly; the two that are off by one are the two nuclei with no foci at all, where the highest noise peak just passes the prominence. Nuclei without foci are where false points show first, so check a few of them by eye.

## How do I choose the prominence?

Run Find Maxima at a few values and watch the count. On this sample:

![One nucleus with Find Maxima at prominence 100, 300 and 1000](https://www.labcanvas.com/blog/imagej/count-foci-per-nucleus-prominence.webp "One nucleus with 14 foci, Find Maxima at three prominences in ImageJ: 100 gives 15 one point on noise, top right, 300 gives all 14, 1000 gives 12 two dim foci missed. Over all 30 nuclei: 216, 201 and 150 foci.")

| Prominence | Foci in 30 nuclei | Nuclei counted exactly (of 30) |
|---|---|---|
| 100 | 216 | 18 |
| 200 | 201 | 28 |
| 300 | 201 | 28 |
| 400 | 201 | 28 |
| 600 | 198 | 29 |
| 1000 | 150 | 8 |

The count is flat from 200 to 600: that plateau is where you want to be, because small changes in the setting (or in the image) then barely move the result. Below it noise peaks creep in; above it the dimmest foci drop out. Find the plateau on a few images from your control and your strongest condition, pick a value in the middle, and keep it for the whole experiment. The prominence is in the image's own grey values, so a 16-bit image needs a much larger number than an 8-bit one.

## Pitfalls

- **A prominence chosen per image.** It makes each image its own experiment. Fix it once.
- **Foci in the background.** Find Maxima finds peaks everywhere, but only points inside the nuclear ROIs are counted. Make sure the nuclear mask covers the whole nucleus (Fill Holes, Include holes).
- **Merged foci.** Foci closer than their own width count as one. At high doses, report the total γH2AX intensity per nucleus (Mean or RawIntDen of the raw C2 channel) as well as counts.
- **Saturated foci.** Clipped peaks are flat on top and can split into two maxima or merge. Check the histogram before you count.
- **Pan-nuclear staining.** Apoptotic and some S-phase cells stain the whole nucleus with γH2AX; they have few distinct maxima but are not undamaged. Flag them by their mean intensity and leave them out or report them apart.
- **Comparing different exposures.** The prominence is in grey values; images taken with different exposure or gain need the same settings to be comparable.
- **Projections.** A maximum projection of a z-stack merges foci at different depths; say so if you count on one.

## Reporting it

> Foci were counted in [Fiji (ImageJ 1.54)]. Nuclei were segmented from the DAPI channel (Gaussian blur σ = 2 pixels, Otsu threshold, watershed, objects ≥ 10 µm²). [γH2AX] foci were detected with Find Maxima (prominence [300]) on the raw [γH2AX] channel, and the maxima within each nucleus were counted. Cells with ≥ [5] foci were scored positive; the cut-off was set on untreated controls. [n] nuclei from [3] independent experiments per condition.

Show foci per nucleus as a dot plot or violin per condition, with the mean of each experiment marked, and the percentage of positive cells as a bar per experiment.

## Switch to LabCanvas: foci per cell in a few clicks

The same count runs in [LabCanvas Image Analysis](https://www.labcanvas.com/analysis.html) in the browser, with no points image and no macro.

1. Open your two-channel TIFF and go to the **Assays** tab › **Spots per cell** (or click **Try it on a sample**).
2. Under **Channels**, pick the nuclear and the spot channel; under **Nuclei**, keep Otsu or adjust it.
3. Under **Spots**, click **Auto** for the **Prominence** (6 × the noise) or type your own; add a rolling ball or a blur if needed.
4. Under **Count**, choose the nucleus or the whole cell and the **Spots for a positive cell**, then click **Add to results**.

![Spots per cell in LabCanvas Image Analysis](https://www.labcanvas.com/analysis-examples/foci.webp "Spots per cell: 30 cells, 6.63 ± 4.3 spots per cell, 60% of cells with 5 or more.")

On the same synthetic image, LabCanvas finds **30 cells, 6.63 ± 4.3 spots per cell, 60% with 5 or more**; ImageJ with the steps above gives 30 nuclei, 6.70 ± 4.20 foci, 60%.

Why switch for foci counting:

- **One panel instead of seven steps**: nuclei, spots, counts per cell and the positive share together, with every spot shown on the image.
- **A prominence from the noise**: Auto sets it from the image, the same rule for every image.
- **Straight to Graphs**: counts per cell to a graph with statistics, and a methods sentence to copy.

Fiji stays better for 3D foci counting in z-stacks and for long macros over thousands of images.

[Open Image Analysis](https://www.labcanvas.com/analysis.html): free with a LabCanvas account (downloading CSV and image files is part of LabCanvas Pro). ImageJ and Fiji are independent open-source projects; LabCanvas is not affiliated with them.

## References

- Schindelin J, Arganda-Carreras I, Frise E, et al. (2012). Fiji: an open-source platform for biological-image analysis. *Nature Methods* 9, 676–682. [doi:10.1038/nmeth.2019](https://doi.org/10.1038/nmeth.2019)
- Schneider CA, Rasband WS, Eliceiri KW (2012). NIH Image to ImageJ: 25 years of image analysis. *Nature Methods* 9, 671–675. [doi:10.1038/nmeth.2089](https://doi.org/10.1038/nmeth.2089)

## Frequently asked questions

### How do I count foci per nucleus in ImageJ?

Make one ROI per nucleus from the DAPI channel (threshold, Analyze Particles with Add to Manager). On the foci channel, run Process › Find Maxima with a prominence that puts one point on every focus and none on the background, output Single Points, divide that image by 255 so each point is worth 1, and click Measure in the ROI Manager with Integrated density ticked: RawIntDen is the number of foci in each nucleus.

### What prominence should I use in Find Maxima?

Tick Preview point selection and raise the prominence until noise in the nucleus no longer gets points, while every focus you would count by eye still has one. Look for a range where the count stops changing: on our sample any prominence from 200 to 400 gave the same 201 foci, while 100 added noise points and 1000 lost dim foci. Then use the same value for every image of the experiment.

### Should I blur or subtract the background before Find Maxima?

Only if you need to. A light Gaussian blur (sigma 1 pixel) evens out noise when foci are small and the image is noisy, and Subtract Background removes a bright, uneven nuclear haze. Both change the heights of the maxima, so choose the prominence after them, and do the same to every image.

### How many γH2AX foci make a cell positive?

There is no universal number. Common cut-offs are 5 or 10 foci per nucleus, chosen from the untreated control so that only a few control cells pass. Report the cut-off, the mean foci per nucleus and the percentage of positive cells.

### Why does Find Maxima count two foci as one?

Two foci closer than about their own width merge into one peak, and a prominence that is too high can also swallow the smaller one. Lower the prominence a little, avoid blurring, or image at higher magnification. Very dense foci (late time points, high doses) are better reported as total foci intensity per nucleus.

### Can I count foci in 3D?

Find Maxima works on one plane. For a z-stack, either count on a maximum-intensity projection (Image › Stacks › Z Project), which can merge foci at different depths, or use a 3D tool in Fiji such as 3D Objects Counter or the 3D maxima finder of the 3D ImageJ Suite.

## Related links

- [Nuclear/cytoplasmic ratio in ImageJ](https://www.labcanvas.com/blog/nuclear-cytoplasmic-ratio): The same nuclei, then a cytoplasm ring
- [How to count cells in ImageJ](https://www.labcanvas.com/blog/count-cells-imagej): Threshold, watershed and Analyze Particles
- [The ImageJ ROI Manager](https://www.labcanvas.com/blog/imagej-roi-manager): Measure every nucleus at once
- [Rolling-ball background subtraction](https://www.labcanvas.com/blog/rolling-ball-background-subtraction): Flatten a nuclear haze before counting
- [Image Analysis: the complete guide](https://www.labcanvas.com/blog/image-analysis-complete-guide): Every tool and setting in the app
