OpenPose
1.0.0rc2
OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library
|
#include <webcamReader.hpp>
Inherits op::VideoCaptureReader.
Public Member Functions | |
WebcamReader (const int webcamIndex=0, const Point< int > &webcamResolution=Point< int >{}, const double fps=30., const bool throwExceptionIfNoOpened=true) | |
~WebcamReader () | |
std::string | getFrameName () |
double | get (const int capProperty) |
void | set (const int capProperty, const double value) |
Public Member Functions inherited from op::VideoCaptureReader | |
VideoCaptureReader (const int index, const bool throwExceptionIfNoOpened) | |
VideoCaptureReader (const std::string &path, const ProducerType producerType) | |
virtual | ~VideoCaptureReader () |
bool | isOpened () const |
void | release () |
double | get (const ProducerProperty property) |
void | set (const ProducerProperty property, const double value) |
Public Member Functions inherited from op::Producer | |
Producer (const ProducerType type) | |
virtual | ~Producer () |
cv::Mat | getFrame () |
void | setProducerFpsMode (const ProducerFpsMode fpsMode) |
ProducerType | getType () |
Additional Inherited Members | |
Protected Member Functions inherited from op::Producer | |
void | checkFrameIntegrity (cv::Mat &frame) |
void | flipAndRotate (cv::Mat &cvMat) const |
void | ifEndedResetOrRelease () |
void | keepDesiredFrameRate () |
WebcamReader is a wrapper of the cv::VideoCapture class for webcam. It allows controlling a video (extracting frames, setting resolution & fps, seeking to a particular frame, etc).
|
explicit |
Constructor of WebcamReader. It opens the webcam as a wrapper of cv::VideoCapture. It includes an argument to indicate the desired resolution.
webcamIndex | const int indicating the camera source (see the OpenCV documentation about cv::VideoCapture for more details), in the range [0, 9]. |
webcamResolution | const Point<int> parameter which specifies the desired camera resolution. |
fps | Double parameter which specifies the desired camera frame rate. |
op::WebcamReader::~WebcamReader | ( | ) |
|
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::VideoCaptureReader.
|
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::VideoCaptureReader.
|
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::VideoCaptureReader.