-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] minimal essential and homography solvers #558
Merged
ymd-stella
merged 24 commits into
stella-cv:main
from
jjd9:feature/minimal-essential-solver
Feb 11, 2024
Merged
[Feature] minimal essential and homography solvers #558
ymd-stella
merged 24 commits into
stella-cv:main
from
jjd9:feature/minimal-essential-solver
Feb 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ymd-stella
reviewed
Feb 10, 2024
ymd-stella
reviewed
Feb 11, 2024
ymd-stella
reviewed
Feb 11, 2024
Co-authored-by: ymd-stella <[email protected]>
Co-authored-by: ymd-stella <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
As discussed here: #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.