Quiz: non-rigid registration

Short questions to test your understanding. Try each on paper first, then open the answer.


Q1. Why is optical flow not enough to align a live-cell image with an immunostaining of the same sample made after fixation?

Which two assumptions of optical flow fail?

Brightness constancy fails (different stains, different contrast) and the motion need not be small (fixation and mounting deform the sample by many pixels). Registration instead optimises a similarity measure that tolerates contrast changes, over a smooth family of deformations, starting from a rigid alignment.


Q2. In a B-spline free-form deformation with control points every 16 px, you move one control point by 9 px. Which pixels move, and by how much does the pixel at that control point move?

Each control point is a bump 4 spacings wide; the bump is 4/6 at its centre in each direction.

Only pixels within 2 spacings (32 px) in x and in y move: a 64 × 64 px patch. The pixel at the control point moves 9 \cdot \tfrac46 \cdot \tfrac46 = 4 px; at the next control point along a row, 9 \cdot \tfrac16 \cdot \tfrac46 = 1 px; diagonally, 9/36 = 0.25 px.


Q3. The Jacobian determinant of a registration result is 0.6 in one region, 1.8 in another and −0.2 in a third. Interpret each.

It is the local change of area.

0.6: the region is smaller in the moving image than in the fixed one (compressed to 60 % of its area). 1.8: larger (expanded by 80 %). −0.2: folding, the map turns space inside out; physically impossible, a sign of too little regularisation (or a wrong optimum).


Q4. Which similarity measure would you use for (a) two frames of a brightfield time-lapse, (b) a DAPI image and a brightfield image of the same cells, (c) an H&E section and an immunofluorescence section?

How are the grey values of the two images related?

  1. SSD (or NCC if the illumination drifts): same contrast. (b) Mutual information: the relation between the two contrasts is consistent but not a straight line (nuclei bright in DAPI, grey or dark in brightfield). (c) Mutual information (after converting H&E to one channel, e.g. haematoxylin): two stains, any consistent relation.

Q5. Two images are exact inverses of each other (B = 255 - A). What are their NCC and MI? Why does SSD fail to align them?

Does knowing A tell you B?

NCC = −1 (a perfect straight-line relation with negative slope). MI is maximal: \mathrm{MI} = H(A) = H(B), because B is determined by A. SSD is largest exactly at the true alignment (bright on dark everywhere), so minimising SSD moves away from it.


Q6. A registration with a very fine control grid and no bending penalty gives a perfect match, but the Jacobian map shows a strong blob of shrinkage where a tumour grew between two time points. What went wrong?

What is the deformation allowed to explain?

The deformation was free enough to “explain away” a real change (growth) as a deformation. A perfect match is not a correct result. Use a coarser grid or a bending penalty, look at the Jacobian map critically, and check with held-out landmarks.


Q7. (math) Show that \mathrm{MI} = H(A) + H(B) - H(A, B) equals \sum_{a,b}p(a,b)\log_2\frac{p(a,b)}{p(a)p(b)}.

Write H(A) = -\sum_{a,b}p(a,b)\log_2 p(a).

Since p(a) = \sum_b p(a,b): H(A) = -\sum_{a,b}p(a,b)\log_2 p(a) and H(B) = -\sum_{a,b}p(a,b)\log_2 p(b). Then H(A) + H(B) - H(A,B) = \sum_{a,b}p(a,b)\big[\log_2 p(a,b) - \log_2 p(a) - \log_2 p(b)\big] = \sum_{a,b}p(a,b)\log_2\frac{p(a,b)}{p(a)p(b)}.