Tracking your nose, mouth, and ears
Now that you know how to track different things using the framework, you can try tracking your nose, mouth, and ears as well. Let's use a nose detector to overlay a funny nose on top:
You can refer to the code files for a complete implementation of this detector. There are cascade files called haarcascade_mcs_nose.xml
, haarcascade_mcs_mouth.xml
, haarcascade_mcs_leftear.xml
, and haarcascade_mcs_rightear.xml
that can be used to track the different face parts. So, you can play around with them and try to overlay a moustache or Dracula ears on yourself!