fix the blend crash in some cases
authoryao <bitwangyaoyao@gmail.com>
Thu, 28 Feb 2013 01:03:10 +0000 (09:03 +0800)
committeryao <bitwangyaoyao@gmail.com>
Thu, 28 Feb 2013 01:03:10 +0000 (09:03 +0800)
modules/ocl/src/blend.cpp

index 5eead47..ed4a400 100644 (file)
@@ -74,7 +74,7 @@ void cv::ocl::blendLinear(const oclMat &img1, const oclMat &img2, const oclMat &
     size_t localSize[] = {256, 1, 1};
 
     vector< pair<size_t, const void *> > args;
-
+    result.create(img1.size(), CV_MAKE_TYPE(depth,img1.channels()));
     if(globalSize[0] != 0)
     {
         args.push_back( make_pair( sizeof(cl_mem), (void *)&result.data ));