FastTrack 6.1.0
Tracks multiples objects dealing with occlusion and identities.
Loading...
Searching...
No Matches
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.
 
 VideoReader (const VideoReader &)=delete
 
VideoReaderoperator= (const VideoReader &)=delete
 
VideoReaderoperator= (VideoReader &&T)=delete
 
 VideoReader (VideoReader &&T)=delete
 
bool getNext (UMat &destination)
 Get the next image, always one channel.
 
bool getNext (Mat &destination)
 Get the next image, always one channel.
 
bool getImage (int index, UMat &destination)
 Get the image at selected index, always one channel.
 
bool getImage (int index, Mat &destination)
 Get the image at selected index, always one channel.
 
bool open (const String &path, int apiPreference=CAP_FFMPEG) override
 Open the VideoReader.
 
bool open (int apiPreference=CAP_FFMPEG)
 Open the VideoReader.
 
unsigned int getImageCount () const
 Get the total number of images in the video.
 
bool isSequence ()
 Is the file is an image sequence.
 

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()

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.

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.

◆ open() [1/2]

bool VideoReader::open ( const String & path,
int apiPreference = CAP_FFMPEG )
override

Open the VideoReader.

Parameters
[in]pathto file.
[in]OpenCVbackend.

◆ open() [2/2]

bool VideoReader::open ( int apiPreference = CAP_FFMPEG)

Open the VideoReader.

Parameters
[in]OpenCVbackend.

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