Permalink
Browse files

Correct the normalization in disparity debug

  • Loading branch information...
1 parent 6a37ca2 commit aaf1935dbf608c5f6cdeaa88191e0920c3205681 Zack Moratto committed Aug 16, 2011
Showing with 10 additions and 2 deletions.
  1. +10 −2 src/asp/Tools/disparitydebug.cc
@@ -79,8 +79,16 @@ void do_disparity_visualization(Options& opt) {
<< disp_range.min().y() << " " << disp_range.max().y() << "]\n";
typedef typename PixelChannelType<PixelT>::type ChannelT;
- ImageViewRef<ChannelT> horizontal = apply_mask(copy_mask(clamp(normalize(select_channel(disk_disparity_map,0), disp_range.min().x(), disp_range.max().x())),disk_disparity_map));
- ImageViewRef<ChannelT> vertical = apply_mask(copy_mask(clamp(normalize(select_channel(disk_disparity_map,1), disp_range.min().y(), disp_range.max().y())),disk_disparity_map));
+ ImageViewRef<ChannelT> horizontal =
+ apply_mask(copy_mask(clamp(normalize(select_channel(disk_disparity_map,0),
+ disp_range.min().x(), disp_range.max().x(),
+ ChannelRange<ChannelT>::min(),ChannelRange<ChannelT>::max())),
+ disk_disparity_map));
+ ImageViewRef<ChannelT> vertical =
+ apply_mask(copy_mask(clamp(normalize(select_channel(disk_disparity_map,1),
+ disp_range.min().y(), disp_range.max().y(),
+ ChannelRange<ChannelT>::min(),ChannelRange<ChannelT>::max())),
+ disk_disparity_map));
vw_out() << "\t--> Saving disparity debug images\n";
block_write_gdal_image( opt.output_prefix+"-H."+opt.output_file_type,

0 comments on commit aaf1935

Please sign in to comment.