vivalib library
Concurrent C++11 OpenCV library for Computer Vision applications
Public Member Functions | Protected Attributes | List of all members
viva::VideoInput Class Reference

#include <input.h>

Inheritance diagram for viva::VideoInput:
Inheritance graph
[legend]
Collaboration diagram for viva::VideoInput:
Collaboration graph
[legend]

Public Member Functions

 VideoInput (const string &filename, const Size &size=Size(-1,-1), int colorFlag=-1)
 
 VideoInput (const int id, const Size &size=Size(-1,-1), int colorFlag=-1)
 
 VideoInput ()
 
 ~VideoInput ()
 
bool getFrame (Mat &frame)
 
- Public Member Functions inherited from viva::Input
 Input (const Size &size=Size(-1,-1), int conversionFlag=-1)
 
virtual ~Input ()
 
void setConversionType (int flag)
 
size_t getWidth ()
 
size_t getHeight ()
 
Size getOrgSize ()
 

Protected Attributes

VideoCapture _CameraInput
 
bool _opened
 
- Protected Attributes inherited from viva::Input
Size _size
 
bool _convert
 
int _conversionFlag
 
Size _orgSize
 

Detailed Description

Base class for Video Sequence inputs

Constructor & Destructor Documentation

VideoInput::VideoInput ( const string &  filename,
const Size &  size = Size(-1,-1),
int  colorFlag = -1 
)

VideoInput constructor using a filename.

Parameters
filenamecould be: 1)video file i.e., movie.avi 2)a regular pattern filename i.e. imag0%2d.jpg 3)a url pointing to a video stream i.e., http://domain.com/movie.avi
sizewill scale the original feed to the desired size resolution unless (-1,-1) is defined
colorFlagOpenCV conversion flag type value e.g., CV_BGR2GRAY
VideoInput::VideoInput ( const int  id,
const Size &  size = Size(-1, -1),
int  colorFlag = -1 
)

VideoInput constructor using a camera id.

Parameters
idthe camera identifier.
sizewill scale the original feed to the desired size resolution unless (-1,-1) is defined
colorFlagOpenCV conversion flag type value e.g., CV_BGR2GRAY
VideoInput::VideoInput ( )

Default constructor

VideoInput::~VideoInput ( )

Desctructor

Member Function Documentation

bool VideoInput::getFrame ( Mat &  frame)
virtual

Overrided from Input Base Class. Used to extract a frame from the input sequence. Returns whether or not a frame was sucessfuly returned.

Parameters
frameoutput image frame from the sequence

Implements viva::Input.


The documentation for this class was generated from the following files: