I am trying to use Viola–Jones face detection algorithm in OpenCV. I use the detectMultiScale()
to locate multiple faces in image. I am wondering how is it possible to return from the source code or to calculate a confidence factor for the face that are calculated. It seems that by default detectMultiScale()
function doesn't return a conf factor.
There is no confidence score to return but you can set how confident you want by setting minNeighbors
. The higher, the better quality, also the less faces.
Edit: If you use Python, you can modify the quality by setting rejectLevels
.
Python: cv2.CascadeClassifier.detectMultiScale(image, rejectLevels,
levelWeights[, scaleFactor[, minNeighbors[, flags[, minSize[, maxSize[,
outputRejectLevels]]]]]]) → objects