T - Type of DetectedFace.public class ScalingAligner<T extends DetectedFace> extends Object implements FaceAligner<T>
DetectedFace to a predefined size. Useful if your faces are already
aligned, but have different sizes.| Constructor and Description |
|---|
ScalingAligner()
Construct with the default target size of 100x100.
|
ScalingAligner(int width,
int height)
Construct the aligner with the given target size
|
| Modifier and Type | Method and Description |
|---|---|
FImage |
align(DetectedFace 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 ScalingAligner()
public ScalingAligner(int width, int height)
width - width of scaled facesheight - height of scaled facespublic FImage align(DetectedFace face)
FaceAligneralign in interface FaceAligner<T extends DetectedFace>face - the face to alignpublic FImage getMask()
FaceAlignergetMask in interface FaceAligner<T extends DetectedFace>public 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 out