25#include <opencv2/imgproc.hpp>
26#include <opencv2/videoio.hpp>
27#include <opencv2/videoio/registry.hpp>
33namespace fs = std::filesystem;
36class VideoReader :
public VideoCapture {
42 VideoReader() =
default;
43 ~VideoReader() =
default;
44 VideoReader(
const string &path);
45 VideoReader(
const VideoReader &) =
delete;
46 VideoReader &operator=(
const VideoReader &) =
delete;
47 VideoReader &operator=(VideoReader &&T) =
delete;
48 VideoReader(VideoReader &&T) =
delete;
50 bool getNext(UMat &destination);
52 bool getImage(
int index, UMat &destination);
53 bool getImage(
int index, Mat &destination);
54 bool open(
const String &path,
int apiPreference = CAP_FFMPEG)
override;
55 bool open(
int apiPreference = CAP_FFMPEG);
bool open(const String &path, int apiPreference=CAP_FFMPEG) override
Open the VideoReader.
Definition videoreader.cpp:45
bool isSequence()
Is the file is an image sequence.
Definition videoreader.cpp:169
unsigned int getImageCount() const
Get the total number of images in the video.
Definition videoreader.cpp:161
bool getImage(int index, UMat &destination)
Get the image at selected index, always one channel.
Definition videoreader.cpp:118
bool getNext(UMat &destination)
Get the next image, always one channel.
Definition videoreader.cpp:87