OpenPose  1.0.0rc2
OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
videoCaptureReader.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_PRODUCER_VIDEO_CAPTURE_READER_HPP
2 #define OPENPOSE_PRODUCER_VIDEO_CAPTURE_READER_HPP
3 
4 #include <opencv2/core/core.hpp> // cv::Mat
5 #include <opencv2/highgui/highgui.hpp> // cv::VideoCapture
8 
9 namespace op
10 {
16  {
17  public:
22  explicit VideoCaptureReader(const int index, const bool throwExceptionIfNoOpened);
23 
29  explicit VideoCaptureReader(const std::string& path, const ProducerType producerType);
30 
35  virtual ~VideoCaptureReader();
36 
37  virtual std::string getFrameName() = 0;
38 
39  inline bool isOpened() const
40  {
41  return mVideoCapture.isOpened();
42  }
43 
44  void release();
45 
46  virtual double get(const int capProperty) = 0;
47 
48  virtual void set(const int capProperty, const double value) = 0;
49 
50  inline double get(const ProducerProperty property)
51  {
52  return Producer::get(property);
53  }
54 
55  inline void set(const ProducerProperty property, const double value)
56  {
57  Producer::set(property, value);
58  }
59 
60  protected:
61  virtual cv::Mat getRawFrame() = 0;
62 
63  private:
64  cv::VideoCapture mVideoCapture;
65 
67  };
68 }
69 
70 #endif // OPENPOSE_PRODUCER_VIDEO_CAPTURE_READER_HPP
#define DELETE_COPY(className)
Definition: macros.hpp:25
Definition: videoCaptureReader.hpp:15
ProducerProperty
Definition: enumClasses.hpp:12
Definition: producer.hpp:16
virtual void set(const int capProperty, const double value)=0
virtual double get(const int capProperty)=0
void set(const ProducerProperty property, const double value)
Definition: videoCaptureReader.hpp:55
bool isOpened() const
Definition: videoCaptureReader.hpp:39
ProducerType
Definition: enumClasses.hpp:25
#define OP_API
Definition: macros.hpp:5