Class FaceRegistrationServicesImpl
java.lang.Object
cz.fidentis.analyst.engines.face.impl.FaceRegistrationServicesImpl
A utility functions for the registration of whole human faces.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalignFeaturePoints
(HumanFace staticFace, HumanFace transformedFace, boolean scale) Transforms the second face so that its feature points best fit the position of corresponding feature points of the first face.void
alignMeshes
(HumanFace transformedFace, IcpConfig icpConfig) Superimpose given face to the face included in the ICP configuration object.void
alignSymmetryPlanes
(HumanFace staticFace, HumanFace transformedFace, boolean preserveUpDir) Transforms the second face so that its symmetry plane fits the symmetry plane of the first face.void
transformFace
(HumanFace face, javax.vecmath.Vector3d rotation, javax.vecmath.Vector3d translation, double scale) Transform the face "manually".transformPlane
(Plane plane, Quaternion rot, javax.vecmath.Vector3d translation, double scale) Transforms the whole plane, i.e., its normal and position.
-
Constructor Details
-
FaceRegistrationServicesImpl
public FaceRegistrationServicesImpl()
-
-
Method Details
-
alignMeshes
Superimpose given face to the face included in the ICP configuration object.- Parameters:
transformedFace
- A face to be transformed.icpConfig
- ICP configuration
-
transformFace
public void transformFace(HumanFace face, javax.vecmath.Vector3d rotation, javax.vecmath.Vector3d translation, double scale) Transform the face "manually".- Parameters:
face
- Face to be transformed.rotation
- Rotation vector denoting the rotation angle around axes X, Y, and Z.translation
- Translation vector denoting the translation in the X, Y, and Z direction.scale
- Scale factor (1 = no scale).
-
alignSymmetryPlanes
public void alignSymmetryPlanes(HumanFace staticFace, HumanFace transformedFace, boolean preserveUpDir) Transforms the second face so that its symmetry plane fits the symmetry plane of the first face. Symmetry planes must be computed in advance!- Parameters:
staticFace
- a human face that remains unchangedtransformedFace
- a human face that will be transformedpreserveUpDir
- Iffalse
, then the object can be rotated around the target's normal arbitrarily.- Throws:
NullPointerException
- if the symmetry planes are missing.
-
alignFeaturePoints
public PrTransformation alignFeaturePoints(HumanFace staticFace, HumanFace transformedFace, boolean scale) Transforms the second face so that its feature points best fit the position of corresponding feature points of the first face.- Parameters:
staticFace
- a human face that remains unchangedtransformedFace
- a human face that will be transformedscale
- Whether to scale faces as well
-
transformPlane
public Plane transformPlane(Plane plane, Quaternion rot, javax.vecmath.Vector3d translation, double scale) Transforms the whole plane, i.e., its normal and position.- Parameters:
plane
- plane to be transformedrot
- rotationtranslation
- translationscale
- scale- Returns:
- transformed plane
-