Quiz: reconstruction and h-extrema

Short questions to test your understanding. Try each on paper first, then open the answer. Reconstruction R_A(M): dilate the marker M one step, clip it to the mask A, repeat until nothing changes. Grey levels: the same with max/min; \mathrm{HMAX}_h(I) = R_I(I - h), \mathrm{HMIN}_h(I) = R^{\varepsilon}_I(I + h).


Q1. A mask contains 30 cells and many specks. You put one seed pixel in each of 5 cells and reconstruct. What is the result?

How far can the marker grow, and where must it stop?

Exactly the 5 seeded cells, complete and unchanged; the other 25 cells and all specks are gone. The marker grows through every pixel connected to a seed inside the mask, and cannot leave the mask.


Q2. Why does an opening by reconstruction keep thin bridges and protrusions that an ordinary opening removes?

What role does the erosion play in each case?

In the ordinary opening, the erosion result is dilated back by the SE: only what the SE reaches comes back, so thin parts stay lost. In the opening by reconstruction, the erosion is only a marker: it says which components contain a part the SE fits into. The reconstruction then floods each such component completely, bridges and protrusions included.


Q3. How do you remove all objects that touch the image border with a reconstruction? And how do you fill holes?

Choose the marker and the mask.

Clear border: marker = object pixels on the frame (the outermost rows and columns), mask = the objects; the reconstruction is the set of objects touching the border; subtract it from the mask. Fill holes: marker = background pixels on the frame, mask = the background; the reconstruction is the background reachable from outside; everything else (the holes) becomes object. Use 4-connected steps for the background, 8-connected for objects.


Q4. In 1D, what is R_I(M) for I = 3\,5\,2\,6\,1 and a seed only at the 6, i.e. M = 0\,0\,0\,6\,0?

Each step: max over the 3-window, then min with I.

Step 1: 0\,0\,6\,6\,6 \to clipped: 0\,0\,2\,6\,1. Step 2: 0\,2\,6\,6\,6 \to 0\,2\,2\,6\,1. Step 3: 2\,2\,6\,6\,6 \to 2\,2\,2\,6\,1. Step 4: no change. Result 2\,2\,2\,6\,1: the seed’s hill is kept, and to the left the flood can only pass at the level of the pass, 2.


Q5. A noisy image of nuclei has thousands of regional maxima. How does the h-maxima transform reduce them, and what does h mean in grey levels?

How deep must you go down from a maximum to reach a higher one?

\mathrm{HMAX}_h lowers every peak by h and flattens every peak whose dynamic (the descent needed to reach a higher point) is at most h. Noise bumps have dynamics of a few noise standard deviations; a nucleus rises far above the background. With h above the noise bumps but below the nucleus contrast, one regional maximum per nucleus remains. (Touching nuclei separated by a shallow neck may still merge.)


Q6. What does \mathrm{HMIN}_h do to a basin of depth 5 and to one of depth 2, for h = 3?

Water up to h above the bottom, but never above the spill level.

The basin of depth 5 is filled by 3: its bottom rises by 3, it remains a regional minimum (2 deep). The basin of depth 2 is filled to its spill level and merges with its neighbour: it is no longer a minimum. This is how the watershed day removes noise basins before flooding.


Q7. Why is reconstruction by iterated geodesic dilation slow on a large image, and what does the fast algorithm do differently?

How many pixels change in one iteration?

Each iteration visits every pixel, but only the pixels on the moving front change; a flood across a 200-pixel object needs about 200 iterations, so the cost is (number of pixels) × (number of iterations). The fast algorithm keeps a first-in-first-out queue of front pixels and only processes those; each pixel is handled a small number of times, so the cost is linear in the number of pixels.


Q8. (math) Does R_A(M) depend on the SE used in each geodesic step? Compare the 3 \times 3 square with the 5 \times 5 square (clipping after each step in both cases).

Characterise the result as the components of A that meet M. Can a step with the 5 \times 5 square cross a one-pixel gap?

With the 3 \times 3 square the result is the union of the 8-connected components of A that meet M: the marker spreads to every pixel connected to it inside A, and never leaves a component. With the 5 \times 5 square the marker can jump over a one-pixel gap of background, so it can enter a different component of A that is 2 pixels away: the result can be larger. So it does depend on the SE: the SE defines the connectivity. Larger steps give the same result only if the components of A are at least as far apart as the SE reaches.