Skip to content

Commit

Permalink
Correct the normalization in disparity debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zack Moratto committed Aug 16, 2011
1 parent 6a37ca2 commit aaf1935
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/asp/Tools/disparitydebug.cc
Expand Up @@ -79,8 +79,16 @@ void do_disparity_visualization(Options& opt) {
<< disp_range.min().y() << " " << disp_range.max().y() << "]\n"; << disp_range.min().y() << " " << disp_range.max().y() << "]\n";


typedef typename PixelChannelType<PixelT>::type ChannelT; 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> horizontal =
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)); 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"; vw_out() << "\t--> Saving disparity debug images\n";
block_write_gdal_image( opt.output_prefix+"-H."+opt.output_file_type, block_write_gdal_image( opt.output_prefix+"-H."+opt.output_file_type,
Expand Down

0 comments on commit aaf1935

Please sign in to comment.