# An ARCore Based User Centric Assistive Navigation System for Visually Impaired People
## 3 Design of ANSVIP
### Real-Time Area Learning-Based Localization  
The system relies on existing indoor scenario CAD maps, which are available as escape maps near elevators (as requested by fire departments). The map we use in this study is presented in Figure 4. We label the area of interest on the map so as to allow the system to understand navigation requests and to plan the path accordingly.  
Google ARCore is used to track the pose of the system in navigation. The sparse features are collected and stored in an area description dataset and subsequently used in re-localization. Specifically, a normal-sighted person has to build the sparse map of the indoor scenario by running the ARCore SLAM in advance. Then, the assistive system is capable to re-localize itself on the pre-built map after entering the scenario. By observing and recognizing the labeled traceable objects, the system is able to re-localize itself after roaming in the system map. However, the mapping between points in the system feature-based map and those on the scenario CAD map has to be obtained.  
Figure 4: The digital CAD map before (**left**) and after (**right**) being labeled.  
Figure 3: The working logic among the ANSVIP components: The physical components and soft components are shown on the left hand side and right hand side, respectively.  
We use a singular value decomposition method to find the transportation matrix A. Two groups of corresponding feature point sets are used for finding the homogeneous transformation matrix:  
\[\text{A}=\left[\begin{array}{cc}R_{2\times 2}&t_{2\times 1}\\ 0&1\end{array}\right]=\left[\begin{array}{ccc}\cos(\theta)&-\sin(\theta)&t_{x }\\ \sin(\theta)&\cos(\theta)&t_{y}\\ 0&0&1\end{array}\right]. \tag{1}\]  
Let \(l_{n}=[x_{n},y_{n}]^{T}\) denote the point sets in the feature map, and let \(p_{n}=[i_{n},j_{n}]^{T}\) denote the corresponding point set on the scenario CAD map. We use the least squares method to find the rotation \(R\) and translation \(t\) as follows:  
\[(R,t)\leftarrow\underset{R,t}{\arg\min}\underset{i=1}{\overset{N}{\sum}}\|R \times p_{i}+t-l_{i}\|^{2}. \tag{2}\]  
Denote \(\overline{l}=\frac{1}{N}\underset{i=1}{\overset{N}{\sum}}l_{i}\), \(\overline{p}=\frac{1}{N}\underset{i=1}{\overset{N}{\sum}}p_{i}\), Equation (2) can be written as  
\[R\leftarrow\underset{R}{\arg\min}\underset{i=1}{\overset{N}{\sum}}\left\|R \times\overline{p}_{i}-\overline{l}_{i}\right\|^{2}. \tag{3}\]  
For M \(x=b\),  
\[\text{M}=\left[\begin{array}{cccc}x_{1}&-y_{1}&1&0\\ y_{1}&x_{1}&0&1\\ \vdots&\vdots&\vdots&\vdots\\ x_{n}&-y_{n}&1&0\\ y_{n}&x_{n}&0&1\end{array}\right], \tag{4}\]  
\[x=[\cos(\theta),\sin(\theta),t_{x},t_{y}]^{T}, \tag{5}\]  
\[b=[i_{1},j_{1},...,i_{n},j_{n}]^{T}. \tag{6}\]  
Using SVD to decompose M, we find  
\[\text{M}_{N\times 4}=U_{N\times N}S_{N\times 4}V^{T}{}_{4\times 4}, \tag{7}\]  
where \(U\) denotes the feature matrix of \(MM^{T}\), \(S\) denotes the diagonal matrix with eigenvalue \(\delta_{i}\), \(V\) is the eigenvector matrix of \(M^{T}M\), and we have A in (1) calculated by  
\[x=(Vdiag(\delta_{1}^{-1},...,\delta_{4}^{-1})U^{T})^{-1}b. \tag{8}\]