eightneighborhood
Eightneighborhood is a term used in the study of two-dimensional grids, image processing, and related computational fields to describe the set of eight cells surrounding a central cell. In a square lattice, the eight neighbors are the cells located to the north, northeast, east, southeast, south, southwest, west, and northwest of the central position, excluding the central cell itself. This concept is often contrasted with the four-neighborhood, which includes only the orthogonally adjacent cells.
The eightneighborhood is fundamental for defining adjacency and connectivity in discrete spaces. It underpins 8-connectivity schemes
In practice, choosing between four- and eight-neighborhoods reflects different topology assumptions. Eightneighborhood allows diagonal connections between
See also: four-neighborhood; 4-connectivity; 8-connectivity.