Skip to content

Commit

Permalink
stereo_corr: Fix rounding error in scale calculation
Browse files Browse the repository at this point in the history
This was destroying IP measurements that are performed on demand if
matching has occured earlier.
  • Loading branch information
Zack Moratto committed May 17, 2012
1 parent c191987 commit 48ec18a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/asp/Tools/stereo_corr.cc
Expand Up @@ -380,12 +380,13 @@ void stereo_correlation( Options& opt ) {
// rountine should only run for:
// Pinhole + Epipolar
// Pinhole + None
// DG + None
// Everything else should gather IP's all the time.
float sub_scale =
sum(elem_quot( file_image_size( opt.out_prefix+"-L_sub.tif" ),
file_image_size( opt.out_prefix+"-L.tif" ) ) ) +
sum(elem_quot( file_image_size( opt.out_prefix+"-R_sub.tif" ),
file_image_size( opt.out_prefix+"-R.tif" ) ) );
sum(elem_quot( Vector2f(file_image_size( opt.out_prefix+"-L_sub.tif" )),
Vector2f(file_image_size( opt.out_prefix+"-L.tif" ) ) )) +
sum(elem_quot( Vector2f(file_image_size( opt.out_prefix+"-R_sub.tif" )),
Vector2f(file_image_size( opt.out_prefix+"-R.tif" ) ) ));
sub_scale /= 4.0f;

stereo_settings().search_range =
Expand Down

0 comments on commit 48ec18a

Please sign in to comment.