Quiz: finding spots

Short questions to test your understanding. Try each on paper first, then open the answer. Spots are Gaussians of known width σ (in pixels); “noise” is white noise of standard deviation \sigma_n unless stated.


Q1. What is the output of spot detection, and how does it differ from the output of a segmentation?

Think of what you would hand to a tracking program.

A list of points: a position (x, y) per spot, usually with a brightness and a score (and later an uncertainty). A segmentation gives a mask or label image, i.e. which pixels belong to an object. Spots are only a few pixels wide and their shape is known (the PSF), so their extent carries no information; their position does.


Q2. Why do spots in a fluorescence image all have about the same size, unlike the blobs of the edges day?

What is the image of an object much smaller than the resolution?

The labelled objects (single molecules, small vesicles) are much smaller than the resolution, so each is imaged as the PSF: the same shape, only the brightness differs. So the filter can be tuned to one σ (the PSF width in pixels) instead of searching over scales.


Q3. A spot has peak amplitude 30 above the background and the noise has standard deviation 10. What is its single-pixel SNR? About how much better is the matched filter for σ = 2 pixels?

The matched-filter SNR is A\sqrt{\pi\sigma^2}/\sigma_n.

Single pixel: 30/10 = 3. Matched filter: 3\sqrt{\pi \cdot 4} = 3 \cdot 3.54 \approx 10.6, about 3.5 times better: the filter collects the signal of the roughly \pi\sigma^2 \approx 13 pixels the spot covers.


Q4. Why does smoothing with a Gaussian much wider than the spot make detection worse, not better?

What does the wide filter average outside the spot?

Outside the spot there is only noise (and background). A wide filter averages in many pixels that carry no signal: the response to the spot falls (most of the filter weight now sits where the spot is dark) faster than the noise does. The optimum is a filter of the spot’s own width; it also keeps neighbouring spots apart.


Q5. A Gaussian filter works well on one image and gives hundreds of false spots on the next, which has a bright patch of uneven illumination. Explain, and name two fixes.

What does a kernel with positive weights summing to 1 do to a constant?

The Gaussian passes the background unchanged, so on the bright patch every noise maximum is “bright” and passes a global threshold. Fixes: a zero-mean filter (spot template minus its mean, LoG or DoG: a constant gives zero response), subtracting a strongly blurred copy or a white top-hat before filtering, or the à trous product (the background ends up in the last smooth level).


Q6. In the à trous detector, why multiply the thresholded levels w_2 and w_3 instead of adding them?

What is the product if one factor is zero?

A product is non-zero only where every level passed its threshold. A spot of 1–2 px gives a positive response in both w_2 and w_3 at the same place; a noise fluctuation rarely does (it lives mostly in w_1 and is not coherent across scales). So the product keeps spots and removes most of the noise; a sum would keep anything that is strong at one scale.


Q7. Two real spots can be as close as 4 pixels. Which window radius r for the local maxima would you choose, and what goes wrong with r = 1 and with r = 8?

The window is (2r+1) \times (2r+1).

r = 3 (a 7 × 7 window): a spot 4 px away is outside the window, so both spots stay candidates. With r = 1, noise ripples on one spot can each be a maximum of their 3 × 3 window: several candidates per spot. With r = 8, a dim spot within 8 px of a brighter one is never the maximum of its window: it is lost.


Q8. Name three other places in the course where “keep a local maximum, suppress its neighbours” appears, and what plays the role of the window there.

Edges, blobs, voting, registration, neural network detectors.

Canny’s non-maximum suppression (the two neighbours across the edge), blob detection in scale space (26 neighbours in (x, y, \sigma)), Hough accumulators (a window in parameter space), the peak of a phase-correlation surface, greedy NMS of boxes in deep-learning detectors (boxes with a large overlap).


Q9. (math) Show with Cauchy–Schwarz that no filter \mathbf w gives a higher SNR for the spot A\mathbf p in white noise than \mathbf w = \mathbf p.

SNR = A\,\mathbf w^\top\mathbf p/(\sigma_n\|\mathbf w\|).

|\mathbf w^\top\mathbf p| \le \|\mathbf w\|\,\|\mathbf p\|, so SNR \le A\|\mathbf p\|/\sigma_n, with equality exactly when \mathbf w is a positive multiple of \mathbf p. Scaling \mathbf w changes signal and noise equally, so only the direction matters.