In image processing and image recognition, pixel connectivity is the way in which pixels in 2-dimensional (or voxels in 3-dimensional) images relate to their neighbors.4-connected pixels are neighbors to every pixel that touches one of their edges. These pixels are connected horizontally and vertically. In terms of pixel coordinates, every pixel that has the coordinates