How to get the confidence level of detectMultiScale in "Python" OpenCV?

986 views Asked by At

I was working on my research and currently stuck on this. I can't get the confidence level AT ALL. I've tried many commands, such as:

outputRejectLevels = "levelWeights"
outputRejectLevels = "objects"
outputRejectLevels = "rejectLevels"
outputRejectLevels = True
outputRejectLevels = "true"

but I always get

TypeError: 'outputRejectLevels' is an invalid keyword argument for this function`

I have no idea how to do it

1

There are 1 answers

0
Kashif Iftikhar On BEST ANSWER

As said by @Sax Ted:

This can be fixed using detectMultiScale3() as following:

detection_result, rejectLevels, levelWeights =cascade.detectMultiScale3(img, scaleFactor=1.0485258, minNeighbors=6,outputRejectLevels = 1)

print(rejectLevels)
print(levelWeights)
print(detection_result)

For more details related to detectmultiScale(), you can Visit here.