}
CV_Assert(src1.step % src1.elemSize() == 0 && (src2.empty() || src2.step % src2.elemSize() == 0));
+ if (src2.empty() && (src1.depth() == CV_8U || src1.depth() == CV_16U))
+ {
+ src1.convertTo(diff, CV_32S);
+ return;
+ }
+
int ddepth = std::max(src1.depth(), CV_32S);
if (ntype == NORM_L2)
ddepth = std::max<int>(CV_32F, ddepth);
args.push_back( make_pair( sizeof(cl_int), (void *)&src2offset1 ));
kernelName += "_binary";
+ buildOptions += " -D BINARY";
}
args.push_back( make_pair( sizeof(cl_mem), (void *)&diff.data ));
#endif
#endif
+#ifdef BINARY
+
__kernel void arithm_absdiff_nonsaturate_binary(__global srcT *src1, int src1_step, int src1_offset,
__global srcT *src2, int src2_step, int src2_offset,
__global dstT *dst, int dst_step, int dst_offset,
}
}
+#else
+
__kernel void arithm_absdiff_nonsaturate(__global srcT *src1, int src1_step, int src1_offset,
__global dstT *dst, int dst_step, int dst_offset,
int cols, int rows)
}
}
}
+
+#endif