# Relative scale problem

I am doing Monocular Visual Odometry, and I have problem with relative scale. Most of the time its value is between 0.8-1.1, but sometimes it goes crazy and it has value 3,4 and once it had value 25. This ruins me my translation vector t, and then my vehicle trajectory become shifted a lot. I extracted 3D points normally, I can't resolve why this is happening. I don't know if 3D points cloud making this problem, but I used triangulatePoints method for getting 3D points. For relative scale, I take median of all calculated distances between points of 3D cloud.

Does inliers and outliers have something to do with this problem? Should I get rid of all outliers first? I mean there are not too many outliers in keypoints set.

P.S. I tested this for 2 datasets. One had about 110 frames, and another had about 20 frames. One with 20 frames had no problems, this with 110 frames had problems. Relative scale had value 25 when I was computing it between frames 3 and 4. It is dataset from KITTI. You can find it on KITTI webpage: Raw data - 2011_09_28_drive_0001 (name of dataset).

I hope you will help me to understand why this is happening.

Note: KITTI dataset is stereo camera. So I used right camera as monocular.

Does inliers and outliers have something to do with this problem?

-> Yes, your odometry estimation error will be accumulated in the point cloud and it will eventually end up what you are experiencing now. Obviously, the error accumulates more over time. That explains why your longer dataset fails.

Should I get rid of all outliers first? I mean there are not too many outliers in keypoints set.

-> That's very tricky. It might improve if you do it well. But how would your algorithm know which one is the true outlier? Removing outliers is the most tricky part of mono slam. I recommend you to read ORB-SLAM paper. It has all the answer you want to know.

• So basicaly, triangulatePoints are working well, it is only problem in outliers? So I must find a good way to recognize outliers very precise, and then to remove them? And also, this ORB-SLAM paper, is this the exact name of paper, or it is name of topic?
– Cluv
Commented May 19, 2021 at 13:10
• Also one more question. I have frames, when car stops (it stops for about 40 frames). My trajectory degenerate when those frames are basically pretty same (because car is stopped).
– Cluv
Commented May 19, 2021 at 14:52