Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Stereo: Chick if the triangulated point is in front of the second cam…

…era ass well
  • Loading branch information...
commit 9973c0219d1d3d30453e3b681536bf00b7a496c4 1 parent d349851
@oleg-alexandrov oleg-alexandrov authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/asp/Tools/stereo.cc
View
11 src/asp/Tools/stereo.cc
@@ -255,9 +255,14 @@ namespace asp {
double error;
Vector3 point = model( Vector2(), Vector2(), error );
if ( point != Vector3() // triangulation succeeded
- &&
- dot_prod( camera_model1->pixel_to_vector(Vector2()),
- point - camera_model1->camera_center(Vector2()) ) < 0 ){
+ && (
+ dot_prod( camera_model1->pixel_to_vector(Vector2()),
+ point - camera_model1->camera_center(Vector2()) ) < 0
+ ||
+ dot_prod( camera_model2->pixel_to_vector(Vector2()),
+ point - camera_model2->camera_center(Vector2()) ) < 0
+ )
+ ){
vw_out(WarningMessage,"console")
<< "Your cameras appear not to be pointing at the same location!\n"
<< "\tA test vector triangulated backwards through\n"
Please sign in to comment.
Something went wrong with that request. Please try again.