Worked answer (deck 03)
State the difference between 4-neighbour, 8-neighbour and m-connectivity. For the 4×4 binary image [1010; 0101; 1010; 0101], find the number of connected components under each connectivity and discuss the effect of diagonal adjacency.
4-connectivity: only the up/down/left/right neighbours link pixels. 8-connectivity: the four diagonal neighbours link too. m-connectivity: 4-neighbours always link; a diagonal neighbour links only if the two pixels have no common 4-neighbour with a value in V (removes the double paths of 8-connectivity).
| 1 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |
Every 1 has only 0s as 4-neighbours, so with 4-connectivity each 1 is alone: 8 components. Every 1 touches other 1s diagonally, so 8-connectivity joins all of them: 1 component. For each diagonal pair the two shared 4-neighbours are 0 (not in V), so every diagonal link is m-adjacent as well: 1 component.
Effect of diagonal adjacency: it merges pixels that touch only at corners, dropping the count from 8 to 1. m-connectivity keeps those joins here and only removes redundant (ambiguous) diagonal links where a 4-connection already exists.