Quiz: Zernike moments on the unit disc

Short questions to test your understanding. Try each on paper first, then open the answer. V_{nm} = R_{nm}(\rho)e^{im\theta} on the unit disc (n - |m| even, |m| \le n); Z_{nm} = \frac{n+1}{\pi}\iint I\,\overline{V_{nm}}; \theta counter-clockwise.


Q1. Which (n, m) are allowed for n = 3? How many zeros does R_{31} have inside the disc (0 < \rho < 1)?

|m| \le n and n - |m| even; R_{nm} has (n - |m|)/2 zeros.

m = -3, -1, 1, 3. R_{31} = 3\rho^3 - 2\rho has (3-1)/2 = 1 zero inside: \rho = \sqrt{2/3} = 0.816.


Q2. Why is the radial part orthogonal with the weight \rho, i.e. \int_0^1 R_{nm}R_{n'm}\,\rho\,d\rho, and not with d\rho alone?

What is the area element in polar coordinates?

The polynomials must be orthogonal on the disc as an area: dx\,dy = \rho\,d\rho\,d\theta. After the angular integral, the factor \rho remains. A ring of radius \rho has circumference 2\pi\rho, so outer rings count more.


Q3. An image is rotated by 30° counter-clockwise. What happens to Z_{22}, Z_{31} and Z_{40}?

Z_{nm} \to Z_{nm}e^{-im\alpha}.

All keep their magnitude. The phase of Z_{22} changes by -60°, of Z_{31} by -30°, and Z_{40} (real, m = 0) does not change at all.


Q4. A real image has Z_{42} = 0.3 - 0.1i. What is Z_{4,-2}? Why is it enough to store the moments with m \ge 0?

\overline{V_{nm}} = V_{n,-m}.

Z_{4,-2} = \overline{Z_{42}} = 0.3 + 0.1i. For a real image every Z_{n,-m} is the conjugate of Z_{nm}, so the negative m carry no extra information.


Q5. A classifier uses |Z_{nm}| for n \le 8 to recognise digits in any orientation. Which two digits will it confuse, and why can’t more orders fix it?

Which digit is another one rotated?

6 and 9: a 9 is (nearly) a 6 rotated by 180°, and all magnitudes are exactly rotation invariant, at every order. More orders add more invariants, but every one of them is blind to rotation. One needs a non-invariant feature (a phase, or the upright orientation).


Q6. Why should the disc be centred on the object’s centroid before computing Zernike moments?

What is Z_{11} in terms of m_{10} and m_{01}?

Zernike moments are only rotation invariant for rotations about the disc’s centre; moving the object changes all of them. Centring the disc on the centroid makes them translation invariant (and Z_{11} = \frac2\pi(m_{10} - im_{01}) = 0). Scaling the radius to the object’s size makes them scale invariant.


Q7. A Zernike reconstruction of a micrograph is very good inside the disc but has a large error over the whole square image. Why?

Where are the V_{nm} defined?

The basis lives on the inscribed disc: the corners (21 % of the square) are not described at all, so the reconstruction is 0 there. For a shape that lies inside the disc on a dark background this does not matter; for a crop of a larger image it does.


Q8. Computing R_{40,0}(\rho) with the factorial formula gives values that are wrong by up to 0.015, although every term is computed accurately. Why?

How large are the individual terms compared with the result?

The terms alternate in sign and the largest is about 5 \times 10^{13}, while the sum is at most 1. Each term carries a relative rounding error of about 10^{-16}, i.e. an absolute error up to about 10^{-2}, which survives the cancellation. A recurrence in n never forms such large terms.


Q9. (math) Show that \int_0^1 R_{20}R_{00}\,\rho\,d\rho = 0 and compute \int_0^1 R_{20}^2\,\rho\,d\rho.

R_{20} = 2\rho^2 - 1.

\int_0^1 (2\rho^3 - \rho)\,d\rho = \tfrac12 - \tfrac12 = 0. \int_0^1 (2\rho^2 - 1)^2\rho\,d\rho = \int_0^1 (4\rho^5 - 4\rho^3 + \rho)\,d\rho = \tfrac23 - 1 + \tfrac12 = \tfrac16 = \frac{1}{2(n+1)} for n = 2.