00001 // This is brl/bseg/strk/strk_snippet_extractor_process.h 00002 #ifndef strk_snippet_extractor_process_h_ 00003 #define strk_snippet_extractor_process_h_ 00004 //---------------------------------------------------------------------------- 00005 //: 00006 // \file 00007 // \brief Extracts a set of snippets around the tracked vehicle 00008 // \author 00009 // J.L. Mundy 00010 // 00011 // \verbatim 00012 // Modifications: 00013 // J.L. Mundy December 5, 2004 Initial version. 00014 // \endverbatim 00015 //--------------------------------------------------------------------------- 00016 #include <vcl_string.h> 00017 #include <vtol/vtol_face_2d_sptr.h> 00018 #include <vil1/vil1_image.h> 00019 #include <brip/brip_roi_sptr.h> 00020 #include <vpro/vpro_video_process.h> 00021 00022 class strk_snippet_extractor_process : public vpro_video_process 00023 { 00024 public: 00025 strk_snippet_extractor_process(); 00026 ~strk_snippet_extractor_process(); 00027 virtual process_data_type get_output_type() { return IMAGE; } 00028 00029 //: track to next frame 00030 virtual bool execute(); 00031 //: output the snippets 00032 virtual bool finish(); 00033 //: track input filename 00034 bool set_input_file(vcl_string const& track_file_name); 00035 //: snippet directory 00036 void set_snippet_directory(vcl_string const& snip_dir); 00037 //: fractional margin for snippet roi around the tracked object 00038 void set_margin_fraction(const double margin_fraction){margin_frac_=margin_fraction;} 00039 private: 00040 //local functions 00041 bool extract_rois(vcl_vector<vtol_face_2d_sptr> const & tracked_faces); 00042 //members 00043 bool failure_; 00044 bool first_frame_; 00045 vcl_string track_file_; 00046 vcl_string snippet_directory_; 00047 double margin_frac_; 00048 vcl_vector<brip_roi_sptr> tracked_rois_; 00049 vcl_vector<vil1_image> tracked_snippets_; 00050 }; 00051 00052 00053 #endif // strk_snippet_extractor_process_h_
1.4.4