Quiz: denoising and what you may measure
Before this unit: Richardson–Lucy, 3D, and the PSF (previous unit); Day 4: Image formation; Day 3: Bit depth and noise.
Short questions to test your understanding. Try each on paper first, then open the answer. Method noise = noisy − denoised; PSNR uses peak 255.
Q1. A camera has a few hot pixels (always 255) in an otherwise good image. Which denoiser removes them without blurring edges, and why does a Gaussian not?
Which statistic ignores a single extreme value in a window?
The median: a hot pixel is one extreme value among nine (3 × 3), so the median of the window is a normal value. A Gaussian averages it in, spreading a bright blob over the neighbourhood, and blurs every edge as well.
Q2. A 5 × 5 median filter is applied to an image of 1-pixel-wide filaments. What happens to them?
How many of the 25 window values belong to the filament?
They disappear: a straight 1-pixel filament covers only 5 of the 25 window values, far from a majority, so the median is the background. A median removes structures thinner than about half its window.
Q3. Why does the bilateral filter keep an edge between grey levels 50 and 150 when the noise is σn = 5, but fail when σn = 60?
Compare the edge height with σr and the noise.
With small noise, σr can be chosen between the noise (5) and the edge (100), say 20: neighbours across the edge differ by 100 and get weight e^{-100^2/800} \approx 0, while noisy neighbours on the same side are averaged. With σn = 60 the noise differences are as large as the edge: a σr small enough to protect the edge also protects the noise, and a σr large enough to average the noise also averages across the edge.
Q4. Non-local means works very well on an image of a regular crystal lattice, and badly on a single small bright particle. Why?
How many similar patches does each find?
In a lattice, every patch has many near-identical copies in the search window, so the average over them removes noise without blurring the pattern. A unique particle has no similar patch; the weights go to dissimilar patches (if h is large enough to give any weight), and the particle is averaged away.
Q5. The method noise of a denoiser shows the outlines of all the cells in the image. What does that tell you?
What should noisy − denoised contain ideally?
The filter removed signal at the cell boundaries: it blurred the edges. Ideally the method noise is pure noise, with no structure. Choose an edge-preserving filter or a weaker setting.
Q6. After 200 iterations of Richardson–Lucy, a bead looks twice as bright at its peak relative to its neighbour as in the raw image. Is the ratio of their brightness now more accurate?
Which quantity does RL keep?
Not necessarily. RL keeps the total intensity (flux) of each object, if integrated over a region larger than the PSF, but moves light into the peak in a way that depends on the object, the noise and the number of iterations. Compare integrated intensities over masks, preferably on the raw image; never peak values after restoration.
Q7. Two images of the same sample were deconvolved, one with 20 and one with 100 iterations. Can you compare the sizes of the objects in them?
What happens to the FWHM of a small object with the iterations?
No: sizes of objects near the resolution limit shrink with the iterations, towards a floor set by the method and the noise rather than by the object. Different settings give different sizes for the same object. Process all images with identical settings, and validate sizes with beads or a phantom of known size.
Q8. (math) Show that the median m of x_1, \dots, x_n (n odd) minimises \sum_i |x_i - m|.
Differentiate where no x_i = m.
For m not equal to any x_i, \frac{d}{dm}\sum_i|x_i - m| = \#\{x_i < m\} - \#\{x_i > m\}. Below the median there are more values above m than below: the sum decreases as m grows. Above the median it increases. The function is convex and piecewise linear, so its minimum is at the median, where the slope changes sign.