Skip to main content

align_face_112

Function align_face_112 

Source
pub fn align_face_112(
    image: &DynamicImage,
    landmarks: &[(f32, f32); 5],
) -> Option<RgbImage>
Expand description

Warp a source image onto the 112x112 canonical face template using the given 5-point landmarks. Bilinear sampling, black fill for out-of-bounds.

Returns None only if the landmarks are degenerate (e.g. all collinear or coincident), which signals a bad detection that should be rejected.