key: cord-0057742-9506kpia authors: Linh, Troung Kieu; Imiya, Atsushi title: Discrete Linear Geometry on Non-square Grid date: 2021-03-18 journal: Geometry and Vision DOI: 10.1007/978-3-030-72073-5_17 sha: 160178890dbd7f6829ddea348014aa8f7a30e8db doc_id: 57742 cord_uid: 9506kpia We define the algebraic discrete geometry to hexagonal grid system on a plane. Since a hexagon is an element for tiling on a plane, hexagons are suitable as elements of discrete objects. For the description of linear objects in a discrete space, algebraic discrete geometry provides a unified treatment employing double Diophantus equations. Furthermore, we develop an algorithm for the polygonalisation of discrete objects on the hexagonal grid system. This paper deals with algebraic discrete geometry on hexagonal grid systems [1] [2] [3] [4] [5] [6] [7] [8] . In the following, we first derive a set of inequalities for the parameters of a Euclidean linear manifold from sample points in the hexagonal grid system and an optimisation criterion with respect to this set of constraints for the recognition of the Euclidean line on the hexagonal grid system. Second, using this optimisation problem, we prove uniqueness and ambiguity theorems for the reconstruction of a Euclidean line on the hexagonal grid system. Finally, we develop a polygonalisation algorithm for the boundary of a discrete shape from a sequence of hexagonal grids. Algebraic discrete geometry [9] [10] [11] [12] [13] allows us to describe linear manifolds, which are collections of unit elements, in two-dimensional discrete space as double Diophantus inequalities. For the reconstruction of a smooth boundary from sample points, polygonalisation on a plane is the first step. Following polygonalisation, we estimate the geometric features of a figure, such as the normal vector at each point on the boundary, and the length and area of planar shapes. There are basically three types of model for the expression of a linear manifold in the grid space, supercover, standard, and naive models [13] . We deal with the supercover model for the hexgonal grid system on a plane. A hexagon on a plane has both advantages and disadvantages as an elemental cell of discrete objects [1] [2] [3] [4] [5] [6] . The area encircled by a hexagon is closer to the area encircled by a circle than is the area encircled by a square. Although the dual lattice of a square grid is a square grid, the dual grid of a hexagonal grid is a trianglar grid [14] . Therefore, for multi-resolution analysis, we are required to prepare two types of grid. From the application in omni-directional imaging systems in computer vision and robot vision [15, 16] , the spherical camera model has recently been of wide concern. Although the square grid yields uniform tiling on a plane, it is not suitable as a grid element on the sphere. The hexagonal grid system provides a uniform grid on both a sphere [15, [17] [18] [19] and a plane [1] [2] [3] [4] [5] [6] . In refs. [20] [21] [22] a linear-programming-based method for the recognition of linear manifolds for the square grid system has been proposed. This method is based on the mathematical property that a point set determines a system of linear inequalities for the parameters of a linear manifold, and the recognition process for a linear manifold is converted to the computation of the feasible region for this system of inequalities. The other class for the recognition of a linear manifold is based on the binary relation among local configurations in 3×3 pixel regions, since the geometrical properties of the discrete linear manifold are characterised by a sequence of 3 × 3 pixel regions [7, 8, 14] . Our method proposed in this paper is based on the former method for the derivation of constraints on parameters of the Euclidean line that passes through hexagonal grids. We first define hexagonal grids on a two-dimensional Euclidean plane (x, y). the hexagonal grid centred at x 0 = (x 0 , y 0 ) . Simply, we call it the hexel at x 0 . The supercover [12, 13] in the hexagonal grid is defined as follows. The supercover in the hexagonal grid system is a collection of all hexagons that cross a certain line. , and (x 0 + 1 2 , y 0 − 1) , the distances from these vertices to the centre of the hexagon are Therefore, if a line crosses a hexagon, we have the relations These relations lead to the next theorem. Theorem 1. Setting a and b to be integers, the supercover of a line L : ax + by + μ = 0 on the hexagonal grid is a collection of hexagons that satisfy the relations (4) for integers α and β. The following is a geometric definition of the bubble [10] [11] [12] [13] in the hexagonal grid system. Fig. 1 Figure 1(c) shows that a supercover in the hexagonal grid system contains bubbles if a line crosses a pair of edges that share a vertex. Considering this geometric property of a bubble, we derive mathematical conditions of a line whose supercover contains bubbles. First, we sort the elements of D = {d i } 6 i=1 , which are defined by (2), as If a line crosses a pair of edges that share a vertex, the relations are satisfied. These conditions are equivalent to Therefore, setting Equations (7) and (8) are expressed as Furthermore, Definition 3 implies that the centre of a hexagonal grid (x, y) satisfies the conditions for integers α and β. This algebraic relation implies the following system of inequalities: These relations lead to the conclusion that the supercover of line ax + by + μ = 0 contains bubbles in the hexagonal grid system if a pair of integers (α, β) satisfies Eq. (14), (15) , (16) , or (17) . The analysis above leads to the next theorem. are satisfied, the supercover of line ax + by + μ = 0 contains bubbles, where Now, we show two examples for the supercover in the hexagonal grid system. gcd(3|a|, 2|b|) = gcd(6, 14) = 2. From this relation, we can select m and n from m = 0, 1, 2, and n = 0, 1, 2, respectively. If we select m = 1, we have the relation Therefore, the supercover of line 2x + 7y − 1 contains bubbles, as shown in Fig. 2(a) Example 2. For line 2x − 3y + 1 = 0, we have gcd(3|a|, 2|b|) = gcd(6, 6) = 6. From this relation, we can select m and n from m = 0, 1, 2 and n = 0, 1, 2, respectively. Here, plugging all combinations of m and n to Eq. (18) of theorem 2, we have the relations Since all combinations of m and n yield noninteger, the supercover of line 2x − 3y + 1 does not contain any bubbles, as shown in Fig. 2(b) . In this section, we develop an algorithm for the reconstruction of the Euclidean line [12, [20] [21] [22] from sample hexels. For integers α i and β i , setting or to be the centroids of the hexels, for a pair of positive integers a and b, we have four cases: Equations (23) and (24) are derived from Eqs. (12) and (13), respectively. Here, we show the reconstruction algorithm for case 1. Assuming that all sample hexels are elements of the supercover of line ax + by + μ = 0 for a ≥ 0 and b ≥ 0, we have the relations for Then, Eq. (29) becomes This expression allows us to use the algorithm derived in the ref. [23] . Using the optimisation procedure for the recognition of a Euclidean line from a collection of hexels, in this section, we develop an algorithm for the polygonalisation of the discrete boundary of a binary shape [12] . Setting P to be a digital curve which is described a sequence of hexels, our problem is described as follows. for p ij = (x ij , y ij ) and |P i ∩ P i+1 | = ε for an appropriate small integer ε. We solve the problem using the minimisation problem. for edges that minimise the criterion with respect to the system of inequalities, The following is an incremental algorithm for this minimisation problem. step 1: Input the centroids of hexels, say, P = {p i |i = 0, 1, 2, · · · , n}. step 2: Set head = 0, j = 0. step 3: Set tail = head + 3. step 4: Set L j = {p i } head tail . step 5: If a line l j which passes through L j = {p i } head tail , then set tail = tail + 1 and go to step 3. step 6: If j = 0, then set j = j + 1, head = tail and go to step 2. step 7: If j > 0, then compute the common point of l j−1 and l j , and set it as A j−1 . step 8: If A j−1 exists and it is included in L j or L j−1 , then go to step 10. step 9: Set head = head − 1 and go to step 3. step 10: Output L j−1 and l j−1 . step 11: If tail < n, then set head = tail and j = j + 1, and go to step 3. step 12: If tail = n, then stop. To remove the bubbles from the supercover of a line, we introduce a dual hexel. For hexel ABCDEF in Fig. 3(b) , we define the dual hexel A'B'C'D'E'F', as shown in Fig. 3(b) . As shown in Fig. 3(c) , if line L passes through points A'B'C'D'E'F' without crossing with vertices A, B, C, D, E, and F, the supercover of L is bubble-free. Setting (x i , y i ) to be the centroid of a hexel, the vertices of the dual hexel are ( . Therefore, the bubble-free supercover defined by hexels whose centroids are For error analysis, we have evaluated the total areas encircled by the reconstructed curves and the total lengths of reconstructed curves for the circles whose radius are from 10 to 1000. show the results of error analysis for the polygons reconstructed from hexels and dual hexels, respectively. These results show that by increasing the resolution, the reconstructed curves converge to the original curves. Figures 7 and 8 show the results of polygonalisation from digital curves of hexels and dual hexels, respectively. The order of the dual-hexel sequence is the same as that of the original hexels on the curve. The numbers of edges of the We defined algebraic discrete geometry to hexagonal grids on a plane. Using algebraic discrete geometry, we developed an algorithm for the polygonalisation of discrete objects on a hexagonal-grid plane. In this paper, we aimed to formulate the recognition of a linear manifold from a discrete point set as a nonlinear optimisation problem. We dealt with a supercover model on a plane and in a space. We first derived a set of inequalities for the parameters of a Euclidean linear manifold from sample points and an optimisation criterion with respect to this set of constraints for the recognition of the Euclidean linear manifold. Second, using this optimisation problem, we develop an algorithm for the computation of parameters of the Euclidean linear manifold from hexels on a plane. Liu [2, 3] introduced algorithms for the generation of sequences of connected hexagons from a line and a circle, respectively. In this paper, we dealt with three problems Geometric transformations on the hexagonal grid The generation of straight lines on hexagonal grids The generation of circle arcs on hexagonal grids An analysis on hexagonal thinning algorithms and skeletal shape representation Edge detection in a hexagonal-image processing framework Hexagonal Image Processing The Euler characteristic on the face-centerd cubic lattice Strongly normal set of convex polygons or polyhedra Coplanar tricubes Digital naive planes understanding Combinatorial pieces in digital lines and planes Supercover model, digital straight line recognition and curve reconstruction on the irregular isothetic grids Supercover of straight lines, planes and triangles Thin discrete triangular meshes Image processing on an omni-directional view using a hexagonal pyramid Panoramic Vision, Sensor, Theory, and Applications Geodesic discrete global grid systems. Cartogr Climate modeling with sperical geodesic grids Riemannian Geometry: A Beginner's Guide Recognizing arithmetic straight lines and planes A linear incremental algorithm for naive and standard digital lines and planes recognition A simple algorithm for digital line recognition in the general case. Pattern Recogn Nonlinear optimization for polygonalization Therefore, our algorithm generally resolves the problems dealt wiht by Liu [2, 3] .Most of this paper is based on the research conducted by Troung Kieu Linh while she was at the School of Science and Technology, Chiba University.