gpu hog.computeConfidenceMultiScale throws Assertion failed error

asked 2015-04-07 21:12:56 -0500

crd319 gravatar image

I'm trying to utilize the gpu functionality to speed up processing of images when testing people detection using HOG detectors. To start with, I've been trying to use the standard HOG people detector built into OpenCV but once I started trying to get out Confidence metrics from the program, it fails with the error:

OpenCV Error:Assertion failed (_rows >=0 && _cols >=0) in cv::gpu::GpuMat::create, file ..\..\source\modules\core\src\gpumat.cpp, line 693

Relevant Code:

Mat img;
gpu::HOGDescriptor hog(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9);
vector<Rect> foundFull;
vector<gpu::HOGConfidence> fullConf;
  sequence >> img;
  cv::cvtColor(img, img, CV_BGR2GRAY);
  gpu::GpuMat gpuImg;
  hog.computeConfidenceMultiScale(gpuImg, foundFull, 0, Size(8,8), Size(8,8), fullConf, 2);

The method calls for detectMultiScale work fine, but don't have a mode that returns confidence metrics, which are necessary for my project. Does anyone have any idea as to what I might be doing wrong? This is highly time critical, so any guidance would be appreciated.


edit retag flag offensive close merge delete