# PLI-VINS: Visual-Inertial SLAM Based on Point-Line Feature Fusion in Indoor Environment
## 3 Point Line Feature Processing
### Triangulation of Space Line Segments  
Using homogeneous coordinates to determine a straight line through two points will generate redundant parameters, which will bring additional computational costs in subsequent optimization. Therefore, this paper introduces Plucker coordinates to represent the straight line. The Plucker coordinate is determined by two different points on the line \(L_{W}\). Figure 4: Various line segments: (**a**) the main directions of adjacent line segments are inconsistent; (**b**) adjacent line segments are not in the peripheral matrix of the main line segment; (**c**) set of line segments that meet the conditions for merging. Figure 3: LSD line segment extraction effect: (**a**) indoor promenade scene; (**b**,_c_): LSD line segment extraction effect. If one sets straight \(L_{W}\) two endpoints of homogeneous coordinates of \(p_{1}[x_{1},x_{2},x_{3},x_{4}]^{T}\) and \(p_{2}[y_{1},y_{2},y_{3},y_{4}]^{T}\), the straight line \(L_{W}\) Plucker coordinates are expressed as follows:  
\[L_{W}=\left[ \begin{array}{c}p_{1}^{\prime}\times p_{2}^{\prime}\\ x_{4}p_{1}^{\prime}-y_{4}p_{2}^{\prime}\end{array} \right]=\left[ \begin{array}[] {c}n_{w}\\ v_{w}\end{array} \right]\in\mathbb{R}^{6} \tag{2}\]  
where \([\bullet]_{w}\) represents the coordinates of feature points or feature line segments in the world coordinate system; \(p_{1}^{\prime}\) and \(p_{2}^{\prime}\) are Cartesian coordinate representations of \(p_{1}\) and \(p_{2}\), respectively; \(n_{w}\in\mathbb{R}^{3}\) is the normal vector of line \(L_{W}\); \(v_{w}\in\mathbb{R}^{3}\) is the direction vector of line \(L_{W}\). The relationship between Plucker matrix \(T\) and Plucker coordinates can be obtained as follows:  
\[T=p_{2}p_{1}^{T}-p_{1}p_{2}^{T}=\left[ \begin{array}{cc}n_{w}^{\wedge}&v_{w} \\ -v_{w}^{T}&0\end{array} \right] \tag{3}\]  
where \(n_{w}^{\wedge}\) is the antisymmetric matrix of \(n_{w}\). If one allows the transformation matrix of line \(L_{W}\) from the world coordinate system to the camera coordinate system be \(H_{cw}\), then \(H_{cw}\) is as follows:  
\[H_{cw}=\left[ \begin{array}{cc}R_{cw}&t_{cw}^{\wedge}R_{cw}\\ 0&R_{cw}\end{array} \right] \tag{4}\]  
where \(R_{cw}\) and \(t_{cw}\) represent the rotation matrix and translation vector of line \(L_{W}\) transformed from the world coordinate system to the camera coordinate system. \(L_{c}\) is the coordinate of line \(L_{W}\) transformed from the world coordinate system to the camera coordinate system in space, so the formula of Plucker coordinate when representing the coordinate change in line \(L_{W}\) is as follows:  
\[ \begin{array}{l}L_{c}=\left[\begin{array}{cc}n_{c}\\ v_{c}\end{array}\right]=\left[\begin{array}{cc}R_{cw}&t_{cw}^{\wedge}R_{cw} \\ 0&R_{cw}\end{array}\right]\left[\begin{array}{c}n_{w}\\ v_{w}\end{array}\right]=H_{cw}L_{w}\\ L_{w}=\left[\begin{array}{c}n_{w}\\ v_{w}\end{array}\right]=\left[\begin{array}{cc}R_{cw}^{T}&-R_{cw}^{T}t_{ cw}^{\wedge}\\ 0&R_{cw}^{T}\end{array}\right]\left[\begin{array}{c}n_{c}\\ v_{c}\end{array}\right]=H_{cw}^{-1}L_{c}\end{array}  \tag{5}\]  
Space line \(L_{c}\) projection to the plane of projection equations expressed by \(L_{1}\), \(L_{1}\) as follows:  
\[L_{1}=\kappa n_{c}=\left[ \begin{array}{ccc}f_{y}&0&0\\ 0&f_{x}&0\\ -f_{y}c_{x}&-f_{x}c_{y}&f_{x}f_{y}\end{array} \right]n_{c}=\left[ \begin{array}[ ]{c}l_{1}\\ l_{2}\\ l_{3}\end{array} \right] \tag{6}\]  
where \(\kappa\) is the projection matrix of line features. It can be observed from the above that the Plucker coordinate is an expression form of six parameters, and there are excessive parameterization and orthogonal constraints, which will still cause unnecessary calculations in the optimization process. In this regard, [PERSON] [33] proposed a four-parameter orthogonal representation to address the above problems, and this work is adopted in this paper. Through the \(QR\) decomposition of the Plucker line coordinate \(L_{W}=\left[ \begin{array}{c}n_{w}^{T},v_{w}^{T}\end{array}