What is Relocalization? Why it is needed?
In Visual SLAM, the robot/camera explores its environment while
estimates its location using the map and the last location as prior information (Tracking), and simultaneously
update the map (the database that records landmarks) of environment (Mapping).
Relocalization module can estimate the location without using any prior information other than the map (with the high cost of computation). This is useful when the previous location cannot be used as prior information, for example when tracking fails.
Steps in Relocalization
Acquire relocalization candidate keyframes (Used as a reference keyframe for relocalization)
Compute matching points for each candidate by using BoW tree matcher
Discard the candidate if the number of 2D-3D matches is less than the threshold
Setup an PnP solver with the current 2D-3D matches
Estimate the camera pose using EPnP (+ RANSAC)
Apply pose optimizer
Apply projection match to increase 2D-3D matches
Re-apply the pose optimizer
Apply projection match again if the number of the observations is less than the threshold
Apply projection match again, then set the 2D-3D matches
Discard if the number of the observations is less than the threshold and do the pose estimation again
If the number of observation is greater than threshold succeed in relocalization