13 #ifndef _mitk_OpenCVVideo_Source_h_ 14 #define _mitk_OpenCVVideo_Source_h_ 22 #include <opencv2/highgui.hpp> 25 #include "itkRGBPixel.h" 27 #include "itkImageRegionIterator.h" 51 itkFactorylessNewMacro(Self);
58 virtual void SetVideoFileInput(
const char * filename,
bool repeatVideo,
bool useCVCAMLib =
false);
63 virtual void SetVideoCameraInput(
int cameraindex,
bool useCVCAMLib =
false);
77 virtual double GetVideoCaptureProperty(
int property_id);
82 virtual int SetVideoCaptureProperty(
int property_id,
double value);
84 virtual void GetCurrentFrameAsOpenCVImage(IplImage *
image);
88 cv::Mat GetImage()
override;
89 virtual const IplImage * GetCurrentFrame();
92 virtual void GetCurrentFrameAsItkHSVPixelImage(HSVPixelImageType::Pointer &
Image);
95 void FetchFrame()
override;
98 unsigned char * GetVideoTexture()
override;
101 void StartCapturing()
override;
104 void StopCapturing()
override;
107 virtual IplImage* FlipImage(IplImage* input);
115 virtual void DisableOnlineImageUndistortion();
119 virtual bool OnlineImageUndistortionEnabled()
const;
121 void PauseCapturing()
override;
125 itkGetConstMacro( VideoFileName, std::string );
127 virtual void SetEnableXAxisFlip(
bool enable);
128 virtual void SetEnableYAxisFlip(
bool enable);
133 itkGetConstMacro( GrabbingDeviceNumber,
short );
135 itkGetMacro( RepeatVideo,
bool );
136 itkSetMacro( RepeatVideo,
bool );
151 void UpdateVideoTexture();
154 void sleep(
unsigned int ms);
155 void RGBtoHSV(
float r,
float g,
float b,
float &h,
float &s,
float &v);
mitk::UndistortCameraImage::Pointer m_UndistortCameraImage
itk::ImageRegionIterator< HSVPixelImageType > HSVConstIteratorType
std::string m_VideoFileName
saves the video file name (is empty if a grabbing device is used or if this is not initialized) ...
CvCapture * m_VideoCapture
itk::Image< HSVPixelType, 2 > HSVPixelImageType
DataCollection - Class to facilitate loading/accessing structured data.
itk::RGBPixel< unsigned char > CharPixelType
IplImage * m_CurrentImage
#define mitkClassMacro(className, SuperClassName)
Image class for storing images.
itk::ImageRegionIterator< RGBPixelImageType > RGBConstIteratorType
itk::Image< CharPixelType, 2 > RGBPixelImageType
mitk::Image::Pointer image
unsigned char * m_CurrentVideoTexture
itk::FixedArray< float, 3 > HSVPixelType
short m_GrabbingDeviceNumber
saves the grabbing device number (is -1 if a videofilename is used or if this is not initialized) ...