Quiz: from skeleton to graph
Before this unit: Medial axis, distance transform and reconstruction (previous unit); Day 14: Labelling; Day 2: Edges, blobs and ridges.
See also: Day 15: Watershed; Day 16: Measurements.
Short questions to test your understanding. Try each on paper first, then open the answer.
Q1. A skeleton pixel has three skeleton neighbours, and two of them also have three. How many nodes is that?
Do touching junction pixels describe one branch point or several?
One node: adjacent junction pixels form a junction cluster (a connected component of junction pixels), which represents one branch point. Counting each pixel separately would report several branch points, joined by edges of length 0 or 1.
Q2. How are the edges of a skeleton graph found?
Remove something, then label what is left.
Remove the node pixels (end points and junction clusters); the remaining skeleton pixels fall into connected pieces, each a chain of regular pixels. Each piece is an edge, joined to the node(s) its two ends touch. Two node pixels that touch directly (a one-step branch) also form an edge.
Q3. A skeleton graph has 10 edges, 9 nodes and 1 piece. How many holes did the mask have?
E - V + C.
10 - 9 + 1 = 2 independent cycles, so 2 holes (as thinning keeps holes, each becomes a loop of the skeleton).
Q4. Two skeleton edges have 40 pixel steps each. One is horizontal, the other diagonal. Are they equally long?
How long is a diagonal step?
No. The horizontal one is 40 long, the diagonal one 40\sqrt2 = 56.6. Counting pixels underestimates diagonal lines by up to 29 %, so the measured length would depend on the orientation of the object.
Q5. With weights 1 and √2, a line at about 22.5° comes out 8 % too long. Why?
Draw the pixel path of such a line.
The pixel path is a staircase of axial and diagonal steps; each step is measured exactly, but the staircase zigzags around the true line and is longer than it. The weights are exact only for lines at 0° and 45°, which need no zigzag. The corrected estimator lowers the weights slightly and subtracts a little for each corner.
Q6. Why should the pruning length be compared with the local radius of the structure?
How long is a spur caused by a bump on the wall of a thick vessel?
A spur from a wall bump starts at the centreline and has to reach the wall, so it is about one radius long. In a thick vessel spurs are long, in a thin one short. A fixed k either leaves the spurs of the thick vessels or deletes real short branches of the thin ones; k = (a factor) × \mathrm{DT} at the junction adapts to both.
Q7. After a spur is removed, its junction has two edges left. What happens to it?
Is it still a branch point?
It is no longer a junction (only two edges meet there): it becomes an ordinary point of a line, and its two edges merge into one. This can make a short side branch terminal, so pruning is repeated once.
Q8. (math) Show that for a tree with only end points and degree-3 junctions, the number of end points is the number of junctions plus 2.
Sum of degrees, and E = V - 1.
With n end points and J junctions, the degrees sum to n + 3J = 2E, and a tree has E = V - 1 = n + J - 1. So n + 3J = 2n + 2J - 2, i.e. n = J + 2.