00001 #ifndef vmal_kl_h_ 00002 #define vmal_kl_h_ 00003 //-------------------------------------------------------------------------------- 00004 //: 00005 // \file 00006 // \brief Interface to use Kanade-Lucas algorithm 00007 // \author 00008 // L. Guichard 00009 //-------------------------------------------------------------------------------- 00010 extern "C" { 00011 #include <vgel/kl/klt.h> 00012 } 00013 #include <vmal/vmal_kl_params.h> 00014 #include <vtol/vtol_vertex_2d_sptr.h> 00015 #include <vil1/vil1_image.h> 00016 #include <vcl_vector.h> 00017 #include <vmal/vmal_multi_view_data_vertex_sptr.h> 00018 00019 class vmal_kl 00020 { 00021 public: 00022 00023 //--------------------------------------------------------------------------- 00024 //: Default constructor. Parameters set to defaults 00025 //--------------------------------------------------------------------------- 00026 explicit vmal_kl(const vmal_kl_params & params); 00027 00028 //--------------------------------------------------------------------------- 00029 //: Destructor. 00030 //--------------------------------------------------------------------------- 00031 ~vmal_kl(); 00032 00033 void match_sequence(vcl_vector<vil1_image> &,vmal_multi_view_data_vertex_sptr); 00034 00035 #if 0 // vidl_vil1 no longer exists 00036 void match_sequence(vidl_vil1_movie_sptr,vmal_multi_view_data_vertex_sptr); 00037 #endif 00038 00039 vcl_vector<vtol_vertex_2d_sptr> * extract_points(vil1_image &); 00040 00041 private: 00042 vmal_kl_params params_; 00043 00044 KLT_PixelType* convert_to_gs_image(vil1_image &); 00045 00046 void set_tracking_context( KLT_TrackingContext tc); 00047 }; 00048 00049 #endif // vmal_kl_h_