FastTrack 6.1.0
Tracks multiples objects dealing with occlusion and identities.
Public Member Functions | Private Attributes | List of all members
VideoReader Class Reference

This class is intended to abstract the opening of a video, it can load image sequence and video with the same public API. More...

Inheritance diagram for VideoReader:

Public Member Functions

 VideoReader (const string &path)
 Construct the VideoReader object from a path to a file that can be either an image from an image sequence or a movie file. More...
 
 VideoReader (const VideoReader &)
 Copy constructor. More...
 
VideoReaderoperator= (const VideoReader &)
 
bool getNext (UMat &destination)
 Get the next image, always one channel. More...
 
bool getNext (Mat &destination)
 Get the next image, always one channel. More...
 
bool getImage (int index, UMat &destination)
 Get the image at selected index, always one channel. More...
 
bool getImage (int index, Mat &destination)
 Get the image at selected index, always one channel. More...
 
bool open (const String &path, int apiPreference=CAP_ANY) override
 
unsigned int getImageCount () const
 Get the total number of images in the video. More...
 
bool isSequence ()
 Is the file is an image sequence. More...
 

Private Attributes

bool m_isSequence
 
int m_index
 
string m_path
 

Detailed Description

This class is intended to abstract the opening of a video, it can load image sequence and video with the same public API.

Author
Benjamin Gallois
Version
Revision
5.0

Contact: benja.nosp@m.min..nosp@m.gallo.nosp@m.is@f.nosp@m.asttr.nosp@m.ack..nosp@m.sh

Constructor & Destructor Documentation

◆ VideoReader() [1/2]

VideoReader::VideoReader ( const string &  path)

Construct the VideoReader object from a path to a file that can be either an image from an image sequence or a movie file.

Parameters
[in]pathPath to a video or image file.

◆ VideoReader() [2/2]

VideoReader::VideoReader ( const VideoReader video)

Copy constructor.

Parameters
[in]video.

Member Function Documentation

◆ getImage() [1/2]

bool VideoReader::getImage ( int  index,
Mat &  destination 
)

Get the image at selected index, always one channel.

Parameters
[in]indexIndex of the image.
[in]destinationMat to store the image.

◆ getImage() [2/2]

bool VideoReader::getImage ( int  index,
UMat &  destination 
)

Get the image at selected index, always one channel.

Parameters
[in]indexIndex of the image.
[in]destinationUMat to store the image.

◆ getImageCount()

unsigned int VideoReader::getImageCount ( ) const

Get the total number of images in the video.

Returns
total number of images.

◆ getNext() [1/2]

bool VideoReader::getNext ( Mat &  destination)

Get the next image, always one channel.

Parameters
[in]destinationUMat to store the image.

◆ getNext() [2/2]

bool VideoReader::getNext ( UMat &  destination)

Get the next image, always one channel.

Parameters
[in]destinationUMat to store the image.

◆ isSequence()

bool VideoReader::isSequence ( )

Is the file is an image sequence.

Returns
True if an image sequence, false otherwise.

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