OpenPose  1.0.0rc2
OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends 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 getNextFrameName() = 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  protected:
51  virtual cv::Mat getRawFrame() = 0;
52 
53  virtual std::vector<cv::Mat> getRawFrames() = 0;
54 
55  private:
56  cv::VideoCapture mVideoCapture;
57 
59  };
60 }
61 
62 #endif // OPENPOSE_PRODUCER_VIDEO_CAPTURE_READER_HPP
#define DELETE_COPY(className)
Definition: macros.hpp:30
Definition: videoCaptureReader.hpp:15
Definition: producer.hpp:16
bool isOpened() const
Definition: videoCaptureReader.hpp:39
ProducerType
Definition: enumClasses.hpp:25
#define OP_API
Definition: macros.hpp:15
std::string string
Definition: cl2.hpp:574