This class is the parameters parser for class OpenCVGrabber. More...
#include <openCVGrabber/OpenCVGrabber_ParamsParser.h>
Classes | |
struct | parser_version_type |
Public Member Functions | |
OpenCVGrabber_ParamsParser () | |
~OpenCVGrabber_ParamsParser () override=default | |
bool | parseParams (const yarp::os::Searchable &config) override |
Parse the DeviceDriver parameters. | |
std::string | getDeviceClassName () const override |
Get the name of the DeviceDriver class. | |
std::string | getDeviceName () const override |
Get the name of the device (i.e. | |
std::string | getDocumentationOfDeviceParams () const override |
Get the documentation of the DeviceDriver's parameters. | |
std::vector< std::string > | getListOfParams () const override |
Return a list of all params used by the device. | |
bool | getParamValue (const std::string ¶mName, std::string ¶mValue) const override |
Return the value (represented as a string) of the requested parameter. | |
std::string | getConfiguration () const override |
Return the configuration of the device. | |
![]() | |
virtual | ~IDeviceDriverParams () |
Public Attributes | |
const std::string | m_device_classname = {"OpenCVGrabber"} |
const std::string | m_device_name = {"openCVGrabber"} |
bool | m_parser_is_strict = false |
const parser_version_type | m_parser_version = {} |
std::string | m_provided_configuration |
const std::string | m_movie_defaultValue = {""} |
const std::string | m_loop_defaultValue = {"false"} |
const std::string | m_camera_defaultValue = {"0"} |
const std::string | m_framerate_defaultValue = {"-1"} |
const std::string | m_width_defaultValue = {"0"} |
const std::string | m_height_defaultValue = {"0"} |
const std::string | m_flip_x_defaultValue = {"false"} |
const std::string | m_flip_y_defaultValue = {"false"} |
const std::string | m_transpose_defaultValue = {"false"} |
std::string | m_movie = {} |
bool | m_loop = {false} |
int | m_camera = {0} |
double | m_framerate = {-1} |
int | m_width = {0} |
int | m_height = {0} |
bool | m_flip_x = {false} |
bool | m_flip_y = {false} |
bool | m_transpose = {false} |
This class is the parameters parser for class OpenCVGrabber.
These are the used parameters:
Group name | Parameter name | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|---|
- | movie | string | - | - | 0 | if present, read an .avi file instead of opening a camera | - |
- | loop | bool | - | false | 0 | if true, and movie parameter is set, enable the loop playback of the file | - |
- | camera | int | - | 0 | 0 | Id of the camera hardware device | - |
- | framerate | double | - | -1 | 0 | Framerate. Default value obtained by the hardware | - |
- | width | int | - | 0 | 0 | Width of the frame. Default value obtained by the hardware | - |
- | height | int | - | 0 | 0 | Height of the frame. Default value obtained by the hardware | - |
- | flip_x | bool | - | false | 0 | Flip along the x axis | - |
- | flip_y | bool | - | false | 0 | flip along the y axis | - |
- | transpose | bool | - | false | 0 | Rotate the image by 90 degrees | - |
The device can be launched by yarpdev using one of the following examples (with and without all optional parameters):
Definition at line 49 of file OpenCVGrabber_ParamsParser.h.
OpenCVGrabber_ParamsParser::OpenCVGrabber_ParamsParser | ( | ) |
Definition at line 23 of file OpenCVGrabber_ParamsParser.cpp.
|
overridedefault |
|
overridevirtual |
Return the configuration of the device.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 102 of file OpenCVGrabber_ParamsParser.cpp.
|
inlineoverridevirtual |
Get the name of the DeviceDriver class.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 89 of file OpenCVGrabber_ParamsParser.h.
|
inlineoverridevirtual |
Get the name of the device (i.e.
the plugin name).
Implements yarp::dev::IDeviceDriverParams.
Definition at line 90 of file OpenCVGrabber_ParamsParser.h.
|
overridevirtual |
Get the documentation of the DeviceDriver's parameters.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 277 of file OpenCVGrabber_ParamsParser.cpp.
|
overridevirtual |
Return a list of all params used by the device.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 28 of file OpenCVGrabber_ParamsParser.cpp.
|
overridevirtual |
Return the value (represented as a string) of the requested parameter.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 44 of file OpenCVGrabber_ParamsParser.cpp.
|
overridevirtual |
Parse the DeviceDriver parameters.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 112 of file OpenCVGrabber_ParamsParser.cpp.
int OpenCVGrabber_ParamsParser::m_camera = {0} |
Definition at line 80 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_camera_defaultValue = {"0"} |
Definition at line 70 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_device_classname = {"OpenCVGrabber"} |
Definition at line 56 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_device_name = {"openCVGrabber"} |
Definition at line 57 of file OpenCVGrabber_ParamsParser.h.
bool OpenCVGrabber_ParamsParser::m_flip_x = {false} |
Definition at line 84 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_flip_x_defaultValue = {"false"} |
Definition at line 74 of file OpenCVGrabber_ParamsParser.h.
bool OpenCVGrabber_ParamsParser::m_flip_y = {false} |
Definition at line 85 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_flip_y_defaultValue = {"false"} |
Definition at line 75 of file OpenCVGrabber_ParamsParser.h.
double OpenCVGrabber_ParamsParser::m_framerate = {-1} |
Definition at line 81 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_framerate_defaultValue = {"-1"} |
Definition at line 71 of file OpenCVGrabber_ParamsParser.h.
int OpenCVGrabber_ParamsParser::m_height = {0} |
Definition at line 83 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_height_defaultValue = {"0"} |
Definition at line 73 of file OpenCVGrabber_ParamsParser.h.
bool OpenCVGrabber_ParamsParser::m_loop = {false} |
Definition at line 79 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_loop_defaultValue = {"false"} |
Definition at line 69 of file OpenCVGrabber_ParamsParser.h.
std::string OpenCVGrabber_ParamsParser::m_movie = {} |
Definition at line 78 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_movie_defaultValue = {""} |
Definition at line 68 of file OpenCVGrabber_ParamsParser.h.
bool OpenCVGrabber_ParamsParser::m_parser_is_strict = false |
Definition at line 58 of file OpenCVGrabber_ParamsParser.h.
const parser_version_type OpenCVGrabber_ParamsParser::m_parser_version = {} |
Definition at line 64 of file OpenCVGrabber_ParamsParser.h.
std::string OpenCVGrabber_ParamsParser::m_provided_configuration |
Definition at line 66 of file OpenCVGrabber_ParamsParser.h.
bool OpenCVGrabber_ParamsParser::m_transpose = {false} |
Definition at line 86 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_transpose_defaultValue = {"false"} |
Definition at line 76 of file OpenCVGrabber_ParamsParser.h.
int OpenCVGrabber_ParamsParser::m_width = {0} |
Definition at line 82 of file OpenCVGrabber_ParamsParser.h.
const std::string OpenCVGrabber_ParamsParser::m_width_defaultValue = {"0"} |
Definition at line 72 of file OpenCVGrabber_ParamsParser.h.