From e938563de57bdf8fed83c28466a184a05cee3335 Mon Sep 17 00:00:00 2001 From: AfterEight Date: Mon, 2 Feb 2015 14:59:52 +0100 Subject: [PATCH] Modified resetCvImage() in cap_ximea.cpp, so that the IplImage* frame is also updated after the resolution has changed via set(CV_CAP_PROP_FRAME_WIDTH, value)/set(CV_CAP_PROP_XI_DOWNSAMPLING, value) --- modules/highgui/src/cap_ximea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/cap_ximea.cpp b/modules/highgui/src/cap_ximea.cpp index 13a4538d9a..6f5b4ab1cb 100644 --- a/modules/highgui/src/cap_ximea.cpp +++ b/modules/highgui/src/cap_ximea.cpp @@ -204,7 +204,7 @@ void CvCaptureCAM_XIMEA::resetCvImage() xiGetParamInt( hmv, XI_PRM_HEIGHT, &height); xiGetParamInt( hmv, XI_PRM_IMAGE_DATA_FORMAT, &format); - if( (int)image.width != width || (int)image.height != height || image.frm != (XI_IMG_FORMAT)format) + if( (int)image.width != frame->width || (int)image.height != frame->height || image.frm != (XI_IMG_FORMAT)format) { if(frame) cvReleaseImage(&frame); frame = NULL;