The relationship b/w the pixels can be justified in terms of connectivity and adjacency.
Connectivity
Connectivity is the manner in which two pixels are connected two each other. Types of Neighbours based on connectivity
- Four way connected(N4)
- Eight way connected(N8)
- Diagonally connected(ND)
Adjacency
Adjacency is the property by which we decide if the connected pixels (p,q) in an image which also exist in given set of values(V) are adjacent to each other.
Types of Neighbours based on adjacency
- Four way adjacent(N4)
- Eight way adjacent(N8)
- Mixed adjacent(ND) : If N4 and N8 both are possible then only N4 path is used to connect the pixels in case of mixed adjacency.