Go to the documentation of this file.00001
00002 #ifndef vpgl_rational_adjust_h_
00003 #define vpgl_rational_adjust_h_
00004
00005
00006
00007
00008
00009
00010 #include <vcl_vector.h>
00011 #include <vnl/vnl_vector.h>
00012 #include <vnl/vnl_least_squares_function.h>
00013 #include <vpgl/vpgl_rational_camera.h>
00014 #include <vgl/vgl_point_2d.h>
00015 #include <vgl/vgl_point_3d.h>
00016
00017
00018
00019
00020
00021
00022
00023
00024 class vpgl_adjust_lsqr : public vnl_least_squares_function
00025 {
00026 public:
00027
00028
00029 vpgl_adjust_lsqr(vpgl_rational_camera<double> const& rcam,
00030 vcl_vector<vgl_point_2d<double> > const& img_pts,
00031 vcl_vector<vgl_point_3d<double> > const& geo_pts,
00032 unsigned num_unknowns, unsigned num_residuals);
00033
00034
00035 virtual ~vpgl_adjust_lsqr() {}
00036
00037
00038
00039
00040 virtual void f(vnl_vector<double> const& x, vnl_vector<double>& fx);
00041
00042 #if 0
00043
00044 virtual void trace(int iteration, vnl_vector<double> const& x, vnl_vector<double> const& fx);
00045 #endif
00046
00047 protected:
00048 unsigned num_corrs_;
00049 vpgl_rational_camera<double> rcam_;
00050 vcl_vector<vgl_point_2d<double> > img_pts_;
00051 vcl_vector<vgl_point_3d<double> > geo_pts_;
00052 };
00053
00054 class vpgl_rational_adjust
00055 {
00056 public:
00057 ~vpgl_rational_adjust(){}
00058
00059 static bool adjust(vpgl_rational_camera<double> const& initial_rcam,
00060 vcl_vector<vgl_point_2d<double> > img_pts,
00061 vcl_vector<vgl_point_3d<double> > geo_pts,
00062 vpgl_rational_camera<double> & adj_rcam);
00063 protected:
00064 vpgl_rational_adjust();
00065 };
00066
00067
00068 #endif // vpgl_rational_adjust_h_