@Override public FImage align(KEDetectedFace descriptor) { final float scalingX = P2.getX() / descriptor.getFacePatch().width; final float scalingY = P2.getY() / descriptor.getFacePatch().height; final Matrix tf0 = TransformUtilities.scaleMatrix(scalingX, scalingY); final Matrix tf = tf0.inverse(); final FImage J = FKEFaceDetector.pyramidResize(descriptor.getFacePatch(), tf); final FImage smallpatch = FKEFaceDetector.extractPatch(J, tf, 80, 0); return getWarpedImage(descriptor.getKeypoints(), smallpatch, tf0); }