Summary
In this chapter, we learned how to use OpenCV's face contrib
module and the cv::Facemark
API to detect facial landmarks in the image, and then use the landmarks with cv::solvePnP()
to find the approximate direction of the face. The APIs are simple and straightforward, but pack a powerful punch. With knowledge of landmark detection, many exciting applications can be implemented, such as augmented reality, face swap, identification, and puppeteering.