00001 // This is brl/bseg/vpro/vpro_lucas_kanade_process.h 00002 #ifndef vpro_lucas_kanade_process_h_ 00003 #define vpro_lucas_kanade_process_h_ 00004 //-------------------------------------------------------------------------------- 00005 //: 00006 // \file 00007 // \brief computes the Lucas-Kanade motion vector. 00008 // \author J.L. Mundy 00009 // 00010 // \verbatim 00011 // Modifications 00012 // J.L. Mundy - February 19, 2003 - Initial version. 00013 // \endverbatim 00014 //----------------------------------------------------------------------------- 00015 00016 #include <vcl_vector.h> 00017 #include <vil1/vil1_memory_image_of.h> 00018 #include <vpro/vpro_video_process.h> 00019 00020 class vpro_lucas_kanade_process : public vpro_video_process 00021 { 00022 public: 00023 enum state_symbol {NO_IMAGE=0, FIRST_IMAGE, IN_PROCESS}; 00024 vpro_lucas_kanade_process(bool down_sample=false, int window_size=2, 00025 double thresh=20000); 00026 ~vpro_lucas_kanade_process(); 00027 virtual process_data_type get_output_type() const { return IMAGE; } 00028 //: compute lucas_kanade 00029 virtual bool execute(); 00030 virtual bool finish(); 00031 bool downsample_; 00032 int window_size_; 00033 double thresh_; 00034 private: 00035 //local methods 00036 void compute_lucas_kanade(vil1_memory_image_of<float>& image); 00037 void update_queue(vil1_image ix); 00038 //members 00039 state_symbol state_; 00040 bool first_frame_; 00041 vcl_vector<vil1_image> queue_; 00042 }; 00043 00044 #endif // vpro_lucas_kanade_process_h_
1.7.5.1