Interface LandmarkServices
public interface LandmarkServices
Public stateless services dealing with landmarks.
TO DO: Provide IcpTransformation instead of PrTransformation?
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic Plane
computeSymmetryPlane
(Collection<Landmark> landmarks) Calculation of symmetry plane from landmarks.static PrTransformation
getProcrustesTransformation
(Collection<Landmark> staticFaceFPs, Collection<Landmark> transformedFaceFPs, boolean scale) Computes and return transformation that registers landmarks from the second face the first face.static <T extends IPosition>
voidtransform
(List<T> points, PrTransformation transformation) Applies transformation to given points.
-
Method Details
-
getProcrustesTransformation
static PrTransformation getProcrustesTransformation(Collection<Landmark> staticFaceFPs, Collection<Landmark> transformedFaceFPs, boolean scale) Computes and return transformation that registers landmarks from the second face the first face.- Parameters:
staticFaceFPs
- Feature points of a face towards which the superimposition is performed. Must not benull
.transformedFaceFPs
- Feature points of a face to be transformed (superimposed). Must not benull
.scale
- Whether to scale the face as well- Throws:
IllegalArgumentException
- if there are not at least three common feature points in the faces
-
transform
Applies transformation to given points. -
computeSymmetryPlane
Calculation of symmetry plane from landmarks. Only landmarks with "_L" and "_R" suffix in their code are taken into account.- Parameters:
landmarks
- Landmarks- Returns:
- Symmetry plane
-