Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Head (and shoulder) detection using OpenCV

Tags:

opencv

(Appology in advance if I am asking a too nwbie question. I am a beginner with OpenCV. I have done some tutorials yet I have not a good grasp of it's concepts.)

Question: How to do head detection (not face detection) using OpenCV - For example in a photo of inside a bus or a room?

Note: I do not want to do face detection; just head detection to figure out number of people in the photo. Unfortunately - for me - those tutorials and documents that I'v found are about face detection and not head detection.

Thank you

like image 827
Kaveh Shahbazian Avatar asked Apr 20 '11 06:04

Kaveh Shahbazian


1 Answers

Look at all the Haar boosted classifiers that are available with OpenCV and the dedicated class CascadeClassifier to use it. Here are a list of what the classifiers have locally:

  • haarcascade_eye.xml
  • haarcascade_lefteye_2splits.xml
  • haarcascade_mcs_righteye.xml
  • haarcascade_eye_tree_eyeglasses.xml
  • haarcascade_lowerbody.xml
  • haarcascade_mcs_upperbody.xml
  • haarcascade_frontalface_alt.xml
  • haarcascade_mcs_eyepair_big.xml
  • haarcascade_profileface.xml
  • haarcascade_frontalface_alt2.xml
  • haarcascade_mcs_eyepair_small.xml
  • haarcascade_righteye_2splits.xml
  • haarcascade_frontalface_alt_tree.xml
  • haarcascade_mcs_lefteye.xml
  • haarcascade_upperbody.xml
  • haarcascade_frontalface_default.xml
  • haarcascade_mcs_mouth.xml
  • haarcascade_fullbody.xml
  • haarcascade_mcs_nose.xml

The two I bolded may be of special interest to you. Try those as a start for your project. As Alessandro Vermeulen commented, head detection classifiers may also be interesting, as what they find is usely connected to shoulders :-)

like image 76
Stéphane Péchard Avatar answered Sep 23 '22 06:09

Stéphane Péchard