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
For H, I used the existing DLT implementation but modified it to use 4 points and check for degeneracy, rather than using 8 points and assuming degeneracy would never happen. (by degeneracy I mean that the rank of the DLT solution is not 8, meaning that we may have selected 4 collinear points, which is not enough information to find a homography).
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)
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.
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
For H, I used the existing DLT implementation but modified it to use 4 points and check for degeneracy, rather than using 8 points and assuming degeneracy would never happen. (by degeneracy I mean that the rank of the DLT solution is not 8, meaning that we may have selected 4 collinear points, which is not enough information to find a homography).
For E, initially I tried the iterative method from here: https://arxiv.org/abs/1007.1432 But it proved to be unreliable when working with the unit tests. I think this was my fault and not the fault of the concept, but since I could not get it working reliably, I opted to try the 5 point method proposed by Stewenius et al. (https://www.semanticscholar.org/paper/Recent-developments-on-direct-relative-orientation-Stew%C3%A9nius-Engels/514fa8d4981cc2b2aecfc02e0e3a8f4be717bcd7), which seems to be popular and that worked nicely with the unit tests. (-:
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)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.