Commit 183f2306 authored by Stefano Fabri's avatar Stefano Fabri

Initializaed monocrom variable on costructor

parent c7cf80fd
...@@ -107,7 +107,7 @@ protected: ...@@ -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) ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment