## 2 Global Registration Method Based on the OBB Regional Area-Based Descriptor
### Principle Concept and Flow Chart Diagram of the Global Registration Method
If \(P\) and \(Q\) represent the same free-form shape, the least squares method can be used to calculate the initial rotation and translation by minimizing the sum of the squares of alignment errors. Let \(E\) be the sum of the squares of alignment errors. Accordingly,

\[E=\sum\limits_{i=1}^{k}\,|\,|\,e_{i}\,|\,|^{\,2}=\sum\limits_{i=1}^{k}\,|\,| \,p_{i}-R\cdot q_{i}-t\,|\,|^{\,2} \tag{1}\]

where \(R\) is the rotation matrix, \(t\) is the translation vector, \(p_{i}\) and \(q_{i}\) is the corresponding point pair between the \(P\) and \(Q\) point clouds. Let \(\overline{p}\) be the centroid of the set of corresponding points in \(P\)\(\{p_{1},p_{2},\,\ldots,\,p_{k}\}\) and \(\overline{q}\) be the centroid of the set of corresponding points in \(Q\)\(\{q_{1},q_{2},\,\ldots,\,q_{k}\}\). Then \(\overline{p}\) and \(\overline{q}\) can be defined as:

\[\overline{p}=\frac{1}{k}\sum\limits_{i=1}^{k}p_{i} \tag{2}\]

\[\overline{q}=\frac{1}{k}\sum\limits_{i=1}^{k}q_{i} \tag{3}\]

The new coordinates of points are denoted by:

\[p_{i}^{\prime}=p_{i}-\overline{p} \tag{4}\]

\[q_{i}^{\prime}=q_{i}-\overline{q} \tag{5}\]

Note that:

\[\sum\limits_{i=1}^{k}p_{i}^{\prime}=\sum\limits_{i=1}^{k}\left(p_{i}-\overline{ p}\right)=\sum\limits_{i=1}^{k}p_{i}-k\overline{p}=0 \tag{6}\]

\[\sum\limits_{i=1}^{k}q_{i}^{\prime}=\sum\limits_{i=1}^{k}\left(q_{i}-\overline {q}\right)=\sum\limits_{i=1}^{k}q_{i}-k\overline{q}=0 \tag{7}\]

The registration error term is then expressed and rewritten as:

\[e_{i}=p_{i}-R\cdot q_{i}-t=p_{i}^{\prime}-R\cdot q_{i}^{\prime}-t^{\prime} \tag{8}\]

where \(t^{\prime}=t-\overline{p}+R\cdot\overline{q}\)

The sum of the squares of the errors becomes:

Figure 3:0 Figure 3:1 Figure 3:2

The first term in Equation (9) does not depend on \(t^{\prime}\). Therefore, the total error is minimized if \(t^{\prime}=\ 0\), and then:

Figure 3:3Therefore, the initial translation matrix can be computed based on the difference between the centroid of \(P\) and the centroid of \(Q\). In addition, the weight loss at the missing parts of two the scan series may result in a significant bias between the translation matrix being estimated (by the difference between the centroid of \(P\) and the centroid of \(Q\)) and the real translation matrix. The shifting of two gravity centers (the red and green points shown in Figure 4) being created using a virtual camera from a model having the centroid (white point) in Figure 4a illustrates the influence of weight loss from the missing points to the centroid point position. Assume that the two point sets are separated as shown in Figure 4b. The accurate translation matrix to merge set \(Q\) (green point cloud) with set \(P\) (red point cloud) is defined through the difference between the current centroid of \(P\) and the original centroid of the green point cloud (green points). Therefore, it is necessary to estimate the original centroid of \(P\) on the object for translation. The boundary points located near the missing part can be detected through the geometric relationship with the support plane and using a set of connected edges that satisfy two requirements, in which all edges have a similar orientation and each edge lacks an assigned triangle, either on the left or on the right side [7] (as shown in Figure 4c). Then, the Random Sample Consensus (RANSAC) algorithm [13] is used to fit a mathematical model to the boundary and enclose the missing region by adding extra points. Therefore, the initial translation matrix can be computed based on the difference between the centroid of enclosed \(P\) and the centroid of enclosed \(Q\). From now on, \(P\) and \(Q\) are referred to as enclosed P and enclosed \(Q\), respectively. ### Determination of Oriented Bounding Box (OBB)

The oriented bounding box is a rectangular bounding box that covers whole object point cloud.