18#ifndef itkOpenCVVideoCapture_h
19#define itkOpenCVVideoCapture_h
24#include "opencv2/core/version.hpp"
25#if !defined(CV_VERSION_EPOCH)
27# include "opencv2/videoio.hpp"
50template <
typename TV
ideoStream>
56 using FrameType =
typename VideoStreamType::FrameType;
58 static constexpr unsigned int Dimensions = FrameType::ImageDimension;
78 itkExceptionStringMacro(
"itk::OpenCVVideoCapture::open(filename) -> If you just want to read from a file, use "
79 "cv::VideoCapture since there is nothing to be gained using itk's version.");
85 itkExceptionStringMacro(
"itk::OpenCVVideoCapture::open(device) -> If you just want to read from a device, use "
86 "cv::VideoCapture since there is nothing to be gained using itk's version.");
129 set(
int propId,
double value);
147#ifndef ITK_MANUAL_INSTANTIATION
148# include "itkOpenCVVideoCapture.hxx"
virtual bool isOpened() const
static constexpr unsigned int Dimensions
VideoStreamType * m_VideoStream
virtual bool retrieve(cv::Mat &image, int channel=0)
virtual bool open(VideoStreamType *videoStream)
TVideoStream VideoStreamType
OpenCVVideoCapture(VideoStreamType *videoStream)
virtual bool read(cv::Mat &image)
virtual double get(int propId)
virtual ~OpenCVVideoCapture()
virtual bool open(const std::string &)
virtual bool set(int propId, double value)
typename VideoStreamType::FrameType FrameType
virtual Self & operator>>(cv::Mat &image)
OpenCVVideoCapture< VideoStreamType > Self
typename FrameType::PixelType PixelType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....