Difficulties in obtaining good results with the ORB-SLAM2 algorithm in MATLAB.
Show older comments
Hello,
I am interested in running the ORB-SLAM2 algorithm that is presented in this example:
but with a different set of images and camera parameters as input. I already managed to set up the simulation and get it to work, but the optimized trajectory seems way off compared with the one coming from the GPS data. I ran multiple tests in different scenarios, and the most relevant ones are given below:
- Example from the link above, runs as expected;
- In the US City Block virtual environment with Unreal Engine, I captured the video frames from this other example: https://it.mathworks.com/help/vision/ug/stereo-visual-slam-for-uav-navigation-in-3d-simulation.html, and used them as input. After setting up the parameters as in this second example, the results obtained are good;
- KITTI dataset. The script works but the results are not satisfying;
- In the US City Block virtual environment with Unreal Engine, a trajectory drawn by me using Select Waypoints for Unreal Engine Simulation (https://it.mathworks.com/help/driving/ug/select-waypoints-for-3d-simulation.html). Here I managed to obtain good results even after changing the camera intrinsics so that they were the same as those used for KITTI;
- Another outdoor, urban virtual environment downloaded from the Unreal Engine Marketplace, same camera parameters as the previous case, but no good results.
Some useful information about the tests:
- I created a new bag of features for each environment, as described in the example;
- The initial pose has been updated with the correct values;
- Camera intrinsics, baseline and all the parameters inherent in the stereo configuration should have been correctly updated;
- The loop closure is obtained;
- Some parameters of the script has been modified to make it work with the new set of images and cameras: numSkipFrames has been reduced since the KITTI dataset is acquired at only 10Hz and numPoints has been increased since the resolution is higher than the one in the example's images;
- The length of the paths is similiar in all cases, and it's about 700 -800 meters.
I can't figure out what I'm doing wrong and why in a couple of cases it works well while in the others there is no way to get a good trajectory.
The image below shows what I obtain from a KITTI sequence.

I have made many runs, and it would seem that for even very small changes in some parameters the results can vary significantly. For example, numSkipFrames = 3 might work well, but = 2 or = 4 has detrimental consequences. Is this supposed to happen? In any case, the results that I have obtained are no better than what is shown here (from the Map Points it is also clear that the optimized trajectory is tilted out of the XY plane).
I am fairly new to the world of SLAM, and I hope I have stated my problem correctly. I would be extremely grateful to anyone who can give me some tips to get good results even with KITTI or other image sets. I am, of course, available to provide any additional information that might be helpful.
Thank you
Accepted Answer
More Answers (0)
Categories
Find more on Computer Vision Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!