Skip to content

Commit

Permalink
Stereo triangulation: Bug fix: Check for NaN values.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-alexandrov committed Oct 1, 2012
1 parent 08392b9 commit bf7397b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vw/Stereo/StereoModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bf7397b

Please sign in to comment.