UMat src = _src.getUMat(), t_sum(t_size, sdepth), sum = _sum.getUMat();
t_sum = t_sum(Range::all(), Range(0, size.height));
- int offset = src.offset / vlen, pre_invalid = src.offset % vlen;
+ int offset = (int)src.offset / vlen, pre_invalid = (int)src.offset % vlen;
int vcols = (pre_invalid + src.cols + vlen - 1) / vlen;
- int sum_offset = sum.offset / vlen;
+ int sum_offset = (int)sum.offset / vlen;
k1.args(ocl::KernelArg::PtrReadOnly(src), ocl::KernelArg::PtrWriteOnly(t_sum),
offset, pre_invalid, src.rows, src.cols, (int)src.step, (int)t_sum.step);
_sqsum.create(dsize, sqdepth);
UMat sum = _sum.getUMat(), sqsum = _sqsum.getUMat();
- int offset = src.offset / vlen;
+ int offset = (int)src.offset / vlen;
int pre_invalid = src.offset % vlen;
int vcols = (pre_invalid + src.cols + vlen - 1) / vlen;
- int sum_offset = sum.offset / sum.elemSize();
- int sqsum_offset = sqsum.offset / sqsum.elemSize();
- CV_Assert(sqsum.offset % sqsum.elemSize() == 0);
+ int sum_offset = (int)(sum.offset / sum.elemSize());
+ int sqsum_offset = (int)(sqsum.offset / sqsum.elemSize());
k1.args(ocl::KernelArg::PtrReadOnly(src), ocl::KernelArg::PtrWriteOnly(t_sum),
ocl::KernelArg::PtrWriteOnly(t_sqsum), offset, pre_invalid, src.rows,
Mat B = Mat(size, size0, CV_32FC1);
for(int i =0;i < size;i++)
{
- for(int j = 0, end = Cg.size(); j < end;j++)
+ for(int j = 0, end = (int)Cg.size(); j < end;j++)
B.at<float>(i,j) = (float) (poly[i][j] * Cg[j]);
}