indexy += sz.height;
}
- if(Context::getContext()->supportsFeature(FEATURE_CL_DOUBLE))
+ if(gsqsum_t.depth() == CV_64F)
gsqsum_t.convertTo(gsqsum, CV_32FC1);
else
gsqsum = gsqsum_t;
cv::ocl::integral(resizeroi, gimgroi, gimgroisq);
indexy += sz.height;
}
- if(Context::getContext()->supportsFeature(FEATURE_CL_DOUBLE))
+ if(gsqsum_t.depth() == CV_64F)
gsqsum_t.convertTo(gsqsum, CV_32FC1);
else
gsqsum = gsqsum_t;
else
{
cv::ocl::integral(gimg, gsum, gsqsum_t);
- if(Context::getContext()->supportsFeature(FEATURE_CL_DOUBLE))
+ if(gsqsum_t.depth() == CV_64F)
gsqsum_t.convertTo(gsqsum, CV_32FC1);
else
gsqsum = gsqsum_t;
buf.image_sums.resize(1);
buf.image_sqsums.resize(1);
integral(image.reshape(1), buf.image_sums[0], temp);
- temp.convertTo(buf.image_sqsums[0], CV_32FC1);
+ if(temp.depth() == CV_64F)
+ temp.convertTo(buf.image_sqsums[0], CV_32FC1);
+ else
+ buf.image_sqsums[0] = temp;
unsigned long long templ_sqsum = (unsigned long long)sqrSum(templ.reshape(1))[0];
Context *clCxt = image.clCxt;
{
buf.image_sums.resize(1);
buf.image_sqsums.resize(1);
- integral(image, buf.image_sums[0], buf.image_sqsums[0]);
+ cv::ocl::oclMat temp;
+ integral(image, buf.image_sums[0], temp);
+ if(temp.depth() == CV_64F)
+ temp.convertTo(buf.image_sqsums[0], CV_32FC1);
+ else
+ buf.image_sqsums[0] = temp;
templ_sum[0] = (float)sum(templ)[0];
templ_sum *= scale;
buf.image_sums.resize(buf.images.size());
buf.image_sqsums.resize(buf.images.size());
-
+ cv::ocl::oclMat temp;
for(int i = 0; i < image.oclchannels(); i ++)
{
- integral(buf.images[i], buf.image_sums[i], buf.image_sqsums[i]);
+ integral(buf.images[i], buf.image_sums[i], temp);
+ if(temp.depth() == CV_64F)
+ temp.convertTo(buf.image_sqsums[i], CV_32FC1);
+ else
+ buf.image_sqsums[i] = temp;
}
switch(image.oclchannels())