CUDA HaarCascade stream assertion
Hi,
HaarCascade detectMultiScale function accepts a cuda::Stream, and the code seems to use it. But there is an assertion that expects a null stream.
CV_Assert( !stream );
Is the use of streams in cuda haar cascade not supported yet? or its a bug?
void HaarCascade_Impl::detectMultiScale(InputArray _image,
OutputArray _objects,
Stream& stream)
{
const GpuMat image = _image.getGpuMat();
CV_Assert( image.depth() == CV_8U);
CV_Assert( scaleFactor_ > 1 );
CV_Assert( !stream );
Size ncvMinSize = getClassifierSize();
if (ncvMinSize.width < minObjectSize_.width && ncvMinSize.height < minObjectSize_.height)
{
ncvMinSize.width = minObjectSize_.width;
ncvMinSize.height = minObjectSize_.height;
}
BufferPool pool(stream);
GpuMat objectsBuf = pool.getBuffer(1, maxNumObjects_, DataType<Rect>::type);
unsigned int numDetections;
ncvSafeCall( process(image, objectsBuf, ncvMinSize, numDetections) );
if (numDetections > 0)
{
objectsBuf.colRange(0, numDetections).copyTo(_objects);
}
else
{
_objects.release();
}
}
Thanks in advance!
I have the same problem in cv::cuda::HOG::compute. I suspect that the multi-stream functionality is still not supported by openCV libraries.