I have a small rendered image with alpha channel as
GpuMat with type
CV_8UC4. I have many
GpuMat instances with 3 channels as
CV_8UC3. I want to blit this RGBA to every other image's top left corner respecting the aplha channel correctly.
GpuMat icon = renderLogoWithTransparency(); // CV_8UC4
std::vector<GpuMat> &images = imageLibrary(); // CV_8UC3
for(auto &image: images)
The resulting error is:
OpenCV Error: Assertion failed (!fixedType() || ((cuda::GpuMat*)obj)->type() == mtype) in create, file /root/opencv/modules/core/src/matrix.cpp, line 2260
Which seems rightful as
copyTo is for simple copying and I want color blending. How can I do the blending without downloading from GPU to main memory?