|
gramods
|
The OpenCvVideoCapture uses OpenCVs VideoCapture to read off video image data. More...
#include <OpenCvVideoCapture.hh>


Classes | |
| struct | Impl |
Public Member Functions | |
| void | setVideoFile (std::filesystem::path file) |
| Sets the video file to read from. | |
| void | setCameraId (int id) |
| Sets the camera id to capture data from. | |
| void | setCameraWidth (int W) |
| Sets the width of the resolution to request from the camera. | |
| void | setCameraHeight (int W) |
| Sets the height of the resolution to request from the camera. | |
| void | setCameraFramerate (int R) |
| Sets the framerate to request from the camera. | |
| void | setCameraFourCC (std::string cc) |
| Specifies the FourCC for the camera stream. | |
| void | setBackend (std::string b) |
| Specifies backend to use for reading camera or video stream. | |
| void | update (gmCore::Updateable::clock::time_point, size_t) |
| Updates the video capture to read off the next frame. | |
| bool | retrieve (cv::Mat &image) override |
| Retrieve the latest read image captured. | |
| std::string | getDefaultKey () override |
| Returns the default key, in Configuration, for the Object. | |
Public Member Functions inherited from gramods::gmCore::Object | |
| Object () | |
| Initializes internal data. | |
| virtual | ~Object () |
| Cleaning up internal data. | |
| virtual void | initialize () |
| Called to initialize the Object. | |
| virtual void | accept (Visitor *visitor) |
| Calls the visitors apply method with this as argument. | |
| virtual void | traverse (Visitor *visitor) |
| Calls the child Object's accept method, if such exist. | |
| bool | isInitialized () |
| Returns true if the Object is initialized. | |
Public Member Functions inherited from gramods::gmCore::Updateable | |
| Updateable (int priority=0) | |
| Configures the Updateable properties to the specified priority. | |
| virtual void | update (clock::time_point t, size_t frame)=0 |
| Called by updateAll to make the object up-to-date. | |
Static Public Attributes | |
| static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Additional Inherited Members | |
Public Types inherited from gramods::gmCore::Updateable | |
| typedef std::chrono::steady_clock | clock |
Static Public Member Functions inherited from gramods::gmCore::Updateable | |
| static void | updateAll (clock::time_point t=clock::now(), std::optional< size_t > frame=std::nullopt) |
| Updates all currently instanciated updateable objects. | |
The OpenCvVideoCapture uses OpenCVs VideoCapture to read off video image data.
This class configures as an Updateable with a priority of
|
inlineoverridevirtual |
Returns the default key, in Configuration, for the Object.
Reimplemented from gramods::gmCore::Object.
|
override |
Retrieve the latest read image captured.
| [out] | image | The latest image in the video source. |
| void gramods::gmTrack::OpenCvVideoCapture::setBackend | ( | std::string | b | ) |
Specifies backend to use for reading camera or video stream.
Default is "ANY" and the following are all valid alternatives, though not all may be supported by the current build of OpenCV:
XML-attribute: backend
| void gramods::gmTrack::OpenCvVideoCapture::setCameraFourCC | ( | std::string | cc | ) |
Specifies the FourCC for the camera stream.
If not set the driver default is used. A value supported by many cameras is "MJPG". This string must be four characters long, so add spaces when necessary.
XML-attribute: cameraFourCC
| void gramods::gmTrack::OpenCvVideoCapture::setCameraFramerate | ( | int | R | ) |
Sets the framerate to request from the camera.
If not set the driver default is used.
XML-attribute: cameraFramerate
| void gramods::gmTrack::OpenCvVideoCapture::setCameraHeight | ( | int | W | ) |
Sets the height of the resolution to request from the camera.
If not set the driver default is used.
XML-attribute: cameraHeight
| void gramods::gmTrack::OpenCvVideoCapture::setCameraId | ( | int | id | ) |
Sets the camera id to capture data from.
XML-attribute: cameraId
| void gramods::gmTrack::OpenCvVideoCapture::setCameraWidth | ( | int | W | ) |
Sets the width of the resolution to request from the camera.
If not set the driver default is used.
XML-attribute: cameraWidth
| void gramods::gmTrack::OpenCvVideoCapture::setVideoFile | ( | std::filesystem::path | file | ) |
Sets the video file to read from.
XML-attribute: videoFile
| void gramods::gmTrack::OpenCvVideoCapture::update | ( | gmCore::Updateable::clock::time_point | , |
| size_t | |||
| ) |
Updates the video capture to read off the next frame.