-
Notifications
You must be signed in to change notification settings - Fork 767
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
Handling edges with pure rotation in translation averaging #619
Conversation
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.
some small comments. Document your changes, esp indicating where you do something special for zero translation case, and I'll do a second review.
tests/testTranslationRecovery.cpp
Outdated
EXPECT(assert_equal(expected, result.at<Point3>(2), 1e-4)); | ||
|
||
// TODO(frank): how to get stats back? | ||
// EXPECT_DOUBLES_EQUAL(0.0199833, actualError, 1e-5); | ||
} | ||
|
||
TEST(TranslationRecovery, TwoPointTest) { |
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.
TwoPoseTest ?
tests/testTranslationRecovery.cpp
Outdated
EXPECT(assert_equal(Point3(2, 0, 0), result.at<Point3>(1))); | ||
} | ||
|
||
TEST(TranslationRecovery, ThreePointTest) { |
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.
same
tests/testTranslationRecovery.cpp
Outdated
EXPECT_LONGS_EQUAL(1, graph.size()); | ||
|
||
// Run translation recovery | ||
const auto result = algorithm.run(/*scale=*/2.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.
maybe use a different scale from the true scale to check that functionality?
tests/testTranslationRecovery.cpp
Outdated
const auto graph = algorithm.buildGraph(); | ||
EXPECT_LONGS_EQUAL(3, graph.size()); | ||
|
||
const auto result = algorithm.run(/*scale=*/2.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.
same
tests/testTranslationRecovery.cpp
Outdated
EXPECT(assert_equal(Point3(1, -1, 0), result.at<Point3>(3))); | ||
} | ||
|
||
TEST(TranslationRecovery, TwoPointsAndZeroTranslation) { |
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.
ThreePosesIncludingZeroTranslation
tests/testTranslationRecovery.cpp
Outdated
EXPECT(assert_equal(Point3(2, 0, 0), result.at<Point3>(2))); | ||
} | ||
|
||
TEST(TranslationRecovery, ThreePointsAndZeroTranslation) { |
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.
FourPosesIncluding...
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.
This is really great! Just a few more nits :-)
@@ -16,14 +16,16 @@ | |||
* @brief Recovering translations in an epipolar graph when rotations are given. | |||
*/ | |||
|
|||
#include <map> |
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.
Include only what you really need in the header, include others in .cpp only
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.
std::map is used in line 59 below, for sameTranslationNodes_
.
@@ -54,21 +56,22 @@ class TranslationRecovery { | |||
private: | |||
TranslationEdges relativeTranslations_; | |||
LevenbergMarquardtParams params_; | |||
std::map<Key, std::set<Key>> sameTranslationNodes_; |
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.
document all of these with at least a ///< one-liner after declaration
Thank you Frank, I've added some documentation for the member variables. |
OK, feel free to merge and delete branch after checks have passed :-) |
Changing the translation averaging implementation to handle edges in the input graph that are a pure rotation. These edges have a "zero" Unit3 translation direction.
Major changes in the PR: