HOG CUDA function setGroupThreshold()

Hello all,
I am trying to setGroupThreshold() to 1 in the HOG CUDA function using the instruction:

hog.setGroupThreshold(1)

However, it returns an error. on detectMultiscale function opencv_contrib/modules/cudaobjdetect/src/hog.cpp -215 assertion failed confidences == NULL || group_threshold_ == 0
Knowing that this instruction sets a coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping (source OpenCV CUDA docs).
Scrolling the hog.cpp I found:

CV_Assert( confidences == NULL || group_threshold_ == 0 );

on line 416

Does that mean that this non-maximum impression technique is not implemented on OpenCV CUDA?
Could someone confirm it?
Thanks in advance for your help.

The docs imply that you should use groupRectangles

1 Like

Hi James,
Thank you very much for your help.
I think that since the results of detection are automatically saved on the CPU, the similar bounding box grouping should happen on the CPU.

1 Like