Negated meaning of reprojectionError
parent
36be55e92c
commit
5cdb8ddb76
|
|
@ -141,18 +141,18 @@ public:
|
||||||
return z;
|
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,
|
Vector reprojectionError(const Point3& point, const std::vector<Z>& measured,
|
||||||
boost::optional<FBlocks&> Fs = boost::none, //
|
boost::optional<FBlocks&> Fs = boost::none, //
|
||||||
boost::optional<Matrix&> E = boost::none) const {
|
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
|
// TODO: take Unit3 instead
|
||||||
Vector reprojectionErrorAtInfinity(const Point3& point,
|
Vector reprojectionErrorAtInfinity(const Point3& point,
|
||||||
const std::vector<Z>& measured) const {
|
const std::vector<Z>& measured) const {
|
||||||
return ErrorVector(projectAtInfinity(point), measured);
|
return ErrorVector(measured, projectAtInfinity(point));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ TEST(CameraSet, Pinhole) {
|
||||||
Vector4 expectedV;
|
Vector4 expectedV;
|
||||||
|
|
||||||
// reprojectionError
|
// reprojectionError
|
||||||
expectedV << -1, -2, -3, -4;
|
expectedV << 1, 2, 3, 4;
|
||||||
Vector actualV = set.reprojectionError(p, measured);
|
Vector actualV = set.reprojectionError(p, measured);
|
||||||
EXPECT(assert_equal(expectedV, actualV));
|
EXPECT(assert_equal(expectedV, actualV));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ TEST(PinholeSet, Pinhole) {
|
||||||
Vector4 expectedV;
|
Vector4 expectedV;
|
||||||
|
|
||||||
// reprojectionError
|
// reprojectionError
|
||||||
expectedV << -1, -2, -3, -4;
|
expectedV << 1, 2, 3, 4;
|
||||||
Vector actualV = set.reprojectionError(p, measured);
|
Vector actualV = set.reprojectionError(p, measured);
|
||||||
EXPECT(assert_equal(expectedV, actualV));
|
EXPECT(assert_equal(expectedV, actualV));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue