fouradjacent
Fouradjacent, also written as four-adjacent or four-connectivity, refers to a relationship between cells in a two-dimensional square lattice in which a cell is considered adjacent to its four orthogonally neighboring cells: up, down, left, and right. This concept is central in grid graphs, digital topology, and image processing, where connectivity and neighborhood definitions govern how regions are explored and labeled.
Formally, for a grid coordinate (x, y), the four-adjacent neighbors are (x−1, y), (x+1, y), (x, y−1),
In graph terms, a grid with four-adjacency is a graph where each node corresponds to a grid
Applications of four-adjacency include image segmentation, connected-component labeling under 4-connectivity, and simulations on lattice models. Understanding
---