![]() |
BoB robotics
The Brains on Board robotics library
|
An abstract class representing a video input stream. More...
#include <input.h>
Public Member Functions | |
ImgProc::OpenCVUnwrap360 | createUnwrapper (const cv::Size &unwrapRes) const |
Create an ImgProc::OpenCVUnwrap360 object for this video stream. More... | |
virtual std::string | getCameraName () const |
Get the name of this type of camera as a (short) string. More... | |
virtual units::frequency::hertz_t | getFrameRate () const |
virtual cv::Size | getOutputSize () const =0 |
Get the current output resolution of this video stream. More... | |
virtual bool | needsUnwrapping () const |
Whether this video source needs unwrapping with an ImgProc::OpenCVUnwrap360. More... | |
virtual void | setOutputSize (const cv::Size &) |
Set the output resolution of this video stream. More... | |
virtual bool | readFrame (cv::Mat &outFrame)=0 |
Try to read a frame in colour from this video source. More... | |
virtual bool | readGreyscaleFrame (cv::Mat &outFrame) |
Try to read a frame in greyscale from this video source. More... | |
void | readFrameSync (cv::Mat &outFrame) |
Read a frame synchronously, blocking until a new frame is received. | |
void | readGreyscaleFrameSync (cv::Mat &outFrame) |
void | write (cv::FileStorage &fs) const |
Allows OpenCV to serialise info about this Input. | |
Static Public Attributes | |
static constexpr const char * | DefaultCameraName = "unknown_camera" |
An abstract class representing a video input stream.
ImgProc::OpenCVUnwrap360 BoBRobotics::Video::Input::createUnwrapper | ( | const cv::Size & | unwrapRes | ) | const |
Create an ImgProc::OpenCVUnwrap360 object for this video stream.
unwrapRes | The resolution of the unwrapped image |
|
virtual |
Get the name of this type of camera as a (short) string.
Note that this is used to load the appropriate unwrapping parameters (we look for a file called [camera name].yaml).
Reimplemented in BoBRobotics::AntWorld::RenderTargetInput, BoBRobotics::Robots::Gazebo::Camera, BoBRobotics::Robots::UAV::Bebop::VideoStream, BoBRobotics::Video::NetSource, BoBRobotics::Video::ODK2, BoBRobotics::Video::OpenCVInput, BoBRobotics::Video::OpenGL, BoBRobotics::Video::RandomInput< GeneratorType >, and BoBRobotics::Video::RPiCamera.
|
pure virtual |
Get the current output resolution of this video stream.
Implemented in BoBRobotics::AntWorld::RenderTargetInput, BoBRobotics::Robots::Gazebo::Camera, BoBRobotics::Robots::UAV::Bebop::VideoStream, BoBRobotics::Video::NetSource, BoBRobotics::Video::ODK2, BoBRobotics::Video::OpenCVInput, BoBRobotics::Video::OpenGL, BoBRobotics::Video::RandomInput< GeneratorType >, and BoBRobotics::Video::RPiCamera.
|
virtual |
Whether this video source needs unwrapping with an ImgProc::OpenCVUnwrap360.
Reimplemented in BoBRobotics::AntWorld::RenderTargetInput, BoBRobotics::Robots::Gazebo::Camera, BoBRobotics::Video::NetSource, BoBRobotics::Video::ODK2, BoBRobotics::Video::OpenGL, BoBRobotics::Video::RandomInput< GeneratorType >, and BoBRobotics::Video::RPiCamera.
|
pure virtual |
Try to read a frame in colour from this video source.
The output frame should have type CV_8UC3.
Implemented in BoBRobotics::Robots::UAV::Bebop::VideoStream, BoBRobotics::Video::NetSource, BoBRobotics::AntWorld::Camera, BoBRobotics::AntWorld::RenderTargetInput, BoBRobotics::Robots::Gazebo::Camera, BoBRobotics::Video::ODK2, BoBRobotics::Video::OpenCVInput, BoBRobotics::Video::OpenGL, BoBRobotics::Video::RandomInput< GeneratorType >, and BoBRobotics::Video::RPiCamera.
|
virtual |
Try to read a frame in greyscale from this video source.
The output frame should have type CV_8UC.
Reimplemented in BoBRobotics::Video::RandomInput< GeneratorType >.
|
virtual |
Set the output resolution of this video stream.
Reimplemented in BoBRobotics::Video::RPiCamera, BoBRobotics::Video::OpenCVInput, and BoBRobotics::Video::RandomInput< GeneratorType >.