O'Reilly logo

OpenCV By Example by Vinícius Godoy, David Millán Escrivá, Prateek Joshi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

Tracking your nose, mouth, and ears

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!

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required