O'Reilly logo

Learn OpenCV 4 by Building Projects - Second Edition by Prateek Joshi, Vinicius G. Mendonca, David Millan Escriva

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 the 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 too. Let's use a nose detector to overlay a funny nose:

You can refer to the code files for a full implementation of this detector. The haarcascade_mcs_nose.xml, haarcascade_mcs_mouth.xml, haarcascade_mcs_leftear.xml, and haarcascade_mcs_rightear.xml cascade files can be used to track the different face parts. Play around with them and try to overlay a mustache 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