diff --git a/modules/highgui/src/cap_pvapi.cpp b/modules/highgui/src/cap_pvapi.cpp index 6b2f5b13d0..5cf54873ca 100644 --- a/modules/highgui/src/cap_pvapi.cpp +++ b/modules/highgui/src/cap_pvapi.cpp @@ -255,7 +255,8 @@ IplImage* CvCaptureCAM_PvAPI::retrieveFrame(int) if (PvCaptureWaitForFrameDone(Camera.Handle, &(Camera.Frame), 1000) == ePvErrSuccess) { if (!monocrome) - cvMerge(grayframe,grayframe,grayframe,NULL,frame); + cvMerge(grayframe,grayframe,grayframe,NULL,frame); + return frame; return grayframe; } else return NULL;