Class LandmarksDetectorImpl
java.lang.Object
cz.fidentis.analyst.landmarks.impl.LandmarksDetectorImpl
- All Implemented Interfaces:
LandmarksDetector
The implementation of landmarks detector.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrecognizeFromImage
(int minLandmarks) Detects landmarks from the canvas, usually prepared by the previous call of theLandmarksDetector.zoomAndRenderFace(DrawableFace)
method.recognizeFromMultipleAngles
(int faceSlot, SymmetryConfig symmetryConfig, int minLandmarks, double cameraRotationAngle) Detects landmarks of a face.void
Prepares the scene for a single-face snapshot.
-
Constructor Details
-
Method Details
-
zoomAndRenderFace
Description copied from interface:LandmarksDetector
Prepares the scene for a single-face snapshot. The scene/canvas is changed! Don't forget to save and recover its state.- Specified by:
zoomAndRenderFace
in interfaceLandmarksDetector
- Parameters:
face
- Face to be rendered and later analyzed
-
recognizeFromImage
Description copied from interface:LandmarksDetector
Detects landmarks from the canvas, usually prepared by the previous call of theLandmarksDetector.zoomAndRenderFace(DrawableFace)
method. It is supposed that only one face is visible.- Specified by:
recognizeFromImage
in interfaceLandmarksDetector
- Parameters:
minLandmarks
- Minimum required landmarks to be detected.- Returns:
- List of 3D landmarks that were detected from the camera view, an empty list if the required number of landmarks was not found.
-
recognizeFromMultipleAngles
public List<Landmark> recognizeFromMultipleAngles(int faceSlot, SymmetryConfig symmetryConfig, int minLandmarks, double cameraRotationAngle) Description copied from interface:LandmarksDetector
Detects landmarks of a face. Camera is rotated around the selected face (using its symmetry plane) to capture the face from different angles until the required number of landmarks is recognized. The scene is prepared automatically, i.e., previous calls ofLandmarksDetector.zoomAndRenderFace(DrawableFace)
has no effect.- Specified by:
recognizeFromMultipleAngles
in interfaceLandmarksDetector
- Parameters:
faceSlot
- Scene slot of the face that should be recognizedsymmetryConfig
- Symmetry configuration used to compute the symmetry plane temporarily if the symmetry plane of the face is missing.minLandmarks
- Minimum number of required landmarkscameraRotationAngle
- Angle of camera rotation. If unsure, use 30- Returns:
- List of 3D landmarks that were detected from the camera view, an empty list if at least required number of landmarks was not found.
-