Negated meaning of reprojectionError

release/4.3a0
dellaert 2015-03-05 15:53:29 -08:00
parent 36be55e92c
commit 5cdb8ddb76
3 changed files with 6 additions and 6 deletions

View File

@ -141,18 +141,18 @@ public:
return z;
}
/// Calculate vector of re-projection errors
/// Calculate vector [z-project2(point)] of re-projection errors
Vector reprojectionError(const Point3& point, const std::vector<Z>& measured,
boost::optional<FBlocks&> Fs = boost::none, //
boost::optional<Matrix&> E = boost::none) const {
return ErrorVector(project2(point, Fs, E), measured);
return ErrorVector(measured, project2(point, Fs, E));
}
/// Calculate vector of re-projection errors, from point at infinity
/// Calculate vector [z-project2(point)] of re-projection errors, from point at infinity
// TODO: take Unit3 instead
Vector reprojectionErrorAtInfinity(const Point3& point,
const std::vector<Z>& measured) const {
return ErrorVector(projectAtInfinity(point), measured);
return ErrorVector(measured, projectAtInfinity(point));
}
/**

View File

@ -75,7 +75,7 @@ TEST(CameraSet, Pinhole) {
Vector4 expectedV;
// reprojectionError
expectedV << -1, -2, -3, -4;
expectedV << 1, 2, 3, 4;
Vector actualV = set.reprojectionError(p, measured);
EXPECT(assert_equal(expectedV, actualV));

View File

@ -115,7 +115,7 @@ TEST(PinholeSet, Pinhole) {
Vector4 expectedV;
// reprojectionError
expectedV << -1, -2, -3, -4;
expectedV << 1, 2, 3, 4;
Vector actualV = set.reprojectionError(p, measured);
EXPECT(assert_equal(expectedV, actualV));