Class LandmarksDetectorImpl

java.lang.Object
cz.fidentis.analyst.landmarks.impl.LandmarksDetectorImpl
All Implemented Interfaces:
LandmarksDetector

public class LandmarksDetectorImpl extends Object implements LandmarksDetector
The implementation of landmarks detector.
  • Constructor Details Link icon

    • LandmarksDetectorImpl Link icon

      public LandmarksDetectorImpl(Canvas canvas)
      Constructor.
      Parameters:
      canvas - Canvas with the scene. Must not be null
  • Method Details Link icon

    • zoomAndRenderFace Link icon

      public void zoomAndRenderFace(DrawableFace face)
      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 interface LandmarksDetector
      Parameters:
      face - Face to be rendered and later analyzed
    • recognizeFromImage Link icon

      public List<Landmark> recognizeFromImage(int minLandmarks)
      Description copied from interface: LandmarksDetector
      Detects landmarks from the canvas, usually prepared by the previous call of the LandmarksDetector.zoomAndRenderFace(DrawableFace) method. It is supposed that only one face is visible.
      Specified by:
      recognizeFromImage in interface LandmarksDetector
      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 Link icon

      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 of LandmarksDetector.zoomAndRenderFace(DrawableFace) has no effect.
      Specified by:
      recognizeFromMultipleAngles in interface LandmarksDetector
      Parameters:
      faceSlot - Scene slot of the face that should be recognized
      symmetryConfig - Symmetry configuration used to compute the symmetry plane temporarily if the symmetry plane of the face is missing.
      minLandmarks - Minimum number of required landmarks
      cameraRotationAngle - 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.