Skip to content

Commit

Permalink
Remove warnings and spelling, minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-alexandrov committed Oct 5, 2012
1 parent 9973c02 commit 16bc735
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
34 changes: 17 additions & 17 deletions src/asp/Sessions/DG/StereoSessionDG.cc
Expand Up @@ -344,10 +344,10 @@ namespace asp {
// Load the unmodified images // Load the unmodified images
boost::shared_ptr<DiskImageResource> boost::shared_ptr<DiskImageResource>
left_rsrc( DiskImageResource::open(m_left_image_file) ), left_rsrc( DiskImageResource::open(m_left_image_file) ),
righ_rsrc( DiskImageResource::open(m_right_image_file) ); right_rsrc( DiskImageResource::open(m_right_image_file) );
DiskImageView<PixelGray<float> > DiskImageView<PixelGray<float> >
left_disk_image( left_rsrc ), left_disk_image( left_rsrc ),
righ_disk_image( righ_rsrc ); right_disk_image( right_rsrc );


// Normalized Images' filenames // Normalized Images' filenames
output_file1 = m_out_prefix + "-L.tif"; output_file1 = m_out_prefix + "-L.tif";
Expand All @@ -373,7 +373,7 @@ namespace asp {
// They don't exist or are corrupted. // They don't exist or are corrupted.
if (rebuild) { if (rebuild) {
Vector4f left_stats = gather_stats( left_disk_image, "left" ), Vector4f left_stats = gather_stats( left_disk_image, "left" ),
right_stats = gather_stats( righ_disk_image, "right" ); right_stats = gather_stats( right_disk_image, "right" );


ImageViewRef<PixelGray<float> > Limg, Rimg; ImageViewRef<PixelGray<float> > Limg, Rimg;
std::string lcase_file = boost::to_lower_copy(m_left_camera_file); std::string lcase_file = boost::to_lower_copy(m_left_camera_file);
Expand All @@ -394,43 +394,43 @@ namespace asp {
// projected the images to the same scale. If they // projected the images to the same scale. If they
// haven't, below would be the ideal but lossy method. // haven't, below would be the ideal but lossy method.
// inlier = // inlier =
// homography_ip_matching( left_disk_image, righ_disk_image, // homography_ip_matching( left_disk_image, right_disk_image,
// match_filename ); // match_filename );
boost::scoped_ptr<RPCModel> boost::scoped_ptr<RPCModel>
left_rpc( read_rpc_model( m_left_image_file, m_left_camera_file ) ), left_rpc( read_rpc_model( m_left_image_file, m_left_camera_file ) ),
righ_rpc( read_rpc_model( m_right_image_file, m_right_camera_file ) ); right_rpc( read_rpc_model( m_right_image_file, m_right_camera_file ) );
cartography::GeoReference left_georef, righ_georef, dem_georef; cartography::GeoReference left_georef, right_georef, dem_georef;
read_georeference( left_georef, m_left_image_file ); read_georeference( left_georef, m_left_image_file );
read_georeference( righ_georef, m_right_image_file ); read_georeference( right_georef, m_right_image_file );
read_georeference( dem_georef, m_extra_argument1 ); read_georeference( dem_georef, m_extra_argument1 );
boost::shared_ptr<DiskImageResource> boost::shared_ptr<DiskImageResource>
dem_rsrc( DiskImageResource::open( m_extra_argument1 ) ); dem_rsrc( DiskImageResource::open( m_extra_argument1 ) );
TransformRef TransformRef
left_tx( RPCMapTransform( *left_rpc, left_georef, left_tx( RPCMapTransform( *left_rpc, left_georef,
dem_georef, dem_rsrc ) ), dem_georef, dem_rsrc ) ),
righ_tx( RPCMapTransform( *righ_rpc, righ_georef, right_tx( RPCMapTransform( *right_rpc, right_georef,
dem_georef, dem_rsrc ) ); dem_georef, dem_rsrc ) );
inlier = inlier =
ip_matching( cam1.get(), cam2.get(), ip_matching( cam1.get(), cam2.get(),
left_disk_image, righ_disk_image, left_disk_image, right_disk_image,
cartography::Datum("WGS84"), match_filename, cartography::Datum("WGS84"), match_filename,
left_rsrc->has_nodata_read() ? left_rsrc->has_nodata_read() ?
left_rsrc->nodata_read() : left_rsrc->nodata_read() :
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
righ_rsrc->has_nodata_read() ? right_rsrc->has_nodata_read() ?
righ_rsrc->nodata_read() : right_rsrc->nodata_read() :
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
left_tx, righ_tx, false ); left_tx, right_tx, false );
} else { } else {
inlier = inlier =
ip_matching_w_alignment( cam1.get(), cam2.get(), ip_matching_w_alignment( cam1.get(), cam2.get(),
left_disk_image, righ_disk_image, left_disk_image, right_disk_image,
cartography::Datum("WGS84"), match_filename, cartography::Datum("WGS84"), match_filename,
left_rsrc->has_nodata_read() ? left_rsrc->has_nodata_read() ?
left_rsrc->nodata_read() : left_rsrc->nodata_read() :
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
righ_rsrc->has_nodata_read() ? right_rsrc->has_nodata_read() ?
righ_rsrc->nodata_read() : right_rsrc->nodata_read() :
std::numeric_limits<double>::quiet_NaN() ); std::numeric_limits<double>::quiet_NaN() );
} }


Expand All @@ -451,15 +451,15 @@ namespace asp {


// Applying alignment transform // Applying alignment transform
Limg = left_disk_image; Limg = left_disk_image;
Rimg = transform(righ_disk_image, Rimg = transform(right_disk_image,
HomographyTransform(align_matrix), HomographyTransform(align_matrix),
left_disk_image.cols(), left_disk_image.rows()); left_disk_image.cols(), left_disk_image.rows());
} else if ( stereo_settings().alignment_method == "epipolar" ) { } else if ( stereo_settings().alignment_method == "epipolar" ) {
vw_throw( NoImplErr() << "StereoSessionDG doesn't support epipolar rectification" ); vw_throw( NoImplErr() << "StereoSessionDG doesn't support epipolar rectification" );
} else { } else {
// Do nothing just provide the original files. // Do nothing just provide the original files.
Limg = left_disk_image; Limg = left_disk_image;
Rimg = righ_disk_image; Rimg = right_disk_image;
} }


// Apply our normalization options // Apply our normalization options
Expand Down
3 changes: 1 addition & 2 deletions src/asp/Tools/bundlevis.cc
Expand Up @@ -155,7 +155,6 @@ std::vector<CameraIter*> loadCameraData( std::string camFile,
int32 numLines = 0, numCameras = 0, numTimeIter = 0, numCameraParam = 1; int32 numLines = 0, numCameras = 0, numTimeIter = 0, numCameraParam = 1;
int32 last_camera = -1, buffer; int32 last_camera = -1, buffer;
while (file.good()){ while (file.good()){
int32 read_cam_idx;
file >> buffer; file >> buffer;
if (file.eof()) if (file.eof())
break; break;
Expand Down Expand Up @@ -313,7 +312,7 @@ std::vector<ConnLineIter*> loadControlNet( std::string cnetFile,
// For every measure // For every measure
for ( unsigned m = 0; m < (*cnet)[p].size(); ++m ){ for ( unsigned m = 0; m < (*cnet)[p].size(); ++m ){
// Is this a valid camera ? // Is this a valid camera ?
if ( (*cnet)[p][m].image_id() < (signed)cameras.size() ) { if ( (*cnet)[p][m].image_id() < cameras.size() ) {
// Now popping on a new connection // Now popping on a new connection
connLineData.push_back( new ConnLineIter( points[p], connLineData.push_back( new ConnLineIter( points[p],
cameras[(*cnet)[p][m].image_id()], cameras[(*cnet)[p][m].image_id()],
Expand Down
2 changes: 1 addition & 1 deletion src/asp/Tools/stereo_tri.cc
Expand Up @@ -26,7 +26,7 @@
#include <vw/Cartography.h> #include <vw/Cartography.h>
#include <vw/Camera/CameraModel.h> #include <vw/Camera/CameraModel.h>
#include <vw/Stereo/StereoView.h> #include <vw/Stereo/StereoView.h>
#include <time.h> #include <ctime>


using namespace vw; using namespace vw;
using namespace asp; using namespace asp;
Expand Down

0 comments on commit 16bc735

Please sign in to comment.