opencl opticaflow fix that enables buffer2image extension
authorkrodyush <konstantin.rodyushkin@intel.com>
Wed, 28 May 2014 06:34:11 +0000 (10:34 +0400)
committerkrodyush <konstantin.rodyushkin@intel.com>
Wed, 28 May 2014 06:34:11 +0000 (10:34 +0400)
modules/video/src/lkpyramid.cpp

index 4f0f313..f9d011b 100644 (file)
@@ -895,8 +895,8 @@ namespace cv
             int pitchAlign = (int)ocl::Device::getDefault().imagePitchAlignment();
             if (pitchAlign>0)
             {
-                prevPyr[0] = UMat(prevImg.rows,(prevImg.cols+pitchAlign-1)&(-pitchAlign),prevImg.type()).colRange(0,prevImg.cols);
-                nextPyr[0] = UMat(nextImg.rows,(nextImg.cols+pitchAlign-1)&(-pitchAlign),nextImg.type()).colRange(0,nextImg.cols);
+                prevPyr[0] = UMat(prevImg.rows,(prevImg.cols+pitchAlign-1)&(-pitchAlign),CV_32F).colRange(0,prevImg.cols);
+                nextPyr[0] = UMat(nextImg.rows,(nextImg.cols+pitchAlign-1)&(-pitchAlign),CV_32F).colRange(0,nextImg.cols);
                 for (int level = 1; level <= maxLevel; ++level)
                 {
                     int cols,rows;