Facial recognition

Face recognition is another improvement that can be used to highlight the human face in a video output. This can be further improved to identify the correct person by matching the human face with a pre-built database.

In this chapter, we are going to use Haar-like features to encode the contrasts highlighted by the human face and its spatial relations with other objects present in the picture. Usually, these features are extracted using a cascade classifier, which has to be trained in order to recognize different objects with precision. A pre-trained classifier for face recognition can be found at https://github.com/opencv/opencv/tree/master/data/haarcascades in the OpenCV GitHub repository as listed following:

  • haarcascade_frontalcatface.xml ...

Get Raspberry Pi 3 Projects for Java Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.