Loading...
Logo
Processing Forum
Human bodies, that is!

I've used the OpenCV library for several projects using face detection to great effect.  But I'm trying to get lower body detection working, to no avail.  Specifically, I'm using the lower body profile, as in:

Copy code
  1.   opencv.cascade(OpenCV.CASCADE_LOWERBODY);
Does anyone else have experience with OpenCV for lower/upper/full body detection?  I'm not able to get it to identify anything, no matter how much I tweak my room lighting, contrast, brightness, etc.  Thanks!

Replies(8)

Human bodies are much more difficult to detect than front human face using the OpenCV haar detector.
Human face has a nice structure, which is more suitable for haar detector.
But human body is not, it's more complex and background scene greatly affects the detection.
It is the truth.
Basically I can give no instruction on this issue.


i was just working on this yesterday as i am preparing a workshop about this topic...

did you use some other haarcascade files to tracking other parts than your face ?
i found some, and they all worked pretty well...
i uploaded them for you

http://db.tt/ptDGTOn

but know as this topic came up, does somebody know a good haarcascade collection or database ?

And another question, maybe you can already answer scmurray.
Did you find a good way to track the face but get points for the eyes, nose and mouth as well? the standart opcenCV Face detection only returns the whole face...
one way would be to combine different haarcascade files in one sketch but i am wondering if there is a better way to do this.


I managed to get rough-and-ready eye and mouth tracking starting from face detection: just by making some assumptions about where those features would appear within the detected face and doing some blob detection.  This was accurate enough for my purposes :)

I didn't figure out how to combine different haarcascade files: made a couple of attempts, but it seems less straightforward than I would have expected and I was working on a short deadline so didn't persevere...  I might clean up my original code and post it somewhere; though I'm painfully aware that there are plenty of people out there who will have a much better understanding of how to do this :/
guessing where they might appear was one of my thoughts, probably works in most cases as eyes and mouth rarely change their position :) but it probably wont work when people start to tilt their heads to the left or right... also it would be nice to track the mimics somehow, position of the eyebrows, or size of the mouth etc...

I just set a bounding rectangle over each area where I expected a feature - making it large enough to allow for tilitng heads - and constrained a separate blob detection routine in each one.  For me the main issue with side-to-side tilting of the head was that the haarcascade file I was using failed to recognise a face once it went past a certain angle.  My blob-detection rectangles still contained the features up to the point the face was lost...

The Processing library on Windows still uses a fairly old version of openCV.  Do you happen to know what functionality we're missing out on because of this?
hmm you are right, it still uses openCV 1, but version 2.1 is already available...
would be nice if there would ever be an update of the processing library to make use of some of the new features.
Thanks, everyone.  Thanks, cedrickiefer, for the cascade files.  I'm using the OpenCV for Processing library, and I'm not sure how to plug those into it, but I'll experiment.  For the current project, I gave up and used face tracking, then estimated where the user's lower body would be (if they are standing normally in front of the camera).
Hey guys, 

Just posted some relevant information about plugging in custom cascades, over hear on another thread:

I was able to use some found frontal eyes cascade, as well as others found here: