18 #ifndef __itkOpenCVVideoCapture_h
19 #define __itkOpenCVVideoCapture_h
40 template <
typename TV
ideoStream>
50 typedef typename VideoStreamType::FrameType
FrameType;
52 static const unsigned int Dimensions = FrameType::ImageDimension;
72 virtual bool open(
const std::string &)
74 itkExceptionMacro(
"itk::OpenCVVideoCapture::open(filename) -> If you just want "
75 "to read from a file, use cv::VideoCapture since there is nothing to be "
76 "gained using itk's version.");
81 itkExceptionMacro(
"itk::OpenCVVideoCapture::open(device) -> If you just want "
82 "to read from a device, use cv::VideoCapture since there is nothing to be "
83 "gained using itk's version.");
106 virtual bool retrieve(cv::Mat & image,
int channel = 0);
113 virtual bool read(cv::Mat& image);
118 virtual bool set(
int propId,
double value);
121 virtual double get(
int propId);
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkOpenCVVideoCapture.hxx"
FrameType::PixelType PixelType
virtual Self & operator>>(cv::Mat &image)
virtual ~OpenCVVideoCapture()
TVideoStream VideoStreamType
static const unsigned int Dimensions
virtual bool set(int propId, double value)
virtual bool isOpened() const
virtual bool retrieve(cv::Mat &image, int channel=0)
This class implements OpenCV's VideoCapture API and takes an itk VideoStream as input.
OpenCVVideoCapture< VideoStreamType > Self
virtual bool read(cv::Mat &image)
VideoStreamType * m_VideoStream
virtual bool open(const std::string &)
VideoStreamType::FrameType FrameType