Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

OpenCV 3.1 - Upper body detection not working in any example

$
0
0
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](http://pic80.picturetrail.com/VOL952/7205667/23849157/412575810.jpg) 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](http://pic80.picturetrail.com/VOL952/7205667/23849157/412575809.jpg) Does anyone have an idea what can be the issue here?

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>