# Fully Parallel Homological Region Adjacency Graph via Frontier Recognition
## 3 A Simplified \(Acc\) Framework  
The proposed topological framework for digital images is based on a simplification of the classical abstract cell complex concept (\(ACC\)) [9]. In a few words, an \(ACC\) consists of a set of cells of different dimensions which are endowed with a transitive bounding relation between cells of contiguous dimensions, thus having no bounding relation for pairs of cells with dimensions differing by more than one. Therefore, given a 2D digital image \(I\), the proposed \(ACC\) consists of physical pixels (represented by 2-cells), frontiers between pixels (that is, interpixel elements represented by 1-cells) and adjacencies between frontiers (or corners between pixels, represented by 0-cells) (an example is depicted in Figure 3). The bounding relations among different cells can be easily inferred for this kind of square \(ACC\) according to this figure. We refer the reader to [9] for a more strict definition. It is assumed that an external region surrounds the whole image, having different attributes (for example, color) than any of the image's pixels. Hence, the image borders are extended with additional 0- and 1-cells so that the whole \(ACC\) is a compact set, which ensures that its Euler number is always 1.  
In order to compute \(HomDuRAG\), 0-cells are firstly classified into three main types: crosses, frontiers between regions, and points inside an object. In Figure 3, they are represented by black, gray and empty circles, respectively. This first classification is performed by comparing the attributes of the set of four pixels surrounding each 0-cell. Crosses appear when three or four pixels with different attributes (colors, for example) surround the 0-cell; frontiers appear when there are two different sets of contiguous identical pixels, and interior 0-cells appear if the four pixels are identical. For example, in Figure 3, a single interior 0-cell is inside the blue region. Up to four crosses appear between red, blue, green and external regions. Finally, the rest of 0-cells are frontiers between two regions. Distances between any pair of 0-cells must be calculated so that the algorithm detailed in Section 5 can determine the two extremes of each frontier. In Figure 3, on the right, pairs of distances are shown for each 0-cell; note that crosses and interior 0-cells have zero values, while the other cells point towards two directions, being \(-4\) for North, +4 for South (because 4 is the number of columns \(Nc=N+1\)), \(-1\) for West and +1 for East in this example (matrices are supposed to be stored in row-major order, as usual).  
To be precise, the comparison of pairs of adjacent pixels (which correspond to \(ACC\) 1-cells) around a 0-cell yields to 4 binary values (Figure 4, left). Each of these comparisons results in a true/false bit, thus giving a total of 16 cases. Figure 4, right, shows the 12 possible cases because a set of comparisons where three are true (1) and one is false (0) is evidently impossible by the transitive property of equality. Classifying each 0-cell according to this table, it is easy to compute its pair of jump distances (called _Ja_ and _Jb_ here). Once the initial jump distances for all 0-cells are set, only these 0-cells will be used to compute _HomDuRAG_, meaning a matrix with \((M+1)\times(N+1)\) elements. Using this matrix, _HomDuRAG_ can be efficiently extracted as explained in the next sections, and its relation with _HomRAG_ can be foreseen by considering duality with the _HomDuRAG_.