Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

why value of levelWeights given by CascadeClassifier::detectMultiScale can be negative?

I am using CascadeClassifier::detectMultiScale of Opencv4 to do some eye detection. One thing drives me crazy is that the output of levelWeights can be negative. I understand that it is not normalized and thus can be any value higher than 0, but how to understand a levelWeight value of negative? According to the document, levelWeight array contains the weighted sum of the weak classifiers for the last level, whether accepted or rejected. Since the output arrays contains only accepted rectangles, I assume that the output levelWeight contains also weights of accepted rects classified as detected targets. In that sense, how would a negative weight work? Ar the absolute values used?