In Chapter 3, Home Security Applications, we created a new application named Gazer, with which we can capture video and detect motion from the webcams attached to our computers. In this chapter, we will continue playing with our webcams—instead of detecting motion, we will create a new application that is able to detect faces using our camera. First, we will detect the faces in our webcams. Then, we will detect the facial landmarks on the detected faces. With these facial landmarks, we can know where the eyes, the nose, the mouth, and the cheeks are on each detected face so that we can apply some funny masks onto the faces.
The following topics will be covered in this chapter:
- Taking photos from webcams
- Detecting faces using OpenCV
- Detecting facial landmarks using OpenCV
- The resource system of the Qt library
- Applying masks on faces