1 | initial version |
I found out what was happening. When I passed empty objsGPU to detectMultiScale than it will allocate place for 100 detections:
const int defaultObjSearchNum = 100;
if (objectsBuf.empty())
{
objectsBuf.create(1, defaultObjSearchNum, DataType<Rect>::type);
}
And further if number of detection more than allocated then assertion described above happens. So if I allocate memory for detections
objsGPU.create(1, 10000, cv::DataType<cv::Rect>::type);
everything will work