Yes, you can do it easily with OpenCV's built-in Haar classifiers, and you will find many demos and tutorials on the Internet for this. You do not need to find the position of Z, just the size of the face. More important for you will be the position for the eyes - and for this there are Haar classifiers. You can find the area of ββthe face, and then find the areas of the eyes in that region, and you will have a very good basis for positioning the overlay points on this topic. There are many settings to speed up the process, for example, downsampling and instructing the classifier to search for only one face. Good luck.
source share