Skip to content

[WIP] add findEssentialMat for two different cameras#17551

Closed
tompollok wants to merge 6 commits intoopencv:masterfrom
tompollok:master
Closed

[WIP] add findEssentialMat for two different cameras#17551
tompollok wants to merge 6 commits intoopencv:masterfrom
tompollok:master

Conversation

@tompollok
Copy link
Copy Markdown
Contributor

@tompollok tompollok commented Jun 14, 2020

Adds findEssentialMatrix for two cameras with different matrices. Uses the undistortion workaround discussed in #17329

related to #17329

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under OpenCV (BSD) License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake
force_builders=linux,docs

@tompollok
Copy link
Copy Markdown
Contributor Author

Should i rebase to 3.4?

Can i also add an recoverPose overload that only takes the points and matrices as input and returns R and t?

@alalek
Copy link
Copy Markdown
Member

alalek commented Jun 14, 2020

Thank you for contribution!

3.4 is not necessary here.

Please add tests for new functionality.

@tompollok tompollok changed the title add findEssentialMat for two different cameras [WIP] add findEssentialMat for two different cameras Jun 15, 2020
@vpisarev vpisarev self-assigned this Jun 17, 2020
@tompollok
Copy link
Copy Markdown
Contributor Author

There is an issue with the threshold parameter in this implementation. Due to the fact, that i undistort the points, they are in normalized coordinates. When passing them to the findEssentialMatrix function i have to scale the threshold parameter. But given the fact that it can be two different cameras with different intrinsics, i dont know whats a good way to scale it.

So what could be potentially done is to scale thresh by dividing by fx of one of the cameras? Doesnt sound perfect to me. Any other ideas?

@tompollok
Copy link
Copy Markdown
Contributor Author

If using magsac instead of opencv RANSAC, then the thresh could be ommited completely if i understand correctly.
https://github.com/danini/magsac

Is there any information which RANSAC will be implemented by the GSOC? It seems like opencv RANSAC is really needing some work towards state of the art.

https://local-features-tutorial.github.io/pdfs/Local_features_from_paper_to_practice.pdf
p14
grafik

@alalek
Copy link
Copy Markdown
Member

alalek commented Jun 18, 2020

@tompollok BTW, There is RANSAC sub-topic in OE-20 (#11015) - good place for your findings.

@vpisarev
Copy link
Copy Markdown
Contributor

@tompollok, thank you for the contribution. I could not figure out how to edit your PR in-place, because adding a test required changing another file, not from the list. So I created new PR with your commits preserved: #17816

@vpisarev vpisarev closed this Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: calib3d feature pr: needs test New functionality requires minimal tests set

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants