Ask Your Question

bvoid's profile - activity

2019-06-11 01:18:41 -0600 received badge  Famous Question (source)
2017-11-29 19:05:02 -0600 received badge  Notable Question (source)
2017-03-13 12:14:15 -0600 received badge  Popular Question (source)
2016-06-21 02:54:06 -0600 commented answer OpenCV 3.1 - Upper body detection not working in any example

Ok, so the training for pedestrians implies that a full pedestrian (from head to toes) should be visible before the upper body can be detected. It still surprises me that your code finds 2 hits while mine finds none. Are you willing to share it? Thank you :)

2016-06-21 02:53:38 -0600 answered a question OpenCV 3.1 - Upper body detection not working in any example

Ok, so the training for pedestrians implies that a full pedestrian (from head to toes) should be visible before the upper body can be detected. It still surprises me that your code finds 2 hits while mine finds none. Are you willing to share it? Thank you :)

2016-06-09 11:47:15 -0600 answered a question OpenCV 3.1 - Upper body detection not working in any example

I tried with OpenCV 3.0 but the problem persists.. Anybody?

2016-06-07 10:34:04 -0600 received badge  Editor (source)
2016-06-07 10:31:58 -0600 asked a question OpenCV 3.1 - Upper body detection not working in any example

My problem: no upper bodies are being detected when using haarcascade_profileface.xml or haarcascade_mcs_profileface.xml.

Software used:

  • print cv2._ _version__ yields 3.0.0 although the x86 version (cv2.pyd) of OpenCV 3.1 is used

  • Python 2.7 x86

  • Numpy 11.1.0 x86
  • Eclipse x86
  • Windows 7 x64

(I tried with all x64 version but upperbodies remain undetected)

The following code is used:

import numpy as np
import cv2

img = cv2.imread('723.jpg',0)

upperBody_cascade = cv2.CascadeClassifier('haarcascade_upperbody.xml')    

arrUpperBody = upperBody_cascade.detectMultiScale(img)
if arrUpperBody != ():
        for (x,y,w,h) in arrUpperBody:
            cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
        print 'body found'

cv2.imshow('image',img)
cv2.waitKey(0)
cv2.destroyAllWindows()

Result: no upper bodies detected: Result: no upper bodies detected

Using haarcascade _mcs_upperbody.xml also yields NO detection.

When other haarcascades (eye, nose, mouth, face_default) are used, detection works fine. (And similar code using a webcam stream shows the same behaviour) Result with HAAR facecascade

Does anyone have an idea what can be the issue here?