#include <opencv_vs.h>
Public Member Functions | |
OpenCVVideoSource (char *source, int w, int h) | |
virtual bool | initialize () |
initialized the video source. | |
virtual bool | getFrame (IplImage *dst) |
get the next frame and convert it to the format described in "dst". | |
void | getSize (int &width, int &height) |
return width and height of images coming from the video source. | |
virtual | ~OpenCVVideoSource () |
virtual void | start () |
Start the video source: getFrame() will provide each time a different image. | |
virtual void | stop () |
Pause the source. | |
virtual bool | isPlaying () |
return false if the source is paused. | |
virtual const char * | getStreamName () const |
Returns a string describing the stream. | |
virtual const char * | getStreamType () const |
Returns a string describing the type of the stream. | |
virtual int | getId () |
This method is usefull only for video files, not grabbing hardware. |
Definition at line 15 of file opencv_vs.h.
OpenCVVideoSource::OpenCVVideoSource | ( | char * | source, | |
int | w, | |||
int | h | |||
) |
Definition at line 26 of file opencv_vs.cpp.
OpenCVVideoSource::~OpenCVVideoSource | ( | ) | [virtual] |
Definition at line 93 of file opencv_vs.cpp.
bool OpenCVVideoSource::getFrame | ( | IplImage * | dst | ) | [virtual] |
get the next frame and convert it to the format described in "dst".
The image will be deinterlaced, scaled, and color converted to match dst.
dst | the image to copy the frame into. |
Implements VideoSource.
Definition at line 52 of file opencv_vs.cpp.
int OpenCVVideoSource::getId | ( | ) | [virtual] |
This method is usefull only for video files, not grabbing hardware.
It returns a the number of the last frame provided by getFrame().
Reimplemented from VideoSource.
Definition at line 82 of file opencv_vs.cpp.
void OpenCVVideoSource::getSize | ( | int & | width, | |
int & | height | |||
) | [virtual] |
return width and height of images coming from the video source.
Implements VideoSource.
Definition at line 105 of file opencv_vs.cpp.
virtual const char* OpenCVVideoSource::getStreamName | ( | ) | const [inline, virtual] |
Returns a string describing the stream.
If the source comes from a file, the filename is returned.
Implements VideoSource.
Definition at line 26 of file opencv_vs.h.
virtual const char* OpenCVVideoSource::getStreamType | ( | ) | const [inline, virtual] |
Returns a string describing the type of the stream.
For example: BmpFile, AviFile, DShowCB...
Implements VideoSource.
Definition at line 27 of file opencv_vs.h.
bool OpenCVVideoSource::initialize | ( | ) | [virtual] |
initialized the video source.
Has to be called before any other method.
Implements VideoSource.
Definition at line 35 of file opencv_vs.cpp.
Referenced by OpenCVFactory::construct().
virtual bool OpenCVVideoSource::isPlaying | ( | ) | [inline, virtual] |
return false if the source is paused.
Implements VideoSource.
Definition at line 25 of file opencv_vs.h.
void OpenCVVideoSource::start | ( | ) | [virtual] |
Start the video source: getFrame() will provide each time a different image.
After calling initialize(), the video source is playing.
Implements VideoSource.
Definition at line 96 of file opencv_vs.cpp.
void OpenCVVideoSource::stop | ( | ) | [virtual] |
Pause the source.
The getFrame() method will always provide the current frame.
Implements VideoSource.
Definition at line 100 of file opencv_vs.cpp.