OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
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 
6 
7 namespace op
8 {
14  {
15  public:
20  explicit VideoCaptureReader(const int index, const bool throwExceptionIfNoOpened,
21  const std::string& cameraParameterPath, const bool undistortImage,
22  const int numberViews);
23 
29  explicit VideoCaptureReader(const std::string& path, const ProducerType producerType,
30  const std::string& cameraParameterPath, const bool undistortImage,
31  const int numberViews);
32 
38 
39  virtual std::string getNextFrameName() = 0;
40 
41  virtual bool isOpened() const;
42 
43  void release();
44 
45  virtual double get(const int capProperty) = 0;
46 
47  virtual void set(const int capProperty, const double value) = 0;
48 
49  protected:
50  virtual Matrix getRawFrame() = 0;
51 
52  virtual std::vector<Matrix> getRawFrames() = 0;
53 
54  void resetWebcam(const int index, const bool throwExceptionIfNoOpened);
55 
56  private:
57  // PIMPL idiom
58  // http://www.cppsamples.com/common-tasks/pimpl.html
59  struct ImplVideoCaptureReader;
60  std::unique_ptr<ImplVideoCaptureReader> upImpl;
61 
63  };
64 }
65 
66 #endif // OPENPOSE_PRODUCER_VIDEO_CAPTURE_READER_HPP
virtual std::string getNextFrameName()=0
virtual Matrix getRawFrame()=0
VideoCaptureReader(const std::string &path, const ProducerType producerType, const std::string &cameraParameterPath, const bool undistortImage, const int numberViews)
virtual double get(const int capProperty)=0
virtual ~VideoCaptureReader()
virtual std::vector< Matrix > getRawFrames()=0
virtual bool isOpened() const
virtual void set(const int capProperty, const double value)=0
void resetWebcam(const int index, const bool throwExceptionIfNoOpened)
VideoCaptureReader(const int index, const bool throwExceptionIfNoOpened, const std::string &cameraParameterPath, const bool undistortImage, const int numberViews)
#define OP_API
Definition: macros.hpp:18
#define DELETE_COPY(className)
Definition: macros.hpp:32
ProducerType
Definition: enumClasses.hpp:30