00001 //this-sets-emacs-to-*-c++-*-mode 00002 #ifndef vvid_frame_trail_h_ 00003 #define vvid_frame_trail_h_ 00004 //-------------------------------------------------------------------------------- 00005 //: 00006 // \file 00007 // \brief Maintains a trail of topology or spatial objects in time-order 00008 // 00009 // The idea is to display video segmentation for a given number 00010 // of frames in a finite queue. The most recent frame result is 00011 // added and the oldest result is removed. Creates the impression 00012 // of a feature-time trail in the current frame display 00013 // 00014 // \author 00015 // J.L. Mundy 00016 // 00017 // \verbatim 00018 // Modifications: 00019 // J.L. Mundy March 15, 2003 Initial version. 00020 // \endverbatim 00021 //----------------------------------------------------------------------------- 00022 #include <vcl_vector.h> 00023 #include <vcl_deque.h> 00024 #include <vtol/vtol_topology_object_sptr.h> 00025 #include <vsol/vsol_spatial_object_2d_sptr.h> 00026 00027 class vvid_frame_trail 00028 { 00029 public: 00030 vvid_frame_trail(); 00031 ~vvid_frame_trail(); 00032 00033 void set_window(unsigned int window){window_ = window;} 00034 void clear(); 00035 //: add to queue 00036 void 00037 add_spatial_objects(vcl_vector<vsol_spatial_object_2d_sptr> const& sos); 00038 void 00039 add_topology_objects(vcl_vector<vtol_topology_object_sptr> const & tos); 00040 00041 //: get current display queue 00042 void get_topology_objects(vcl_vector<vtol_topology_object_sptr>& topo_objs); 00043 void get_spatial_objects(vcl_vector<vsol_spatial_object_2d_sptr>& spat_objs); 00044 00045 private: 00046 //members 00047 unsigned int window_;//number of frames to maintain 00048 vcl_deque< vcl_vector<vtol_topology_object_sptr> > topo_queue_; 00049 vcl_deque< vcl_vector<vsol_spatial_object_2d_sptr> > spat_obj_queue_; 00050 }; 00051 00052 #endif // vvid_frame_trail_h_
1.7.5.1