INDOOR POSITIONING AND NAVIGATION BASED ON CONTROL SPHERECAL PANORAMIC IMAGES

Continuous indoor and outdoor positioning and navigation is the goal to achieve in the field of mobile mapping technology. However, accuracy of positioning and navigation will be largely degraded in indoor or occluded areas, due to receiving weak or less GNSS signals. Targeting the need of high accuracy indoor and outdoor positioning and navigation for mobile mapping applications, the objective of this study is to develop a novel method of indoor positioning and navigation with the use of spherical panoramic image (SPI). Two steps are planned in the technology roadmap. First, establishing a control SPI database that contains a good number of well-distributed control SPIs pre-acquired in the target space. A control SPI means an SPI with known exterior orientation parameters, which can be solved with a network bundle adjustment of SPIs. Having a control SPI database, the target space will be ready to provide the service of positioning and navigation. Secondly, the position and orientation of a newly taken SPI can be solved by using overlapped SPIs searched from the control SPI database. The method of matching SPIs and finding conjugate image features will be developed and tested. Two experiments will be planned and conducted in this paper to test the feasibility and validate the test results of the proposed methods. Analysis of appropriate number and distribution of needed control SPIs will also be included in the experiments with respect to different test cases. * Corresponding author


INTRODUCTION 1.1 Motivation
High accuracy navigation has been achieved since a successful integration of Global Navigation Satellite System (GNSS) and Inertial Measurement Unit (IMU).However, such navigation system are only available for outdoor open-sky environments.The navigation accuracy rapidly drops whenever GNSS signals are blocked.Although using alternative signals, such as Wi-Fi or radio signal, for positioning has been proposed, the complicated indoor environment leads to the bad result.Using the image-based or vision-based method to do the indoor navigation is an effective solution.Moreover, use the panoramic image can get the more image information than use the frame image.

Overview
An image has the complete (360˚ horizontal by 180˚vertical denote 360 x 180) viewing coverage of the surrounding landscape is called spherical panoramic image (SPI).There are a lot of multi-camera SPI sensors on the market.Ladybug is one of the famous SPI sensors, which is commonly applied for visual odometry in mobile mapping systems.Ladybug 5 is used in this research to capture the SPIs.
The basic concept of this research is using SPIs to compute the position and orientation parameters.First, establish a set of control SPI, which means the exterior orientation had been solved, namely control SPI database.As long as there is SPIs with unknown exterior orientation parameters.With the image matching technique, the corresponding image can be found.The relative orientation can be computed by computer vision computation.
However, because of the spatial geometry of SPI, there are some problems such as the ambiguity of the relative orientation.So a novel method was proposed to deal with the problems.Moreover, the scale between the images is still unknown after getting the relative orientation parameters.With the ray intersection and least-squares, the scale can be calculated successfully.
In this research, we used Speed-Up Robust Feature (SURF) (H.Bay, 2008) algorithm to detect feature points and match conjugate points, then Random Sample Consensus (RANSAC) is applied to remove the wrong matching points.To frame images, RANSAC provide the user high efficient computation and accuracy result.It is since that the projection type of frame image is affine transformation.But RANSAC cannot perform well with panoramic images since the projection type of it is sphere.We find that the problem can be solved by changing the mapping model.
A preliminary test was conducted to investigate how the pattern of the vectors shows between two panoramic images.The camera we used is Ladybug and there are three different cases.Case I is straight movement of camera with distance 0.95m between two different sites.Case II is rotation of camera about 90˚ clockwise at a fixed site.Case III takes two images with camera kept horizontal and tilt about 10˚.
A complete experiment had been done to validate the theory in this research, including set up a control images database, find the corresponding images and calculate the orientation and scale.The accuracy of the positioning will be discussed and shown in this article.

Reference to Related Work
Motion estimation using a single camera is possible in related study (Shi, 2014).The results rely on intersection geometry.The lack of features in some circumstances may cause the navigation failure.To improve the quality of spatial data and obtain a solid solution for moving trajectory, applied panoramic camera is a suitable solution.
Essential matrix plays an important role for the orientation computation in computer vision field.The minimal case solution of essential matrix involves five 2D to 2D feature correspondences using epipolar constraint.A simple and straightforward solution for n≧8 noncoplanar points is eightpoint algorithm (Longuet-Higgins, 1981).With these methodologies, we can compute the essential matrix and do more application (Stewenius, 2006).
The relative relation between two images can be extracted by Essential matrix.If one camera matrix of the image is known, in order to compute the second camera matrix, ' C , we may assume that the first camera matrix is (Nister, 2004).Both rotation and translation form E has two different solutions, so the ' C has four different solutions.By triangulation of a single point X, the correct R, t pair can be identified.The four solutions are illustrated in figure 1, where it is shown that a reconstructed point X will be in front of both cameras in one of these four solutions only (Hartley, 2000).

Database Creation
Because the position and orientation of the query SPI are based on the control SPIs, it is necessary to create a database.Features on the control SPI will be compared with features on the query SPI.To create a control image database is not only collect a set of SPIs covering the whole environment but needs to calculate the exterior orientation of SPIs.
Similar to traditional photogrammetry, SPI points can be treated as a bundle of light rays.Therefore, triangulation of bundle adjustment of overlapped SPIs can be performed to recover the exterior orientation parameters of SPIs ( Lin, 2014).

Geometric Relationship
Suppose there is an ideal SPI, the geometric relationship of the SPI point and the corresponding object point can be described as a light ray.When the light ray is defined in SPI frame and the corresponding object point is defined in object frame, the geometric relationship between the light ray and object point can be described in Fig. 2. It means that the vector of an object point P is the combination of the vectors of SPI centre and the light ray.This relationship can be written as Eq. ( 1).

Bundle Adjustment of SPIs
With the bundle intersection of light rays, the exterior orientation parameters of SPIs can be solved.This can be achieved by connecting the tie points of overlapped SPIs.Similar to conventional bundle adjustment, a few control points or observed SPI centres are necessary for the solution.But in the indoor environment case, the observation of SPI centres cannot obtain.So the possible solution can be divided into two types, which are coordinates of ground control points and SPI points.The concept of multi-station network is shown as Fig. 3 and the observation equations with respect to two types of observations can be expressed as Eq. ( 2) and Eq.(3).(2)

Coplanar Condition and Essential Matrix
The relative orientation of two images Ik and Ik-1 is obtained by the intersection of the projection rays of homologous imagepoints.The base-vector and the two projection rays are coplanar.This relationship can be depicted in Fig. 4. In this situation, the hexahedral volume made by the vectors, namely the light ray from I1 camera, the light ray from I2 camera and the base-vector is zero.Eq. ( 4) explains the concept of coplanar condition and it can be rewritten as Eq. ( 5).Essential Matrix describes the relationship between two images Ik and Ik-1 of a calibrated camera (Scaramuzza, 2012).It contains the camera motion parameters up to an unknown scale factor for the translation (Sabzevari, 2014).To estimate Essential Matrix, there two common methods.One is using normalized image coordinates, or else computing from Fundamental Matrix.For SPI case, the interior orientation is nonlinear, so it is difficult to compute Essential Matrix from Fundamental Matrix.
The Essential Matrix can be computed from 2D to 2D feature correspondence using epipolar constraint.The minimal case solution involves five 2D to 2D correspondences.Moreover, a simple and straightforward solution is the Longuet-Higgins' eight-point algorithm, which is summarized as each feature match gives a constraint of the following form Stacking the constraints from eight points gives the linear equation system 0 AE  , and by solving the system, the parameters of E can be computed.This homogeneous equations can easily be solved using singular value decomposition (SVD).Having more than eight points to an overdetermined system to solve in the least-squares adjustment and provides a degree of robustness to noise.The SVD of A has the form , and the least-squares estimate of E with 1 E  can be found as the last column of V.

Camera Matrix and Ambiguity
In section 2.4, Essential Matrix can be derived with feature correspondence.Once Essential Matrix is known, the camera matrices may be retrieved from E. It means that from the estimate of Essential Matrix, the rotation and translation parts can be extracted up to scale.To extract the camera matrix, it needs to assume the first camera matrix is where, P = camera matrix of first camera I = identity matrix Eq. ( 8) describes that the position of the first camera locates at the origin and does not contain any rotation.With Eq. ( 6), where T is a skew-symmetric matrix that satisfies 1 2  , for all vectors v, while R is an orthonormal matrix (with positive determinant), that is, r  and R given E (Horn, 1990).
The ambiguity of the solution is illustrated in Fig. 1.Assume the first camera is at the origin of the coordinate system , and the second camera ' P , is rotated and translated according to i P .The correct solution for second camera is the transformation matrix i P which triangulates a point correspondence in front of both cameras.With the triangulation provided in the frame work, the correct solution can be recognized.
However, the situation become totally different in SPI case.The approach for frame image is not suitable for the SPI since there is no definition of front side and back side with SPI.So there is a novel method proposed to deal with SPI ambiguity problem.To select the correct solution in four possible solutions, generate a virtual object point in the space first.Because the camera matrix of first camera and second camera have been done already, the object coordinate in object frame can be solved.

Scale Factor and Ray Intersection
Relative orientation does not contain scale factor.Even if the correct solution has been recognized, it only contains the rotation and translation of second camera in first camera frame.In order to obtain the exterior orientation of second camera in object frame, scale factor between first and second camera should be derived.With only two SPIs, namely one is query image and the other is control image, we can only calculate the relative orientation parameters.But if we add one more control image, scale factor can be computed with ray intersection method.To apply ray intersection method, it need at least two control SPIs.The relationship of ray intersection can be illustrated as Fig. 7 and expressed as Eq. ( 9).The least-squares adjustment can be performed to solve the unknowns and it shows only two control SPIs can implement the system.

EXPERIMENT
This research firstly focuses on the geometry of image formation of panoramic cameras.The parameters of exterior orientation of an SPI will be defined according to the geometry of image formation.The experiment was done at the Department of Geomatics PRS Lab and contains three test, including movement of camera, self-rotation of camera and oblique the camera.
Another experiment was also conducted at the Department of Geomatics.In order to verify the methodology in this research, we set up a control images database.The exterior orientation parameters of the SPIs were calculated with bundle adjustment.The procedure to calculate the orientation of the query image can be divided into three parts.First part is search the suitable control images in database and automatically measure the feature correspondence.This can be achieved by SURF and RANSAC.Then the relative orientation without the scale factor between the query image and control images can be extracted from essential matrix.Finally, ray intersection and least-squares are applied to get the scale factor and the position of the query image is also derived.

Experiment of Image Geometry
There are three tests, Case I is movement test, at first, take a SPI then straight move the camera to next site and take another one.The distance between two SPIs is 0.95m.Figure 8(a) shows the concept of the case I. Case II is rotation test, at first, take a SPI then do not move the camera but rotate it with 90˚ clockwise.Figure 8(b) shows the concept of cases II.Case III is oblique test, at first, keep the camera horizontal and take a SPI then make the camera tilt about 10˚ and take another one.Figure 8(c) shows the concept of case III.The resolution of SPI is 8000 x 4000.Because there is no camera at the bottom of ladybug, it lead to the black area at the bottom of image.After acquiring the SPIs, we used SURF to automatically detect feature points and match conjugate points.Then RANSAC was applied for removing the error matching pairs.On the other hand, both affine and Essential matrix transformation model were used in RANSAC algorithm.The matching results are shown in chapter 4.

Experiment of Indoor Positioning
This experiment was conducted to validate the concept of this research.A database contains lot of SPIs with the solved orientation was set up firstly.The exterior orientation parameters were calculated by using bundle adjustment.Then took several SPIs to be the query images and put these SPIs into control SPI database to search the corresponding control SPI.Once the math is done, the conjugate points between query and control SPI can be automatically measured so that the relative orientation can be solved.Finally, compute the scale factor and get the coordinate of the query image.This experiment was completed in the Department of Geomatics.Fifteen SPIs were used to establish the control SPI database.The area of the experiment field is about 100 2 m but contains two floors.SPIs are distributed around the experiment field including first floor, second floor and stairs.Five of these SPIs were used to be the query images.Each SPI was put into the database to search with other 14 SPIs and calculated the position and orientation of it.
The coordinate system in this experiment is a local coordinate system.Whole procedure after setting up control SPI database is automatic.The result and discussion are in the chapter 4.

SURF and RANSAC (Affine model)
Two SPIs directly matched with SURF and RANSAC.The red image is the first image while blue image is the second image.To affine model, the result shows that RANSAC will remove almost all match pairs, which means there are few conjugate points on the image.Moreover these conjugate points are unevenly distributed around the image.Fig. 9 shows the result of movement, rotation and oblique.

Experiment Field
To set up a control SPI database is necessary to use few control points for the bundle adjustment computation.Fig. 11 shows the distribution of control points.These control points located at the ground and wall.The coordinates of these points are measured by total station and are reliable to be used.Table 1 shows the accuracy of these control points.Because control point B is the origin point of this coordinate system, its coordinate is defined as zero without error ellipse.The horizontal coordinates of A is also pre-defined.

Positioning Result
Five SPIs were chosen to be the query images and compared its positioning result with the bundle adjustment result which can be regard as the true value.Fig. 13 shows one correspondence image in this experiment.The ceiling area does not contain any conjugate points.It is limited by the SURF algorithm.Because the matching procedure is achieved with the image type like Fig. 13.The distortion come with projection still cannot be solved and make a trouble when using SURF to match SPIs.Table 4 shows the error index of each query SPI.

CONCLUSION
In this study, we firstly focus on the pattern of the conjugate points between two SPIs.Therefore we designed three common cases of camera orientation to test how the pattern will be in SPI.
To frame images, the vectors of change view are easy to be analysed, since frame image contains few feature points, it make the image-based or vision-based become harder to accomplish.SPI contains almost full view that provides more feature points for navigation mission.
After get matching pairs between two overlapped SPIs, the relative orientation computation can be implemented.Here, essential matrix is applied to calculate the relative orientation of two SPIs.Essential matrix describes the relation between two calibrated cameras.The rotation and translation can be extracted from essential matrix.The way to derive essential matrix is SVD method.If the absolute orientation of one image is known and the relative orientation also known with essential matrix, the orientation of the other image can be derived successfully.
The precision of positioning result for query SPI is influenced by the quality of corresponding features.The experiment result shows the positioning with SPIs can cut down the quantity of image since SPI's wide horizontal view.The result shows the error of positioning can be controlled in one meter.
On the other hand, though the error matching pair can be found and removed by RANSAC, the distortion come with projection still make a trouble for SURF algorithm.In the top part of the image, it exists serious distortion and causes SURF cannot match successfully in this area.A suitable way is match SPI in sphere image not plane image.Once it is possible to increase the quantity and quality of corresponding pairs, the positioning result will improve obviously.

Figure 1 .
Figure 1.The four possible solutions for calibrated reconstruction from E.

Figure 2 .
Figure 2. The geometric relationship of an SPI light ray and the corresponding object point.O O O I

Figure 3 .
Figure 3. Concept of multi-station network adjustment of SPIs

Figurer
Figure 4. Concept of coplanar condition of SPIs 1 I1 1 2 2 R ( ) 0 O I O O P I I I r r R     matrix S is singular, so Essential Matrix is also singular.(Hence one of the constraints on the elements of E is ( ) 0 Det E  ).The problem addressed here is how to recover T, namely, we have the object coordinate in SPI frame I P r , and object coordinate in object frame O P r .The vector I P r , can transform The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLI-B6, 2016 XXIII ISPRS Congress, 12-19 July 2016, Prague, Czech Republic This contribution has been peer-reviewed.doi:10.5194/isprsarchives-XLI-B6-251-2016into object frame with rotation matrix O I R , and the vector from SPI centre to object point O I P r  , also can be computed.If both rotation and translation of second camera are correct, the angle between OI IP Rr , and O I Pr  will close to zero.This angle can be easily computed by inner product calculation.The main concept of this algorithm is illustrated in Fig.5.

Figure 5 .
Figure 5. Angle relationship of vectors Similar to the frame camera, there are four possible solutions after extracting the rotation and translation form Essential Matrix.The rotation and translation ambiguity is illustrated as Fig. 6.Fig. 6(a) is the correct solution since the angles of first camera and second camera are close to zero.Other cases shows that at least one camera contains the angle close to 180˚ which means either the rotation matrix of second camera is wrong or the translation matrix of second matrix is wrong.

Figure 6 .
Figure 6.Rotation and translation ambiguity of SPI

Figure
Figure 7.The concept of the ray intersection

Figure 9
Figure 9(a).Movement test with affine model

Figure 10
Figure 10(a).Movement test with Essential matrix model

Figure 11
Figure 11(a).Distribution of the control point (Top view).

Figure
Figure 11(b).Distribution of the control point (Side view).

Figure 13
Figure 13(a).Query image of corresponding pair

Table 3 .
Using 15 SPIs to form a bundle adjustment system and calculate the exterior orientation parameters.The database not only collects the SPIs but also records these parameters.Fig 12 shows the distribution of the SPIs.Table 2 gives the standard deviation of exterior orientation parameters and table 3 givesthe residual of the check points to ensure the accuracy of the control SPI database.Figure 12. Distribution of the control SPIs.The residual of check points

Table 4 (
b). Mean error and RMSE of the resultThe precision in height direction is better than horizontal direction.Most difference values are under 1 meter.It is obviously that No.4 SPI is a blunder.The value of mean error and RMSE did not take it into account.The reason for bad result of No. 4 SPI is because the corresponding pair between this SPI and other control SPI was insufficient.Although the quantity of control SPIs matched with each query images are 3, it cannot guarantee the quantity of corresponding pairs is enough.Table5shows the quantity of corresponding pairs between each query SPI and control SPIs.Only the top three control SPIs were used to compute the relative orientation parameters.The quality of SPI and corresponding pairs affects the positioning result a lot.If SPI contains imperfect geometry such as distortion dose not be removed while composing the SPI.This makes the matching result contain some error conjugate pairs.Once there are incorrect matching pairs, the positioning result of query SPI will be influenced.So make sure the corresponding points are good enough is a guarantee for good positioning results.
).Control image of corresponding pair

Table 5 .
Quantity of corresponding pairs between query and control SPIs