-
Notifications
You must be signed in to change notification settings - Fork 766
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
Two fundamental matrix classes #1884
Conversation
const Point2& ca = Point2(0.0, 0.0), | ||
const Point2& cb = Point2(0.0, 0.0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so these are not in pixel space, but with respect to image center?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ca and cb are the pixel centers. If you do not provide ca and cb, then your are promising to provide coordinates with respect to the pixel center, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to have ca and cb be required inputs so users don't unknowingly make this promise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, will do
} | ||
|
||
//************************************************************************* | ||
Matrix3 SimpleFundamentalMatrix::leftK() const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe this should be Ka()
(Kb()
) since that's how variables from the left (right) view are referred to everywhere else in the code? E.g., fa
, fb
, Fca
, etc. Don't feel super strongly about this though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. Also make them private
I'll incorporate remaining comments in follow-up PRs. Thanks! |
Overview
Two F matrix classes for GTSFM:
The idea is that the latter can be used to immediately optimize the [Sweeney15] objective and optimize for focal lengths at the same time.
Tests
Many unit tests, but key test is
Next PR
"Someone" should
write a TransferFactor and(TransferFactor implemented using numerical derivatives here) implement the derivatives for the transfer. The latter might not be super-trivial, as there is a cross product and normalization from homogeneous coordinates. It's possible that this is easier with expressions. Maybe the next PR should just try to create derivatives for calculating the epipolar lines, i.e., the 3*7 derivative ofleftK().transpose().inverse() * E_.matrix() * rightK().inverse() * p
This might not be as daunting as it seems, as E_.matrix() is just R*[t], and the calibrations are actually rather simple and are just functions of fa_ and fb_, respectively.
Reference
[Sweeney15] https://sites.cs.ucsb.edu/~holl/pubs/Sweeney-2015-ICCV.pdf