Skip to content
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

Adds oriented contraint check to Homography RANSAC #1453

Merged
merged 8 commits into from
Nov 10, 2021
Merged

Conversation

ducha-aiki
Copy link
Member

@ducha-aiki ducha-aiki commented Nov 9, 2021

Changes

Removes bad samples prior to model estimation to speed-up RANSAC.
References:
http://www.dia.fi.upm.es/~pcr/publications/jrtip2015.pdf - paper, formula (5)
OpenCV implementation: https://github.com/opencv/opencv/blob/4.x/modules/calib3d/src/usac/degeneracy.cpp#L88

Type of change

  • 📚 Documentation Update
  • 🧪 Tests Cases
  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🔬 New feature (non-breaking change which adds functionality)
  • 🚨 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Did you update CHANGELOG in case of a major change?

Copy link
Member

@edgarriba edgarriba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just docs things

kornia/geometry/homography.py Outdated Show resolved Hide resolved
kornia/geometry/homography.py Show resolved Hide resolved
kornia/geometry/homography.py Show resolved Hide resolved
kornia/geometry/homography.py Outdated Show resolved Hide resolved
kornia/geometry/homography.py Outdated Show resolved Hide resolved
Co-authored-by: Edgar Riba <edgar.riba@gmail.com>
@ducha-aiki
Copy link
Member Author

Some timings (here is colab https://colab.research.google.com/drive/11vyYaL1yEnofFXjZNR5d40VtYVkZq3ZF?usp=sharing)

GPU Colab

Original kornia RANSAC: 629 ms

CPU Colab:

Original kornia RANSAC: 2.14 s

@ducha-aiki ducha-aiki merged commit 4032407 into master Nov 10, 2021
@ducha-aiki ducha-aiki deleted the ransac-checks branch November 10, 2021 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants