OpenPose
1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
|
#include <videoCaptureReader.hpp>
Public Member Functions | |
VideoCaptureReader (const int index, const bool throwExceptionIfNoOpened, const std::string &cameraParameterPath, const bool undistortImage, const int numberViews) | |
VideoCaptureReader (const std::string &path, const ProducerType producerType, const std::string &cameraParameterPath, const bool undistortImage, const int numberViews) | |
virtual | ~VideoCaptureReader () |
virtual std::string | getNextFrameName ()=0 |
virtual bool | isOpened () const |
void | release () |
virtual double | get (const int capProperty)=0 |
virtual void | set (const int capProperty, const double value)=0 |
Public Member Functions inherited from op::Producer | |
Producer (const ProducerType type, const std::string &cameraParameterPath, const bool undistortImage, const int mNumberViews) | |
virtual | ~Producer () |
Matrix | getFrame () |
std::vector< Matrix > | getFrames () |
virtual std::vector< Matrix > | getCameraMatrices () |
virtual std::vector< Matrix > | getCameraExtrinsics () |
virtual std::vector< Matrix > | getCameraIntrinsics () |
void | setProducerFpsMode (const ProducerFpsMode fpsMode) |
ProducerType | getType () |
double | get (const ProducerProperty property) |
void | set (const ProducerProperty property, const double value) |
Protected Member Functions | |
virtual Matrix | getRawFrame ()=0 |
virtual std::vector< Matrix > | getRawFrames ()=0 |
void | resetWebcam (const int index, const bool throwExceptionIfNoOpened) |
Protected Member Functions inherited from op::Producer | |
void | checkFrameIntegrity (Matrix &frame) |
void | ifEndedResetOrRelease () |
void | keepDesiredFrameRate () |
VideoCaptureReader is an abstract class to extract frames from a cv::VideoCapture source (video file, webcam stream, etc.). It has the basic and common functions of the cv::VideoCapture class (e.g., get, set, etc.).
Definition at line 13 of file videoCaptureReader.hpp.
|
explicit |
This constructor of VideoCaptureReader wraps cv::VideoCapture(const int).
index | const int indicating the cv::VideoCapture constructor int argument, in the range [0, 9]. |
|
explicit |
This constructor of VideoCaptureReader wraps cv::VideoCapture(const std::string).
path | const std::string indicating the cv::VideoCapture constructor string argument. |
producerType | const std::string indicating whether the frame source is an IP camera or video. |
|
virtual |
Destructor of VideoCaptureReader. It releases the cv::VideoCapture member. It is virtual so that any children class can implement its own destructor.
|
pure virtual |
This function is a wrapper of cv::VideoCapture::get. It allows getting different properties of the Producer (fps, width, height, etc.). See the OpenCV documentation for all the available properties.
capProperty | int indicating the property to be modified. |
Implements op::Producer.
Implemented in op::WebcamReader, op::VideoReader, and op::IpCameraReader.
|
pure virtual |
This function returns a unique frame name (e.g., the frame number for video, the frame counter for webcam, the image name for image directory reader, etc.).
Implements op::Producer.
Implemented in op::WebcamReader, op::VideoReader, and op::IpCameraReader.
|
protectedpure virtual |
Function to be defined by its children class. It retrieves and returns a new frame from the frames producer.
Implements op::Producer.
|
protectedpure virtual |
Function to be defined by its children class. It retrieves and returns a new frame from the frames producer. It is equivalent to getRawFrame when more than 1 image can be returned.
Implements op::Producer.
|
virtual |
This function returns whether the Producer instance is still opened and able to retrieve more frames.
Implements op::Producer.
Reimplemented in op::WebcamReader, op::VideoReader, and op::IpCameraReader.
|
virtual |
This function releases and closes the Producer. After it is called, no more frames can be retrieved from Producer::getFrames.
Implements op::Producer.
|
protected |
|
pure virtual |
This function is a wrapper of cv::VideoCapture::set. It allows setting different properties of the Producer (fps, width, height, etc.). See the OpenCV documentation for all the available properties.
capProperty | int indicating the property to be modified. |
value | double indicating the new value to be assigned. |
Implements op::Producer.
Implemented in op::WebcamReader, op::VideoReader, and op::IpCameraReader.