In a traditional relational database, a structured query language (SQL) is used to manipulate and select relevant subsets of data. A similar approach can be ap- plied on the structure graph G produced by the segmentation process described above. In particular, the extracted planar and complex segments, provide the required structure necessary to enable reasoning about and querying of point clouds. Specifically, a query is encoded as a graph whose nodes and transition relation specify the constraints and predicates to be satisfied within the structure graph of P. A query can be applied in two ways as follows:
• by choosing a specificseed segment inGand recursively returning all nodes (segments) which satisfy the query graph as one transition tree (§2.2.2) with the seed segment as root,
• by searching for patterns matching the query graph in all G and returning a set of transition trees.
In the first case, the result consists of one set of segments starting from the chosen seed segment and including all nodes in the expanded transition tree. In the second instance, a set of transition trees each representing a set of segments matching the constrains imposed by the query graph are returned. Figure 5.22 illustrates the query graph used to extract cylinders from a point cloud. Node s0
is therootof the query graph. Actions and predicates are attached to both nodes and transitions and are shown in Figure 5.22 in boxes, where actions are listed in the text above the horizontal line in the box, whereas predicates are listed below the line. For instance, transition (s0, s1) is followed, only if the angle between the
two planar segment surface normalsN0 and N1 is found to be greater than 100◦.
If the transition is followed, meaning that there exists a transition (n0, n1) in G
which satisfies this condition, a transition tree starts to form withn0 as root and
n1 as its only child. Since the orientation of a cylindrical object can be described
using a plane, this is computed from the two surface normals N0 and N1. For
any other planar segment, node in G, to be added to the transition tree, it now has to satisfy two conditions, namely that the angle between adjacent segments is more than 100◦ and that the normal of the new segment Ndst is within the
inG satisfies the condition attached to transition (s0, s1) in the query graph, for
instance (n0, n1) and (n0, n2), then both n1 and n2 are attached to the root node
of the transition tree and s1 is mapped to the set {n1, n2}. Finally, if the next
adjacent node being added is the root of the transition tree, the current branch in the transition tree is terminated and the result returned indicating that a full cylinder was detected.
S S1 S0 N0 = S0 Surface Normal Root = S0 N1 = S1 Surface Normal N = ComputePlane(N0, N1) N1 = S1 Surface Normal Angle(normalsrc,normaldst) > 100º Ndst = Sdst Surface Normal
Angle > 100º & InPlane(Ndst) & Sdst != Root Ndst = Sdst Surface Normal
Angle > 100º & InPlane(Ndst) & Sdst == Root
Figure 5.22: A query graph describing a cylinder using geometric constrains across connected planar segments. S0 represents the initial state of the graph and root of the
transition tree in G of the input point cloud P.
Queries such as the one just described are best suited to scenarios where a number of instances exist in the point cloud compatible with a particular shape, for instance when detecting columns or roof structures in large points clouds. In other cases, the selection of a portion of the point cloud given a specific starting point is useful, for instance in order to determine all objects placed directly on the ground or on a table. In these cases, a specific segment is chosen in G, referred to as the seed, from which a transition tree is built by moving across adjacent segments which satisfy node and transition constraints similar to the ones discussed above.
Figure 5.23 illustrates two query graphs used to transitively select segments connected to aseedsegment. In left-most query graph, surface normals and size in number of points in the segment are used as constraints between adjacent segments. On the other hand, the right-most query graph, the angle comparison is carried out between the normals of each segment and theseed. In both cases, the result of the query (or search) would consist of a transition tree with all the planes connected to the seed which satisfy the transition constraints.
S n Nn = Sn Surface Normal Nn+1 = Sn+1 Surface Normal Angle(Nn , Nn+1) > 150º & |Sn+1| < 4K S 0 Sn
N= S0 Surface Normal Nn = Sn Surface Normal
Angle(N, Nn) > 170º
Figure 5.23: Two query graphs using seed segments. The first transitively returns nodes with more than 4K points which are connected at 150◦. The second returns connected nodes which are at an angle more than 170◦ from the seed plane normal.
oin t Cloud Structure Graphs 119 Mnajdra 24 6 12 1.2 593 320 226 823 211 2.18 2.13 11 Tarxien 18 6 20 1.2 2,515 2,119 387 977 142 18 5.2 152 Villard 36 6 8 1.2 7,222 5,459 1,762 1495 2391 47 291 99 Office Room 1 48 24 20 1.2 10,655 8,319 2,336 243 3293 82 64 42 Office Room 2 48 24 20 1.2 10,211 7,837 2,374 316 2853 79 64 16 Warwick Area 24 12 20 1.2 17,291 9,669 7,620 3787 9842 95 196 111 Airborne LiDaR 18 6 20 1.2 5,099 3,681 1,320 5822 149 23 111 289
Table 5.1: Point cloud segmentation parameters used in results section and resulting number of point and segment types. From left to right columns show; Reference: name of point cloud; kt: the number of k nearest neighbours used in the labelling phase; kf: the number
of k nearest neighbours used in the region-growing phase;α: the eigenvalues ratio; r: the plane tolerance value used for RanSaC plane fitting;|P|: total number of point cloud samples (in thousands);|Ps|: total number of points labelled as surface points (in thousands);
|Pe|: total number of points labelled as edge points (in thousands); Sp: total number of ∗ ·planar segments; Sc: total number of
∗ ·complex segments; Tl: time taken for labelling of points (in seconds); Tr: time taken for region-growing process (in seconds); Ts: