rename to reprojectionErrorAfterTriangulation
parent
694e6e903c
commit
d7b5156dcc
|
@ -571,17 +571,11 @@ public:
|
|||
}
|
||||
|
||||
/// Calculate vector of re-projection errors, before applying noise model
|
||||
/// Assumes triangulation was done and degeneracy handled
|
||||
Vector reprojectionError(const Cameras& cameras) const {
|
||||
return cameras.reprojectionError(point_,this->measured_);
|
||||
}
|
||||
|
||||
/// Calculate vector of re-projection errors, before applying noise model
|
||||
Vector reprojectionError(const Values& values) const {
|
||||
Vector reprojectionErrorAfterTriangulation(const Values& values) const {
|
||||
Cameras cameras;
|
||||
bool nonDegenerate = computeCamerasAndTriangulate(values, cameras);
|
||||
if (nonDegenerate)
|
||||
return reprojectionError(cameras);
|
||||
return Base::reprojectionError(cameras, point_);
|
||||
else
|
||||
return zero(cameras.size() * 2);
|
||||
}
|
||||
|
|
|
@ -136,7 +136,9 @@ TEST( SmartProjectionCameraFactor, noiseless ) {
|
|||
|
||||
double expectedError = 0.0;
|
||||
DOUBLES_EQUAL(expectedError, factor1->error(values), 1e-7);
|
||||
CHECK(assert_equal(zero(4), factor1->reprojectionError(values), 1e-7));
|
||||
CHECK(
|
||||
assert_equal(zero(4),
|
||||
factor1->reprojectionErrorAfterTriangulation(values), 1e-7));
|
||||
}
|
||||
|
||||
/* *************************************************************************/
|
||||
|
|
|
@ -625,11 +625,11 @@ public:
|
|||
}
|
||||
|
||||
/// Calculate vector of re-projection errors, before applying noise model
|
||||
Vector reprojectionError(const Values& values) const {
|
||||
Vector reprojectionErrorAfterTriangulation(const Values& values) const {
|
||||
Cameras cameras;
|
||||
bool nonDegenerate = computeCamerasAndTriangulate(values, cameras);
|
||||
if (nonDegenerate)
|
||||
return cameras.reprojectionError(point_);
|
||||
return Base::reprojectionError(cameras, point_);
|
||||
else
|
||||
return zero(cameras.size() * 3);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue