Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

How to Create a GPU Mask and Fill It With A Scalar For an ROI

$
0
0
I am using OpenCV 3.0 with VS2012 C++/CLI on a Win 8.1 64 bit machine. In addition, I have an NVidia GTX 760 with CUDA 7.0. I am trying to detect SURF keypoints but only within an ROI. I got this working in non-GPU code and am now trying to do the same thing using the GPU implementation. In order to do that, I understand that I first need to create a mask filled with a background value (0) and then specify an ROI within the mask and fill that with another value (255). I then pass this mask in as part of the SURF call. The following code is supposed to create the mask and fill it with zeros. cuda::GpuMat tMask(dImages->d_gpuGrayFrame->size(), dImages->d_gpuGrayFrame->type()); tMask.setTo(Scalar::all(0)); This code causes an immediate crash. I have also tried specifying the type as CV_8U and that still causes a crash. Any idea on what is wrong? I am hoping that @Vladislav-Vinogradov might be monitoring as he appears to be a GPU guru. Thanks, James

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>