Quiz: working with label images
Before this unit: Shape features (previous unit); Day 13: Morphology.
Short questions to test your understanding. Try each on paper first, then open the answer.
Q1. Two nuclei touch. A watershed has split them. Why must the result be stored as a label image and not as a binary mask?
Label the mask again: what do you get?
In a mask the two nuclei are one connected set of 1s: labelling it again would merge them. Only a label image can hold two different values on neighbouring pixels, i.e. the boundary between touching objects. (Or the mask needs a one-pixel background line between them.)
Q2. You remove objects smaller than 20 pixels (a) with an area filter on the labels and (b) with a morphological opening by a disc of radius 2. What is different for the objects that remain?
Which of the two acts on whole components?
- The area opening keeps each remaining object exactly as it was. (b) The opening also changes the survivors: corners are rounded, thin protrusions and thin bridges removed (an object may even split). An opening also removes thin but large objects that the area filter would keep.
Q3. After deleting some labels, the label image contains the numbers 1, 2, 5, 9. Why relabel to 1, 2, 3, 4?
Think of the count and of tables indexed by label.
The largest label is then the number of objects, tables indexed by label have no empty rows, and colour palettes and later steps that loop over 1..max do not waste work on missing labels.
Q4. A field of view contains cells of very different sizes. You discard every cell touching the image border and report the mean area of the rest. What is wrong?
Which cells are more likely to touch the border?
Large cells touch the border more often than small ones, so they are discarded more often: the remaining cells are biased towards small ones, and the mean area is too small. A counting frame with a guard zone removes this bias (and the guard zone lets every counted cell be measured completely).
Q5. In the counting frame, an object touches the top edge of the frame and lies partly outside it. Is it counted? And one that touches the right edge?
Top and left are inclusion edges.
Top edge: yes, if it does not also touch the exclusion line (it is counted here, and the frame above, whose bottom edge is an exclusion line, does not count it). Right edge (exclusion line): no; the frame to the right counts it.
Q6. The count is 25, and the true number of nuclei is 25. Can the segmentation still be wrong?
Errors can cancel.
Yes: one pair of merged nuclei (one label too few) and one nucleus split in two (one label too many) give the right count with three wrong objects. Matching each predicted object to a true object (evaluation day) reveals it.
Q7. Rods and round nuclei have overlapping areas. Which property separates them, and which property separates merged pairs from single nuclei?
Look at the scatter plots in the demo.
Rods: eccentricity (0.95–0.98 against at most 0.91 for the nuclei) or the form factor. Merged pairs: solidity (0.88–0.89 against 0.93–0.96) together with the area (about twice a nucleus).
Q8. (math) Show that the area opening \psi_a (keep the components with at least a pixels) is idempotent and increasing.
How do the components of X sit inside those of Y \supseteq X?
Idempotent: the components of \psi_a(X) are exactly the kept components of X (they are disjoint and not adjacent), each with \ge a pixels, so applying \psi_a again keeps all of them. Increasing: if X \subseteq Y, every component C of X lies in a component D of Y with |D| \ge |C|; if C is kept, so is D, so \psi_a(X) \subseteq \psi_a(Y).