mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Initializaed monocrom variable on costructor
This commit is contained in:
parent
c7cf80fd59
commit
183f2306c8
@ -107,7 +107,7 @@ protected:
|
|||||||
|
|
||||||
CvCaptureCAM_PvAPI::CvCaptureCAM_PvAPI()
|
CvCaptureCAM_PvAPI::CvCaptureCAM_PvAPI()
|
||||||
{
|
{
|
||||||
|
monocrome=false;
|
||||||
}
|
}
|
||||||
void CvCaptureCAM_PvAPI::Sleep(unsigned int time)
|
void CvCaptureCAM_PvAPI::Sleep(unsigned int time)
|
||||||
{
|
{
|
||||||
@ -255,6 +255,7 @@ IplImage* CvCaptureCAM_PvAPI::retrieveFrame(int)
|
|||||||
if (PvCaptureWaitForFrameDone(Camera.Handle, &(Camera.Frame), 1000) == ePvErrSuccess) {
|
if (PvCaptureWaitForFrameDone(Camera.Handle, &(Camera.Frame), 1000) == ePvErrSuccess) {
|
||||||
if (!monocrome)
|
if (!monocrome)
|
||||||
cvMerge(grayframe,grayframe,grayframe,NULL,frame);
|
cvMerge(grayframe,grayframe,grayframe,NULL,frame);
|
||||||
|
printf("Frame ok\n");
|
||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
else return NULL;
|
else return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user