简体   繁体   中英

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

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

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM