stella-cv / stella_vslam

This is a unofficial fork of OpenVSLAM (https://github.com/xdspacelab/openvslam)
https://stella-cv.rtfd.io/en/latest/
Other
871 stars 374 forks source link

[Feature] minimal essential and homography solvers #558

Closed jjd9 closed 4 months ago

jjd9 commented 4 months ago

Hello,

As discussed here: https://github.com/stella-cv/stella_vslam/discussions/555 I have implemented two minimal solver's and verified that they improve the performance when estimating homography (4 points) and essential matrix (5 points) with RANSAC.

W.r.t. the implemented methods

After making my changes, I ran the unit tests and they all passed. I also ran the aist_entrance_hall_1 equirectangular video and the aist_entrance_hall_2 fisheye video, and both qualitatively work identically to how they did before my changes.

Here is a plot of the results produced by the new unit test: compare_ransac_solvers_with_progressive_outlier_ratio(these results are averages over 50 runs) image

In terms of outlier rejection, the 5 pt E solver appears to outperform the 8 pt solver, but in terms of speed, the 8 pt method is roughly 3 times faster on my laptop. I believe the speed difference is because the 5 pt solver considers up to 10 possible E matrices for every sample. But both are on the order of milliseconds. If you need it to run faster to be viable, there is a way to improve the performance at the sacrifice of readability.

The new H solver with 4 points is roughly 2x as fast as the old 8 point approach. This is just because now it is doing half the work over the same number of iterations.

Thank you for your time.