public class CLMAligner extends Object implements FaceAligner<CLMDetectedFace>
CLMDetectedFace to the neutral pose
(reference shape) of the CLMFaceDetector.Configuration.| Constructor and Description |
|---|
CLMAligner()
Construct a new
CLMAligner using the default
CLMFaceDetector.Configuration and default size of 100 pixels. |
CLMAligner(int size)
Construct a new
CLMAligner using the default
CLMFaceDetector.Configuration and given size for the aligned output image. |
| Modifier and Type | Method and Description |
|---|---|
FImage |
align(CLMDetectedFace face)
For the provided face detection, return an aligned version of the face.
|
byte[] |
binaryHeader()
Header for binary input.
|
FImage |
getMask()
Return a mask image for aligned faces.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
public CLMAligner()
CLMAligner using the default
CLMFaceDetector.Configuration and default size of 100 pixels.public CLMAligner(int size)
CLMAligner using the default
CLMFaceDetector.Configuration and given size for the aligned output image.size - the output facial patch sizepublic void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryin - source to read from.IOException - an error reading inputpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinaryout - sink to write toIOException - an error writing to outpublic FImage align(CLMDetectedFace face)
FaceAligneralign in interface FaceAligner<CLMDetectedFace>face - the face to alignpublic FImage getMask()
FaceAlignergetMask in interface FaceAligner<CLMDetectedFace>