Set a portion of gpuMat

asked 2017-01-18 17:42:52 -0500

aoatoa gravatar image

I am converting some cv::Mat objects into cv::cuda::GpuMat but running into some issues with setting a portion of the matrix.

My old code used to be: rmap_warp(cv::Rect(0, 0, 200 / 4, 700 / 4)) = 0;

With the GpuMat I am trying something like: cv::cuda::GpuMat rmap_warp; cv::cuda::GpuMat setMask; setMask = rmap_warp(cv::Rect(0, 0, 200 / 4, 700 / 4)); rmap_warp.setTo(0, setMask);

This is not correct because setMask will only be the 175x22 instead of the rmap_warp. Is it possible to create a mask out of an image easily?


edit retag flag offensive close merge delete