Digital Image Processing
If connections can be made using 4 and 8 both, then give priority to 4
Here in city block, we do not travel diagonally.( like 4 -adjacency )
like 8 - adj
For Dm , always look for the shortest path and if we have 4 and 8 adj , take 4.