Permalink
Browse files

Bring ASP in line with the switch to BA Module

Also .. isis_adjust.h is no longer in the vw::camera namespace

and ... RMAX.h no longer has a using namespace in it.
  • Loading branch information...
1 parent 2287c27 commit 65ddedc1316a54b0851509b01527492795ba1231 Zack Moratto committed Mar 30, 2010
View
@@ -190,10 +190,11 @@ AX_GROUP_PKG(VW, [VW_FILEIO VW_IMAGE VW_MATH VW_CORE])
# Vision Workbench Secondaries
AX_PKG(VW_PLATE, [VW_FILEIO], [-lvwPlate], [vw/Plate/PlateFile.h])
AX_PKG(VW_CAMERA, [VW BOOST_IOSTREAMS], [-lvwCamera], [vw/Camera/CAHVModel.h])
-AX_PKG(VW_STEREO, [VW_CAMERA VW], [-lvwStereo], [vw/Stereo/OptimizedCorrelator.h])
-AX_PKG(VW_CARTOGRAPHY, [VW_CAMERA VW], [-lvwCartography], [vw/Cartography/GeoReference.h])
+AX_PKG(VW_STEREO, [VW_CAMERA], [-lvwStereo], [vw/Stereo/OptimizedCorrelator.h])
+AX_PKG(VW_CARTOGRAPHY, [VW_CAMERA], [-lvwCartography], [vw/Cartography/GeoReference.h])
AX_PKG(VW_INTEREST_POINT, [VW], [-lvwInterestPoint],[vw/InterestPoint/InterestData.h])
AX_PKG(VW_PHOTOMETRY, [VW], [-lvwPhotometry])
+AX_PKG(VW_BUNDLEADJUSTMENT, [VW_INTEREST_POINT VW_CARTOGRAPHY VW_STEREO], [-lvwBundleAdjustment], [vw/BundleAdjustment/AdjustBase.h])
AX_PKG_ONE_OF(GL,
APPLE_GL,
@@ -308,9 +309,9 @@ AX_APP(DISPARITYDEBUG, [src/asp/Tools], yes, [VW_STEREO])
AX_APP(POINT2MESH, [src/asp/Tools], yes, [OPENSCENEGRAPH VW])
AX_APP(POINT2DEM, [src/asp/Tools], yes, [CORE])
AX_APP(RMAX2CAHVOR, [src/asp/Tools], no, [SESSIONS])
-AX_APP(RMAXADJUST, [src/asp/Tools], no, [SESSIONS])
+AX_APP(RMAXADJUST, [src/asp/Tools], no, [VW_BUNDLEADJUSTMENT SESSIONS])
AX_APP(BUNDLEVIS, [src/asp/Tools], no, [OPENSCENEGRAPH VW_CAMERA])
-AX_APP(ISISADJUST, [src/asp/Tools], yes, [VW_CAMERA ISISIO CORE])
+AX_APP(ISISADJUST, [src/asp/Tools], yes, [VW_BUNDLEADJUSTMENT ISISIO CORE])
AX_APP(RESULTS, [src/asp/Tools], yes, [ISISIO])
AX_APP(RECONSTRUCT, [src/asp/Tools], no, [VW_PHOTOMETRY VW_CARTOGRAPHY VW])
AX_APP(ALIGNDEM, [src/asp/Tools], yes, [VW_CARTOGRAPHY VW_INTEREST_POINT])
@@ -10,13 +10,14 @@
#include <asp/Core/BundleAdjustUtils.h>
-#include <vw/Camera.h>
+#include <vw/Camera/CameraModel.h>
+#include <vw/BundleAdjustment/ControlNetwork.h>
#include <vw/Stereo/StereoModel.h>
using namespace vw;
using namespace vw::camera;
using namespace vw::stereo;
-using namespace vw::ip;
+using namespace vw::ba;
void read_adjustments(std::string const& filename,
Vector3& position_correction,
@@ -12,14 +12,14 @@
#define __BUNDLE_ADJUST_UTILS_H__
#include <vw/Camera/CameraModel.h>
-#include <vw/Camera/ControlNetwork.h>
+#include <vw/BundleAdjustment/ControlNetwork.h>
#include <vw/Math.h>
#include <vw/InterestPoint.h>
void read_adjustments(std::string const& filename, vw::Vector3& position_correction, vw::math::Quaternion<double>& pose_correction);
void write_adjustments(std::string const& filename, vw::Vector3 const& position_correction, vw::math::Quaternion<double> const& pose_correction);
void compute_stereo_residuals(std::vector<boost::shared_ptr<vw::camera::CameraModel> > const& camera_models,
- vw::camera::ControlNetwork const& cnet);
+ vw::ba::ControlNetwork const& cnet);
#endif // __BUNDLE_ADJUST_UTILS_H__
@@ -4,7 +4,7 @@ using namespace vw;
#include <boost/program_options.hpp>
namespace po = boost::program_options;
-#include <vw/Camera/ControlNetworkLoader.h>
+#include <vw/BundleAdjustment/ControlNetworkLoader.h>
#include <asp/MPI/BundleAdjustmentMPI.h>
// This sifts out from a vector of strings, a listing of GCPs. This
@@ -13,6 +13,9 @@
#define RMAX_GLOBAL_EASTING (582680)
#define RMAX_GLOBAL_NORTHING (4141480)
+using namespace vw;
+using namespace vw::camera;
+
void read_image_info( std::string const& filename, ImageInfo& info ) {
vw::vw_out(vw::DebugMessage) << "Reading image info from " << filename << std::endl;;
vw::DiskImageResourcePNG png( filename );
@@ -15,11 +15,9 @@
#include <string>
#include <vw/FileIO/DiskImageResourcePNG.h>
#include <vw/Camera/CAHVORModel.h>
-#include <vw/Camera/BundleAdjust.h>
+#include <vw/BundleAdjustment.h>
#include <vw/Core.h>
-using namespace vw;
-
struct ImageInfo {
std::string filename;
double easting, northing;
@@ -19,6 +19,7 @@ using namespace vw;
using namespace vw::math;
using namespace vw::camera;
using namespace vw::ip;
+using namespace vw::ba;
// Global variables
float g_spacecraft_position_sigma;
@@ -462,45 +463,45 @@ int main(int argc, char* argv[]) {
if ( bundle_adjustment_type == "ref" ) {
if ( robust_cost_function == "pseudohuber" ) {
- perform_bundleadjustment<BundleAdjustmentRef< ModelType, PseudoHuberError > >( PseudoHuberError(robust_outlier_threshold) );
+ perform_bundleadjustment<AdjustRef< ModelType, PseudoHuberError > >( PseudoHuberError(robust_outlier_threshold) );
} else if ( robust_cost_function == "huber" ) {
- perform_bundleadjustment<BundleAdjustmentRef< ModelType, HuberError > >( HuberError(robust_outlier_threshold) );
+ perform_bundleadjustment<AdjustRef< ModelType, HuberError > >( HuberError(robust_outlier_threshold) );
} else if ( robust_cost_function == "l1" ) {
- perform_bundleadjustment<BundleAdjustmentRef< ModelType, L1Error > >( L1Error() );
+ perform_bundleadjustment<AdjustRef< ModelType, L1Error > >( L1Error() );
} else if ( robust_cost_function == "l2" ) {
- perform_bundleadjustment<BundleAdjustmentRef< ModelType, L2Error > >( L2Error() );
+ perform_bundleadjustment<AdjustRef< ModelType, L2Error > >( L2Error() );
} else if ( robust_cost_function == "cauchy" ) {
- perform_bundleadjustment<BundleAdjustmentRef< ModelType, CauchyError > >( CauchyError(robust_outlier_threshold) );
+ perform_bundleadjustment<AdjustRef< ModelType, CauchyError > >( CauchyError(robust_outlier_threshold) );
}
} else if ( bundle_adjustment_type == "sparse" ) {
if ( robust_cost_function == "pseudohuber" ) {
- perform_bundleadjustment<BundleAdjustmentSparse< ModelType, PseudoHuberError > >( PseudoHuberError(robust_outlier_threshold) );
+ perform_bundleadjustment<AdjustSparse< ModelType, PseudoHuberError > >( PseudoHuberError(robust_outlier_threshold) );
} else if ( robust_cost_function == "huber" ) {
- perform_bundleadjustment<BundleAdjustmentSparse< ModelType, HuberError > >( HuberError(robust_outlier_threshold) );
+ perform_bundleadjustment<AdjustSparse< ModelType, HuberError > >( HuberError(robust_outlier_threshold) );
} else if ( robust_cost_function == "l1" ) {
- perform_bundleadjustment<BundleAdjustmentSparse< ModelType, L1Error > >( L1Error() );
+ perform_bundleadjustment<AdjustSparse< ModelType, L1Error > >( L1Error() );
} else if ( robust_cost_function == "l2" ) {
- perform_bundleadjustment<BundleAdjustmentSparse< ModelType, L2Error > >( L2Error() );
+ perform_bundleadjustment<AdjustSparse< ModelType, L2Error > >( L2Error() );
} else if ( robust_cost_function == "cauchy" ) {
- perform_bundleadjustment<BundleAdjustmentSparse< ModelType, CauchyError > >( CauchyError(robust_outlier_threshold) );
+ perform_bundleadjustment<AdjustSparse< ModelType, CauchyError > >( CauchyError(robust_outlier_threshold) );
}
} else if ( bundle_adjustment_type == "robustref" ) {
if ( robust_cost_function == "l2" ) {
- perform_bundleadjustment<BundleAdjustmentRobustRef< ModelType,L2Error> >( L2Error() );
+ perform_bundleadjustment<AdjustRobustRef< ModelType,L2Error> >( L2Error() );
} else {
vw_out() << "Robust Reference implementation doesn't allow the selection of different cost functions. Exiting!\n\n";
exit(1);
}
} else if ( bundle_adjustment_type == "robustsparse" ) {
if ( robust_cost_function == "l2" ) {
- perform_bundleadjustment<BundleAdjustmentRobustSparse< ModelType,L2Error> >( L2Error() );
+ perform_bundleadjustment<AdjustRobustSparse< ModelType,L2Error> >( L2Error() );
} else {
vw_out() << "Robust Sparse implementation doesn't allow the selection of different cost functions. Exiting!\n\n";
exit(1);
}
} else if ( bundle_adjustment_type == "robustsparsekgcp" ) {
if ( robust_cost_function == "l2" ) {
- perform_bundleadjustment<BundleAdjustmentRobustSparseKGCP< ModelType,L2Error> >( L2Error() );
+ perform_bundleadjustment<AdjustRobustSparseKGCP< ModelType,L2Error> >( L2Error() );
} else {
vw_out() << "Robust Sparse implementation doesn't allow the selection of different cost functions. Exiting!\n\n";
exit(1);
Oops, something went wrong.

0 comments on commit 65ddedc

Please sign in to comment.