21 #include <videoInput.h>
24 : m_ShowSettingsWindow(false)
45 m_VideoInput->stopDevice(m_DeviceNumber);
46 m_CapturingInProcess =
false;
56 if(m_CapturingInProcess && !m_CapturePaused)
58 if(m_CurrentImage == NULL)
59 m_CurrentImage = cvCreateImage(cvSize(m_CaptureWidth,m_CaptureHeight),IPL_DEPTH_8U,3);
61 if(m_VideoInput->isFrameNew(m_DeviceNumber))
64 m_VideoInput->getPixels(m_DeviceNumber, reinterpret_cast<unsigned char*>(m_CurrentImage->imageData),
false,
true);
66 if(m_UndistortImage && m_UndistortCameraImage.IsNotNull())
67 m_UndistortCameraImage->UndistortImageFast(m_CurrentImage, 0);
75 int numDevices = m_VideoInput->listDevices();
79 m_VideoInput->setupDevice(m_DeviceNumber, m_CaptureWidth, m_CaptureHeight, VI_COMPOSITE);
87 if(m_ShowSettingsWindow)
88 m_VideoInput->showSettingsWindow(m_DeviceNumber);
93 m_CaptureWidth = m_VideoInput->getWidth(m_DeviceNumber);
94 m_CaptureHeight = m_VideoInput->getHeight(m_DeviceNumber);
95 m_CaptureSize = m_VideoInput->getSize(m_DeviceNumber);
97 MITK_INFO <<
"starting capturing with VideoInputLib. Size: " << m_CaptureWidth <<
" x " << m_CaptureHeight;
98 m_CapturingInProcess =
true;
104 MITK_INFO <<
"stopping cpaturing process";
105 m_VideoInput->stopDevice(m_DeviceNumber);
106 m_CapturingInProcess =
false;
112 m_DeviceNumber = cameraindex;
IplImage * m_CurrentImage
static const std::string filename
bool m_CapturingInProcess