Skip to content
Browse files

Stereo triangulation: Bug fix: Check for NaN values.

  • Loading branch information...
1 parent 08392b9 commit bf7397bd83e77250f050eccad6e13aeba76581b2 @oleg-alexandrov oleg-alexandrov committed Oct 1, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/vw/Stereo/StereoModel.cc
View
4 src/vw/Stereo/StereoModel.cc
@@ -117,6 +117,10 @@ bool StereoModel::are_nearly_parallel(Vector3 const& vec1, Vector3 const& vec2)
Vector3 StereoModel::operator()(Vector2 const& pix1,
Vector2 const& pix2, double& error ) const {
+
+ // Check for NaN values
+ if (pix1 != pix1 || pix2 != pix2) return Vector3();
+
try {
// determine range by triangulation
Vector3 vec1 = m_camera1->pixel_to_vector(pix1);

0 comments on commit bf7397b

Please sign in to comment.
Something went wrong with that request. Please try again.