2 #include "CaptureCamera.h"
8 /*----------------------------------------------------------------------*\
10 \*---------------------------------------------------------------------*/
12 /*--------------------------------------*\
14 \*-------------------------------------*/
16 /*--------------------------------------*\
18 \*-------------------------------------*/
20 /*----------------------------------------------------------------------*\
22 \*---------------------------------------------------------------------*/
24 /*--------------------------------------*\
26 \*-------------------------------------*/
28 /*------------------*\
33 * see doc of Capture_A constructor for cuda use (ptrHostMemory)
35 CaptureCamera::CaptureCamera(int idCamera
, const string
& title
, int wAsk
, int hAsk
,uchar4
* ptrHostMemory
) :
36 Capture_A(createStream(idCamera
), title
,ptrHostMemory
)
39 this->idCamera
= idCamera
;
46 CaptureCamera::~CaptureCamera(void)
49 // delete ptrCaptureStream; in constructor
52 /*------------------*\
56 void CaptureCamera::printInfo(void)
58 Capture_A::printInfo();
60 cout
<< "\t(w,h) asked = (" << wAsk
<< "," << hAsk
<< ") " << endl
;
65 void CaptureCamera::readStream(VideoCapture
* ptrCaptureStream
, Mat
* ptrMatCaptureSrc
)
67 (*ptrCaptureStream
) >> (*ptrMatCaptureSrc
);
70 /*------------------*\
74 int CaptureCamera::getIdCamera()
79 int CaptureCamera::dtOriginalMS()
81 return 0; // On doit attendre sur le port usb, mieux?
84 /*--------------------------------------*\
86 \*-------------------------------------*/
88 VideoCapture
* CaptureCamera::createStream(int idCamera
)
90 return new VideoCapture(idCamera
);
93 void CaptureCamera::configure()
95 // VideoCapture* ptrCaptureStream = getVideoCapture();
97 // cout << "(w,h) asked = (" << wAsk << "," << hAsk << ") asked" << endl;
101 ptrCaptureStream
->set(CV_CAP_PROP_FRAME_WIDTH
, wAsk
);
106 ptrCaptureStream
->set(CV_CAP_PROP_FRAME_HEIGHT
, hAsk
);
111 /*----------------------------------------------------------------------*\
113 \*---------------------------------------------------------------------*/