From the binary image of villages, the image of distance to villages can be computed by a method based on mathematical morphology taking the digital elevation model into account.
Figure 20(a): Image of distances to villages
(Pixels in black colour are the nearest from a village)
Figure 20(b): Image of distances to villages (false colours)