A guide to use the SAVI package¶
Function crop_mouth_from_landmarks()
¶
Function crop_mouth_from_landmarks()
uses bob.ip.base.FaceEyesNorm
to normalise an image crop of a mouth bounding box. It takes as input
- mouth_size: the distance between the left and right part of the mouth
- crop_size: the size of the output image
- mouth_center: the coordinates of the center of the mouth in the output image.
Some examples:
The code to produce the last example is:
mouth_image = \
crop_mouth_from_landmarks(frame,
landmarks,
mouth_size = 100,
crop_size = (64, 128),
mouth_center = (32, 64))