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: .. figure:: img/mouth-128-65.png :align: center :alt: alternate text :figclass: align-center Height of 128, distance of 65 pixels between left and right | .. figure:: img/mouth-64-65.png :align: center :alt: alternate text :figclass: align-center Height of 64, distance of 65 pixels between left and right | .. figure:: img/mouth-64-100.png :align: center :alt: alternate text :figclass: align-center Height of 64, distance of 100 pixels between left and right The code to produce the last example is: .. code-block:: python mouth_image = \ crop_mouth_from_landmarks(frame, landmarks, mouth_size = 100, crop_size = (64, 128), mouth_center = (32, 64))