OpenCV-2.4.1-XIMEA-startacquisition.patch
OpenCV-2.4.1-patched/modules/highgui/src/cap_ximea.cpp 2012-06-25 18:40:34.411396757 +0400 | ||
---|---|---|
3 | 3 | |
4 | 4 |
#include "xiApi.h" |
5 | 5 |
#include "xiExt.h" |
6 |
#include "m3Api.h" |
|
6 | 7 | |
7 | 8 |
/**********************************************************************************/ |
8 | 9 | |
... | ... | |
96 | 97 | |
97 | 98 |
void CvCaptureCAM_XIMEA::close() |
98 | 99 |
{ |
100 |
xiStopAcquisition(hmv); |
|
99 | 101 |
xiCloseDevice(hmv); |
100 | 102 |
hmv = NULL; |
101 | 103 |
} |
... | ... | |
106 | 108 |
{ |
107 | 109 |
int mvret = XI_OK; |
108 | 110 |
image.size = sizeof(XI_IMG); |
109 |
if((mvret = xiGetImage( hmv, timeout, &image)) != XI_OK) |
|
110 |
{ |
|
111 |
errMsg("Error during GetImage", mvret); |
|
112 |
return false; |
|
111 |
mvret = xiGetImage( hmv, timeout, &image); |
|
112 |
if(mvret == MM40_ACQUISITION_STOPED) |
|
113 |
{ |
|
114 |
xiStartAcquisition(hmv); |
|
115 |
mvret = xiGetImage( hmv, timeout, &image); |
|
116 |
} |
|
117 |
if(mvret != XI_OK) { |
|
118 |
errMsg("Error during GetImage", mvret); |
|
119 |
return false; |
|
113 | 120 |
} |
114 | 121 |
return true; |
115 | 122 |
} |