00001 #include "vpro_vil_video_process.h" 00002 #include <vcl_iostream.h> 00003 vpro_vil_video_process::vpro_vil_video_process() 00004 { 00005 frame_index_ = 0; 00006 n_frames_ = 0; 00007 start_frame_ =0; 00008 end_frame_ = 0; 00009 graph_flag_ = false; 00010 } 00011 vil_image_resource_sptr vpro_vil_video_process::get_input_image(unsigned int i) 00012 { 00013 if (i > input_images_.size()) 00014 { 00015 vcl_cout << "In vpro_vil_video_process::get_input_image(..) - index " 00016 << i << " out of bounds\n"; 00017 return 0; 00018 } 00019 return input_images_[i]; 00020 } 00021 00022 void vpro_vil_video_process::clear_input() 00023 { 00024 input_images_.clear(); 00025 input_spat_objs_.clear(); 00026 input_topo_objs_.clear(); 00027 } 00028 00029 void vpro_vil_video_process::clear_output() 00030 { 00031 //output_images_.clear(); 00032 output_spat_objs_.clear(); 00033 output_topo_objs_.clear(); 00034 } 00035 00036 void vpro_vil_video_process::add_input_spatial_object(vsol_spatial_object_2d_sptr const& so) 00037 { 00038 input_spat_objs_.push_back(so); 00039 } 00040 00041 void vpro_vil_video_process::add_input_spatial_objects(vcl_vector<vsol_spatial_object_2d_sptr> const& spat_objs) 00042 { 00043 for (vcl_vector<vsol_spatial_object_2d_sptr>::const_iterator sit = spat_objs.begin(); sit != spat_objs.end(); sit++) 00044 input_spat_objs_.push_back(*sit); 00045 } 00046 00047 void vpro_vil_video_process::add_input_topology_object(vtol_topology_object_sptr const& to) 00048 { 00049 input_topo_objs_.push_back(to); 00050 } 00051 00052 void vpro_vil_video_process::add_input_topology(vcl_vector<vtol_topology_object_sptr> const& topo_objs) 00053 { 00054 for (vcl_vector<vtol_topology_object_sptr>::const_iterator toit = topo_objs.begin(); toit != topo_objs.end(); toit++) 00055 input_topo_objs_.push_back(*toit); 00056 }
1.7.5.1