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

Error in SURF GPU using ROI?

$
0
0
I am using VS2012 C++/CLI on a Win 8.1 64 bit machine with OpenCV 3.0. I am trying to implement the GPU version of SURF. When I do not specify an ROI, I have no problem. Thus, the following line gives no problem and detects keypoints in the full image: surf(*dImages->d_gpuGrayFrame,cuda::GpuMat(),Images->SurfKeypoints); However, efforts to specify an ROI cause a crash. For example, I specify the ROI by Top,Left and Bottom,Right coordinates (which I know work in non-GPU code). In the GPU code, the following causes a crash: int theight = (Images->LoadFrameClone.rows-Images->CropBottom) - Images->CropTop -1; int twidth = (Images->LoadFrameClone.cols-Images->CropRight)-Images->CropLeft -1; Rect tRect = Rect(Images->CropLeft,Images->CropTop,twidth-1,theight-1); cuda::GpuMat tmask = cuda::GpuMat(*dImages->d_gpuGrayFrame,tRect); surf(*dImages->d_gpuGrayFrame,tmask,Images->SurfKeypoints); // fails on this line I know that tmask is non-zero in size and that the underlying image is correct. As far as I can tell, the only issue is specifying an ROI in the SURF GPU call. Any leads on why this may be happening? Thanks

Viewing all articles
Browse latest Browse all 41027

Trending Articles



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