Ask Your Question

ClaudioF's profile - activity

2017-08-18 07:41:05 -0600 commented question cuda::GpuMat using too much memory

Are there any updates on this matter?

2017-04-03 08:56:33 -0600 received badge  Teacher (source)
2017-04-03 05:30:24 -0600 received badge  Necromancer (source)
2017-04-03 05:30:24 -0600 received badge  Self-Learner (source)
2017-04-03 05:06:13 -0600 received badge  Scholar (source)
2017-04-03 05:05:47 -0600 answered a question Is cuda::HOG working with cuda::Stream?

Following this merged PR, it is now possible to use cuda::Stream with cuda::HOG compiling and installing the master branch of OpenCV.

Future official release (>3.2) will include this new feature.

2017-03-27 04:19:07 -0600 commented question Is cuda::HOG working with cuda::Stream?

I submitted a new PR to account for this issue.

2017-02-10 06:41:43 -0600 commented question Is cuda::HOG working with cuda::Stream?

I just posted a new issue on GitHub about this, also proposing a possible solution.

2017-02-09 04:07:51 -0600 received badge  Enthusiast
2017-02-03 03:23:23 -0600 received badge  Supporter (source)
2017-02-02 21:43:26 -0600 received badge  Student (source)
2017-02-02 15:30:49 -0600 received badge  Editor (source)
2017-02-02 12:15:09 -0600 asked a question Is cuda::HOG working with cuda::Stream?

Hi everyone,

I'm trying to use cuda::HOG asynchronously by means of the cuda::Stream.

In particular, I'm trying to use the method compute which seems to provide such capability. Unfortunately, however, when passing a cuda::Stream invoking the function I get the following error:

OpenCV Error: Assertion failed (!stream) in compute, file /tmp/opencv3-20170201-80029-q1jvsi/opencv-3.2.0/modules/cudaobjdetect/src/hog.cpp, line 461

which points to a

CVAssert(!stream)

in the above mentioned hog.cpp file.

Here is a simplified snippet of the code I'm trying to run:

/* Suppose to have: using namespace cv and using namespace cv::cuda*/

Mat      img;
GpuMat   cuda_img;
GpuMat   cuda_img_alpha;
GpuMat   cuda_descriptors;
Stream   stream[10];
Ptr<HOG> cuda_hog_ = HOG::create(Size(320, 240), Size(16, 16), Size(8, 8), Size(8, 8), 9);

for (int i = 0; i < 10; ++i)
{
    ...
    /* I have stored an RGB image in img */

    cuda_img.upload(img, stream[i]);
    cuda::cvtColor(cuda_img, cuda_img_alpha, COLOR_BGR2BGRA, 4, stream[i]);
    cuda_hog->compute(cuda_img_alpha, cuda_descriptors, stream[i]);
}

Everything goes smoothly in both upload and cvtColor, but the assertion is raised within HOG::compute().

Is anyone aware whether it is still an unimplemented feature or I'm doing something wrong?