AUTOMATIC CONSTRUCTION OF WI-FI RADIO MAP USING SMARTPHONES

Indoor positioning could provide interesting services and applications. As one of the most popular indoor positioning methods, location fingerprinting determines the location of mobile users by matching the received signal strength (RSS) which is location dependent. However, fingerprinting-based indoor positioning requires calibration and updating of the fingerprints which is labor-intensive and time-consuming. In this paper, we propose a visual-based approach for the construction of radio map for anonymous indoor environments without any prior knowledge. This approach collects multi-sensors data, e.g. video, accelerometer, gyroscope, Wi-Fi signals, etc., when people (with smartphones) walks freely in indoor environments. Then, it uses the multi-sensor data to restore the trajectories of people based on an integrated structure from motion (SFM) and image matching method, and finally estimates location of sampling points on the trajectories and construct Wi-Fi radio map. Experiment results show that the average location error of the fingerprints is about 0.53m.


INTRODUCTION
With the great increment of mobile devices (e.g.smartphone), people now pay more attention to mobile navigation services.While the global positioning system (GPS) is widely used in outdoor navigation services, indoor positioning and navigation has also been a challenge due to the limited visibility of GPS.The commonly used indoor positioning technologies include WIFI (Bahl, 2000), Bluetooth (Kotanen, 2003), radio-frequency identification (RFID) (Ni, 2004), and Ultrawide Band (UWB) (Fontana, 2002).However, most of these methods are limited availability as the need for pre-installed infrastructure and built radio map (Liu, 2007).In particular, Wi-Fi fingerprinting-based solutions represent the current mainstream technologies for indoor positioning which take advantage of the existing Wi-Fi infrastructures.However, calibrating the radio map is labourintensive and time-consuming.
This study aims to provide an approach for automatic construction of radio map based on the combination of pedestrian dead reckoning (PDR) and image matching methods.PDR technologies can be used to measure the relative location of pedestrian (Beauregard, 2006).When one is walking along a corridor, the smartphone collects environment information continuously, including inertial information, video data as well as WI-FI signals.With the help of PDR, we can restore the trajectories and calibrate fingerprints at sampling points.However, the error of the trajectories (restored by PDR) will accumulate continuously, such as angle cumulative drift error and step length estimate error.We intend to use the structure from motion (SFM) method to improve the results of trajectory restoring.The motion of the camera can be calculate from video frames by using SFM (Davison, 2003).The principle of SFM refers to recover the three-dimensional structure of the scene from the image sequence which captured from moving platform.It can be used to obtain the relative position and orientation of the * Corresponding author moment of the moving camera (Jung, 2001).Image matching is one of the important steps of SFM, the result will determine the accuracy of the calculated angle.Integrating the motion information from video to PDR can increase the location accuracy of radio map.
The approach proposed in this study contains two stages: data collection and calibration of fingerprints.In first stage, people walks along indoor routes with smartphones on hands.The smartphones will collect multi-sensors data continuously, including inertial information, video data and WIFI signals.In second stage, we use these data to restore the trajectories and construct Wi-Fi radio map.

METHOD
This study aims to provide an approach for the construction of radio map in indoor environments using three steps:


Computation of the robust image matching results by proposed a multi-constrained image matching algorithm.


Calculating the heading angle of pedestrian motion, using SFM algorithm.


Estimating the motion trajectory and measure fingerprints.

Multi-constrained image matching
Image matching is a method to find the correspondence between two or more images on the pixel scale.Taking advantage of the correspondence among pixels, it can infer the relationship of images.Currently, there are various image matching methods, including: pixel intensity based image matching method, edge feature based image matching method, and texture based image matching method.Most of these methods need to detect the feature point or interest of point, distinctive and invariant features is useful for establish the correspondence among pixels.Scale invariant Feature Transforms (SIFT) (Lowe, 2004) is one of most popular image feature in computer version, which is invariant to rotation, translation and scale variation between images and partially invariant to affine distortion, illumination variance and noise (Ledwich, 2004).The main idea of SIFT feature is to calculate the difference of gradient magnitude and orientation on multi-scale Gaussians space, counting the weighted gradient magnitude orientation histogram of the keypoint, using a 128 dimensions vector to express the keypoint descriptor.
For matching of indoor image sequences, the SIFT feature and keypoint descriptor are extract from the reference images.Image points are matched by individually comparing each feature descriptor.There are many metrics of similarity measurement of vector include Euclidean distance, such as Manhattan distance, correlation coefficient and so on.However, false matching results exist if only these metrics are used.In order to remove the false matching results, we proposed an matching algorithm using three constraints: 1. Ratio constraint.For a keypoint  0 , the best matching points always be calculated as: where v is the descriptor vector of  0 ,  ′ is the descriptor vector of keypoints   , j is the dimension of the vector,   is the Euclidean distance.(2) Using H and the coordinates of matching points, we can get the coordinate conversion error and the outliers.Iterative this method and select homography matrix which have the most number of inliers.This RANSAC constraint can eliminate the false matches by mathematic model.Comparing with SIFT image matching algorithm, our multiconstrained image matching method can eliminate most of the false matches.Fig. 1 shows the matching result of SIFT and this algorithm.This robust image matching method is helpful for trajectory restoring by improving the accuracy of angle computing.

Azimuth computing from matching frames
After obtaining the result of image matching, we can restore the heading angle of camera motion by using SFM.The first step is to extract frames from recorded video, matching adjacent frames using proposed method.The matching result of adjacent frames was used to calculate the essential matrix E, which decomposed to give camera orientation and position.In order to calculate E, the fundamental matrix F need to estimate using the epipolar geometry of two cameras.The relation between F and the E as: E =    , where K is the intrinsic matrix of camera.The rotation matrix R and translation vector T can be obtained by singular value decomposition (SVD) of E. From rotation matrix, we can compute the heading angle of frames as: Fig. 2 The workflow of computing azimuth from video frames

Estimation of indoor trajectory
After obtaining the heading angle of motion, the coordinate of each frame can be estimated by PDR method.
Where (  ,   ) is the coordinate of k-th frame,   is the azimuth angle from SFM method, D is the distance value from experience.
In order to improve the accuracy of calibrated fingerprints, we use the particle filter to estimate the position of every fingerprints.Particle filter (Merwe, 2000) is based on Bayesian framework which infer the development of the probability density function of a dynamic system's true state from observations over time.
Comparing with Kalman filter, Particle filter can be employed for any state model, especially for non-linear estimation problem with non-Gaussian noise.Therefore, the Particle filter is used to calibrate the location of fingerprints, which can be used to construct radio map associated with Wi-Fi RSS.The state equation and measurement equation can be described as follows: Where, (   ,   ) is the current position or state,   is the integrated angle from gyroscope, ∆ is the random noise of angle, D is the estimated length from accelerometer.  is the measurement value, (  , ,   , ) is the coordinate of this method, [   ,    ] is the noise of measurement.The algorithm details as below: (1) Initialize particles: Defining the initial coordinate of pedestrian ( 0 ,  0 ), Sampling N particles and set the weights of particles as

Heading angle detection
The first experiment is to evaluate the accuracy of image matching algorithm for angle detection.We use the Edmund Optics' rotary stage to fix the smartphone, and take the still image in accordance with the equal angular intervals.We test the 5 °, 10 °, 15 °, 20 ° of equal angular intervals respectively, in two corridors of an office building.Though computing the difference between real heading angle and the algorithm angle, we obtained four error curves as shown in Fig. 3.We can find that the max error of heading change detected is lower than 2.5 °, the mean error is lower than 0.2 °, most error of detected angle is distribute on [ −0.5 °, 0.5 °].It demonstrate that this image based angle detection method can achieve angle computing with high accuracy, which is useful for trajectory restoring.
Fig. 3 The results of motion angle error

Construction of Wi-Fi radio map
In the second experiment, we implement this approach at two study area: two floors of an office building, the floor plan and route information as shown in

CONCLUSION
In this paper, we provide an approach for automatic construction of radio map based on the combination of PDR and image matching methods.The experiment results demonstrate the this approach can be used to construct Wi-Fi radio map with limited workload.

1 𝑁.
Every particle represents a possible current location of pedestrian.(2) Update particles: According to the state equation, calculate the next position of every particle.Update the weights of every particles by using measurement equation, calculate the difference between   and   , put it into Gaussian function as:    = (  |  ,   )  is the weights of i-th particle, [  ,   ] is the standard deviation of coordinate noise.Normalize particle weights as:  ̃  = Resampling particles: For each particle, accumulate all the normalized weights before, and get the accumulate weights sequence.Generate a new random number in the interval [0,1], and compare this random number with every accumulate weights of sequence.If the random number is larger than k-th accumulate weights of sequence, using the k-th particle as a new particle.According to this method, generating N new particles, and set the weights of new particles as   ) is the coordinate of i-th new particle,  ̃  = 1  , (  ̃,   ̃) is the coordinate estimation of time k.Defining k=k+1 and go back to step (1).

Fig. 5 .
Fig.5.The restored trajectories.With the Wi-Fi signals scanned at each sampling points, the Wi-Fi radio map can be constructed.The spatial distribution of Wi-Fi RSS of two sample APs are shown in Fig.6.
If a keypoint   of image is the matching point   of reference image and   is the matching point of   , saved a pair of keypoints as candidate matching points.
We define that if the nearest  1 and the second nearest  2 satisfy <  ( where r is threshold usually set 0.6), the keypoints   can be saved as the candidate matching points.This ratio constraint can eliminate the false matches with adjacent distance.2.Symmetry constraint.One keypoint may be calculated as the matching point of many keypoints, in matching process.Symmetry constraint is aim to eliminate this false matches.For an image and a reference image, firstly traverse all feature points of image to compute the candidate matching points of reference image, then compute the matching points of candidate points of reference image.