added possibility to disable Cheirality in triangulation.h using cmake flag

release/4.3a0
Luca Carlone 2013-10-29 23:38:31 +00:00
parent d1ff62d640
commit 73b82a00eb
1 changed files with 5 additions and 2 deletions

View File

@ -184,8 +184,11 @@ Point3 triangulatePoint3(const std::vector<Pose3>& poses,
// 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);
if(p_local.z() <= 0)
throw(TriangulationCheiralityException());
#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION
if(p_local.z() <= 0)
throw(TriangulationCheiralityException());
#endif
}
return triangulated_point;