Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unable to get HOG confidence using GPU implementation (OpenCV 3)

I am confused at how to get the confidence level when using HOG GPU implementation in OpenCV 3.

According to OpenCV 3.1 cv::cuda::HOG::detectMultiScale Documentation, code replicated below:

virtual void
cv::cuda::HOG::detectMultiScale(InputArray img,
                            std::vector<Rect>& found_locations,
                            std::vector<double>* confidences = NULL)

You can pass a pointer to the third argument confidences. I've tried it but got OpenCV Error: Assertion failed (confidence == NULL || group_threshold_ == 0).

Looking at the actual implementation (hog.cpp:385), it is checking the confidences and only allowing a NULL parameter (code replicated below):

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

The same question has also been asked on StackOverflow and hasn't been addressed. Please advice.