From efeb7b4f8a4c232b79bcea425f0bc7b87e46714e Mon Sep 17 00:00:00 2001 From: Luca Carlone Date: Thu, 31 Oct 2013 01:32:48 +0000 Subject: [PATCH] fixed warning on cheirality exception --- gtsam_unstable/geometry/triangulation.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gtsam_unstable/geometry/triangulation.h b/gtsam_unstable/geometry/triangulation.h index 311ab9418..db3e5fc4d 100644 --- a/gtsam_unstable/geometry/triangulation.h +++ b/gtsam_unstable/geometry/triangulation.h @@ -181,15 +181,14 @@ Point3 triangulatePoint3(const std::vector& poses, Point3 triangulated_point = triangulateDLT(poses, projection_matrices, measurements, Ks, rank_tol, optimize); + #ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION // verify that the triangulated point lies infront of all cameras BOOST_FOREACH(const Pose3& pose, poses) { const Point3& p_local = pose.transform_to(triangulated_point); - - #ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION if(p_local.z() <= 0) throw(TriangulationCheiralityException()); - #endif } + #endif return triangulated_point; }