UWARG Computer Vision
importer.h
Go to the documentation of this file.
1 
16 #ifndef IMPORTER_H_INCLUDED
17 #define IMPORTER_H_INCLUDED
18 
19 #include <boost/asio.hpp>
20 #include <string>
21 #include <vector>
22 #include <queue>
23 #include "metadata_input.h"
24 #include "imgimport.h"
25 
26 class Source;
27 
34 class Importer {
35 public:
39  Importer();
40 
41  ~Importer();
42 
48  void add_source(ImageImport *importer, long msdelay);
49 
55  Frame* next_frame();
56 
61  void remove_source(int index);
62 
68  void update_delay(int index, long msdelay);
69 
73  int num_sources();
74 
84  void set_buffer_size(int bufferSize);
85 
90  int get_buffer_size();
91 
95  std::string source_descriptions();
96 private:
97  boost::asio::io_service ioService;
98  std::vector<Source *> sources;
99  std::priority_queue<Frame *> cache;
100  int bufferSize;
101 };
102 
103 #endif // IMPORTER_H_INCLUDED
Abstract class for importing frames and corresponding metadata.
Definition: imgimport.h:29
std::string source_descriptions()
Returns string containing human readable descriptions of the current input sources.
Definition: importer.cpp:136
Frame * next_frame()
Retrieves the next frame to be analyzed.
Definition: importer.cpp:117
void set_buffer_size(int bufferSize)
Sets the size of the importer&#39;s buffer.
Definition: importer.cpp:128
Importer()
Creates an Importer object.
Definition: importer.cpp:86
int num_sources()
returns the number of sources
Definition: importer.cpp:124
int get_buffer_size()
current buffer size
Definition: importer.cpp:132
void update_delay(int index, long msdelay)
Definition: importer.cpp:102
void add_source(ImageImport *importer, long msdelay)
adds an image source
Definition: importer.cpp:90
Definition: frame.h:49
Class for reading image files from a directory.
Definition: importer.h:34
Definition: importer.cpp:28
void remove_source(int index)
Definition: importer.cpp:97