diff --git a/examples/ViewGraphExample.cpp b/examples/ViewGraphExample.cpp index 7b5ed0fc6..d1c7113bc 100644 --- a/examples/ViewGraphExample.cpp +++ b/examples/ViewGraphExample.cpp @@ -47,8 +47,8 @@ int main(int argc, char* argv[]) { vector poses = posesOnCircle(4, 30); // Calculate ground truth fundamental matrices, 1 and 2 poses apart - auto F1 = GeneralFundamentalMatrix(K, poses[0].between(poses[1]), K); - auto F2 = GeneralFundamentalMatrix(K, poses[0].between(poses[2]), K); + auto F1 = FundamentalMatrix(K, poses[0].between(poses[1]), K); + auto F2 = FundamentalMatrix(K, poses[0].between(poses[2]), K); // Simulate measurements from each camera pose std::array, 4> p; @@ -67,7 +67,7 @@ int main(int argc, char* argv[]) { // in a triplet, we add three binary factors for sparsity during optimization. // In this version, we only include triplets between 3 successive cameras. NonlinearFactorGraph graph; - using Factor = TransferFactor; + using Factor = TransferFactor; for (size_t a = 0; a < 4; ++a) { size_t b = (a + 1) % 4; // Next camera size_t c = (a + 2) % 4; // Camera after next diff --git a/gtsam/geometry/FundamentalMatrix.h b/gtsam/geometry/FundamentalMatrix.h index f8aa37bf8..8a3ba86b8 100644 --- a/gtsam/geometry/FundamentalMatrix.h +++ b/gtsam/geometry/FundamentalMatrix.h @@ -57,7 +57,7 @@ class GTSAM_EXPORT FundamentalMatrix { /** * @brief Construct from calibration matrices Ka, Kb, and pose aPb * - * Initializes the GeneralFundamentalMatrix from the given calibration + * Initializes the FundamentalMatrix from the given calibration * matrices Ka and Kb, and the pose aPb. * * @tparam CAL Calibration type, expected to have a matrix() method @@ -66,8 +66,8 @@ class GTSAM_EXPORT FundamentalMatrix { * @param Kb Calibration matrix for the right camera */ template - GeneralFundamentalMatrix(const CAL& Ka, const Pose3& aPb, const CAL& Kb) - : GeneralFundamentalMatrix(Ka.K().transpose().inverse() * + FundamentalMatrix(const CAL& Ka, const Pose3& aPb, const CAL& Kb) + : FundamentalMatrix(Ka.K().transpose().inverse() * EssentialMatrix::FromPose3(aPb).matrix() * Kb.K().inverse()) {}