public class OCVFaceKey extends FaceKey
FaceKey.FaceLandmark
Modifier | Constructor and Description |
---|---|
protected |
OCVFaceKey(BinaryInput input,
BinarySerializator serializator)
Creates a new instance of FaceKey loaded from binary input.
|
|
OCVFaceKey(java.lang.String stringData)
Creates a new OCVFaceKey from the given string data.
|
Modifier and Type | Method and Description |
---|---|
int |
binarySerialize(BinaryOutput output,
BinarySerializator serializator)
Binary-serialize this object into the
output . |
int |
getBinarySize(BinarySerializator serializator)
Returns the exact size of the binary-serialized version of this object in bytes.
|
int |
getCenterX()
Returns the x-coordinate (in pixels) of the face center point
in the
source image . |
int |
getCenterY()
Returns the y-coordinate (in pixels) of the face center point
in the
source image . |
java.awt.Shape |
getContour()
Returns the face contour in the
source image . |
java.lang.String |
getFaceIdentifierLocatorURI()
Returns the face identifier from the locatorURI as specified by the respective face key implementation.
|
int |
getHeight()
Returns the face height in pixels in the
source image . |
java.awt.geom.Point2D |
getLandmarkPosition(FaceKey.FaceLandmark landmark)
Returns the position of the given face landmark.
|
float |
getRollAngle()
Returns the face roll angle in degrees in the
source image . |
java.lang.String |
getSourceImageLocatorURI()
Returns the locator URI of the source image this face was extracted from.
|
int |
getWidth()
Returns the face width in pixels in the
source image . |
float |
getYawAngle()
Returns the face yaw angle in degrees in the
source image . |
protected void |
writeData(java.io.OutputStream stream)
Store this key's data to a text stream.
|
clone, clone, drawFaceContour, drawFaceContour, drawFaceLabel, drawFaceLabel, drawFaceLandmarkPoint, drawFaceLandmarkPoint, drawFaceLandmarks, drawFaceOval, drawFaceOval, extractFaceImage, extractFaceImage, extractFaceImage, extractTransformedFaceImage, extractTransformedFaceImageByEyes, extractTransformedFaceImageByPos, getHeightNormalizationFactor, getWidthNormalizationFactor, intersect, intersectRectWithImage, loadFaceImage, saveFaceImage
compareTo, create, equals, getKeyStringPart, getLocatorURI, hashCode, toString, write
public OCVFaceKey(java.lang.String stringData)
stringData
- the data string with the position, features and locatorprotected OCVFaceKey(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
input
- the input to read the AbstractObjectKey fromserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error reading from the inputpublic java.lang.String getSourceImageLocatorURI()
FaceKey
locator URI
is returned by default.getSourceImageLocatorURI
in class FaceKey
public java.lang.String getFaceIdentifierLocatorURI()
FaceKey
getFaceIdentifierLocatorURI
in class FaceKey
public int getCenterX()
FaceKey
source image
.getCenterX
in class FaceKey
public int getCenterY()
FaceKey
source image
.getCenterY
in class FaceKey
public int getWidth()
FaceKey
source image
.public int getHeight()
FaceKey
source image
.public float getRollAngle()
FaceKey
source image
.
That is the in-plane rotation of the face along the face center.
Straight face have zero roll angle.getRollAngle
in class FaceKey
public float getYawAngle()
FaceKey
source image
.
That is the left-right rotation of the face along the head vertical axis.
Full-frontal face have zero yaw angle.getYawAngle
in class FaceKey
public java.awt.Shape getContour()
FaceKey
source image
.getContour
in class FaceKey
public java.awt.geom.Point2D getLandmarkPosition(FaceKey.FaceLandmark landmark)
FaceKey
getLandmarkPosition
in class FaceKey
landmark
- the face landmark the position of which to getprotected void writeData(java.io.OutputStream stream) throws java.io.IOException
AbstractObjectKey
writeData
in class AbstractObjectKey
stream
- the stream to store this object tojava.io.IOException
- if there was an error while writing to streampublic int getBinarySize(BinarySerializator serializator)
AbstractObjectKey
getBinarySize
in interface BinarySerializable
getBinarySize
in class AbstractObjectKey
serializator
- the serializator used to write objectspublic int binarySerialize(BinaryOutput output, BinarySerializator serializator) throws java.io.IOException
AbstractObjectKey
output
.binarySerialize
in interface BinarySerializable
binarySerialize
in class AbstractObjectKey
output
- the output that this object is binary-serialized intoserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error during serialization