The example demonstrates how to use face landmarks in the projects. Following are the key steps happening:
- Initializing the program with parameters for the sprite, pen, and face detection library.
- Running face detection.
- Running the loop to show every landmark on the face.
Code
sprite = Sprite('Ball')
fd = FaceDetection()
import time
pen = Pen()
pen.clear()
sprite.setsize(10)
fd.enablebox()
fd.analysestage()
for i in range(68):
sprite.setx(fd.landmarksx(1, i+1))
sprite.sety(fd.landmarksy(1, i+1))
pen.stamp()
time.sleep(0.2)
Output