1 // This is core/vpgl/algo/vpgl_affine_rectification.h 2 #ifndef vpgl_affine_rectification_h_ 3 #define vpgl_affine_rectification_h_ 4 //: 5 // \file 6 // \brief Methods for computing an affine fundamental matrix, FA using a pair of affine cameras and using FA to find homographies for rectification 7 // \author Ozge C. Ozcanli 8 // \date Nov 27, 2013 9 10 #include <vpgl/vpgl_affine_camera.h> 11 #include <vpgl/vpgl_affine_fundamental_matrix.h> 12 #include <vpgl/vpgl_proj_camera.h> 13 14 class vpgl_affine_rectification 15 { 16 public: 17 18 static vpgl_affine_camera<double>* compute_affine_cam(const std::vector< vgl_point_2d<double> >& image_pts, 19 const std::vector< vgl_point_3d<double> >& world_pts); 20 21 //:extract the fundamental matrix from a pair of affine cameras 22 // DEPRECATED - see constructor for vpgl_affine_fundamental_matrix 23 static bool compute_affine_f(const vpgl_affine_camera<double>* cam1, 24 const vpgl_affine_camera<double>* cam2, 25 vpgl_affine_fundamental_matrix<double>& FA); 26 27 //: compute the rectification homographies using the affine fundamental matrix 28 // an image correspondence needs to be passed to find homographies 29 // (if cameras are known, one can use a known point in 3d in the scene, project it using the cameras and pass the output image points to this routine) 30 // DEPRECATED - see vpgl/algo/vpgl_equi_rectification 31 static bool compute_rectification(const vpgl_affine_fundamental_matrix<double>& FA, 32 const std::vector<vnl_vector_fixed<double, 3> >& img_p1, 33 const std::vector<vnl_vector_fixed<double, 3> >& img_p2, 34 vnl_matrix_fixed<double, 3, 3>& H1, 35 vnl_matrix_fixed<double, 3, 3>& H2); 36 37 vpgl_affine_rectification() = delete; 38 ~vpgl_affine_rectification() = delete; 39 }; 40 41 #endif // vpgl_affine_rectification_h_ 42