1

I am using following values to detect face using OpenCv, but result is not accurate for all images

faces = faceCascade.detectMultiScale(
    gray,
    scaleFactor=1.1,
    minNeighbors=5,
    minSize=(30, 30),
    flags = cv2.cv.CV_HAAR_SCALE_IMAGE
)
Wilt
  • 41,477
  • 12
  • 152
  • 203
Tushar
  • 616
  • 3
  • 9
  • 1
    the typical face detectors have a training size of 25x25 afair (look at the xml file of your detector). So to increase this by 1 pixel for the first step you would need scale factor of 1.04 . However I dont know whether scaling is n*scale or scale^n for iteration n. – Micka Feb 10 '16 at 06:37
  • 1
    try by changing `minNeighbours = 3` – Sagar Patel Feb 10 '16 at 07:02
  • 1
    possible duplicates http://stackoverflow.com/questions/22249579/opencv-detectmultiscale-minneighbors-parameter – Sagar Patel Feb 10 '16 at 07:03

1 Answers1

0

for higher accuracy, I would use a scaleFactor = 1.05. i.e 5% increment in each iteration

  • Welcome to SO! when you reply to a question, just explain a little bit. In your case, you are just exposing to use a different scale factor (1.05 vs 1.10) but, why? – David García Bodego Oct 31 '19 at 03:21