Opencv 3 - python detectmultiscale; too many values to upack
I'm trying to get access to either numDetections or rejectLevels and levelWeights so that I can judge confidence levels for each object detected by the cascade classifier. When I try:
faces, num_detections = faceCascade.detectMultiScale(
gray,
scale_factor = 3,
minNeighbors = 3,
minSize = (30, 30)
)
I get the error "too many values to unpack"
when I try
faces, reject_levesl, level_weights = faceCascade.detectMultiScale(
gray,
scale_factor = 3,
minNeighbors = 3,
minSize = (30, 30),
outputRejectLevels = True
)
I get the error outputRejectLevels is an invalid keyword argument for this function. Am I doing something horribly wrong? I'm running the current beta version of Opencv 3 and am on Arch linux. When I try and run the classifier normally it works like a charm. Any help greatly appreciated!
looking at
it seems like you're just getting faces (and nothing else) back, and there's no outputRejectLevels argument.