Updated by Kirill Kornyakov over 12 years ago
I have not tested with other data types. Here is code:
<pre>
GpuMat dst;
Size s = Size(x, y);
if (gpu) {
gpu::resize(src, dst, s, 0, 0, INTER_CUBIC);
} else {
Mat m = Mat(src);
Mat m2;
resize(m, m2, s, 0, 0, INTER_CUBIC);
dst = GpuMat(m2);
}
</pre>
Resulting image have alpha applied at all image (i guess ~50%). If i do with cpu method image is ok.
<pre>
GpuMat dst;
Size s = Size(x, y);
if (gpu) {
gpu::resize(src, dst, s, 0, 0, INTER_CUBIC);
} else {
Mat m = Mat(src);
Mat m2;
resize(m, m2, s, 0, 0, INTER_CUBIC);
dst = GpuMat(m2);
}
</pre>
Resulting image have alpha applied at all image (i guess ~50%). If i do with cpu method image is ok.