Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There is no implicit conversion from GpuMat to Mat. Use upload/download methods, or explicit constructors:

cv::Mat host_mat = imread("pic.png");
cv::gpu::GpuMat gpu_mat(host_mat);
cv::gpu::GpuMat gpu_edges;
cv::gpu::Canny(gpu_mat, gpu_edges, 50, 100);
cv::Mat host_edges;
gpu_edges.download(host_edges);