[ACCEPTED]-Head (and shoulder) detection using OpenCV-opencv
Look at all the Haar boosted classifiers 8 that are available with OpenCV and the dedicated 7 class CascadeClassifier
to use it. Here are a list of what 6 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 5 may be of special interest to you. Try those 4 as a start for your project. As Alessandro Vermeulen commented, head 3 detection classifiers may also be interesting, as 2 what they find is usely connected to shoulders 1 :-)
You can as well create your own cascade 12 classifier to detect heads. The upper body 11 is not the head at all, but just heads is 10 not that accurate. You need to crop several 9 number of positive samples and negative 8 ones. Prepare list of these example in text.txt, opencv_createsamples.exe(prepare 7 input vector for training) and use opencv_traincascade.exe 6 command line utility to create opencv classifier 5 for cascade detect multiscale. It is easy 4 but the creating the dataset is time consuming. My 3 head LBP cascade is available here for free 2 download link to my blog for head, car and people cascade . It is compatible with detectMultiscale, but 1 not that accurate.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.