ImageEn, unit IEVision

TIEVisionDetectedFace.getRollAngle

TIEVisionDetectedFace.getRollAngle

Declaration

function getRollAngle(): Double; safecall;

Description

Returns the angle, in degrees, of the line between the two eyes. 0 means the eyes are level.
A positive value means the eye on the right of the image is lower (the head is tilted clockwise).
Rotating the image counter-clockwise by this angle levels the face.
The angle is accurate to about 3 degrees for faces tilted up to 60 degrees (with setRefineLandmarks enabled, the default). Without refinement it is underestimated for strongly tilted faces (about 15 degrees for a face tilted by 20 degrees).

Example

// Level a portrait using the eye line of the first face
face := TIEVisionDetectedFace( faces.getObj( 0 ));
ImageEnView1.Proc.Rotate( face.getRollAngle() );