Population
Image processing library in C++
Public Types | Public Member Functions | Static Public Member Functions | List of all members
pop::Video Class Referenceabstract

simple class to read video (rtsp stream, avi file ...) More...

#include <Video.h>

Public Types

enum  VideoImpl { VLCDEPRECATED, VLC, FFMPEG }
 The different implementations of Video.
 

Public Member Functions

virtual ~Video ()
 destructor
 
virtual bool open (const std::string &filename)=0
 open the file or the network stream More...
 
virtual bool grabMatrixGrey ()=0
 grab the next frame More...
 
virtual Mat2UI8retrieveMatrixGrey ()=0
 reads the frame More...
 
virtual bool isFile () const =0
 isFile More...
 
virtual bool grabMatrixRGB ()=0
 
virtual Mat2RGBUI8retrieveMatrixRGB ()=0
 

Static Public Member Functions

static Videocreate (VideoImpl impl)
 generic constructor of the different implementations of Video, e.g., VideoVLC if impl==VLC or VideoFFMPEG if imple==FFMPEG.
 

Detailed Description

simple class to read video (rtsp stream, avi file ...)

Author
Tariel Vincent

The implementation uses the ffmpeg library or vlc library. In qtcreator, you uncomment this line CONFIG += HAVE_VLC in populationconfig.pri. For CMake, in CMakeList.txt, you set WITH_VLC at ON.

Video * video =Video::create(Video::VLC);
video->open( "/home/tariel/flame.avi");//http://www.engr.colostate.edu/me/facil/dynamics/avis.htm
MatNDisplay disp;
MatNDisplay disp2;
while(video->grabMatrixGrey()){
Mat2UI8 m = video->retrieveMatrixGrey();
int value;
Mat2UI8 m_threshold = Processing::thresholdOtsuMethod(m,value);
disp.display(m);
disp2.display(m_threshold);
}
return 1;

Member Function Documentation

virtual bool pop::Video::grabMatrixGrey ( )
pure virtual

grab the next frame

Returns
false no frame anymore
virtual bool pop::Video::isFile ( ) const
pure virtual

isFile

Returns
true iff the video stream comes from a file (i.e., not from the net)
virtual bool pop::Video::open ( const std::string &  filename)
pure virtual

open the file or the network stream

Parameters
filenameIP adress or file path
virtual Mat2UI8& pop::Video::retrieveMatrixGrey ( )
pure virtual

reads the frame

Returns
grey Matrix frame

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