Class LandmarksImpl

java.lang.Object
cz.fidentis.analyst.data.landmarks.impl.LandmarksImpl
All Implemented Interfaces:
Landmarks, Serializable

public class LandmarksImpl extends Object implements Landmarks
Implementation of the Landmarks interface. This class is responsible for managing landmarks on a human face. Including standard feature points and custom (user) landmarks. It provides methods to load, add, remove, and retrieve landmarks.
See Also:
  • Constructor Details

    • LandmarksImpl

      public LandmarksImpl()
      Default constructor with no landmarks.
    • LandmarksImpl

      public LandmarksImpl(Collection<Landmark> landmarks)
      Constructor that initializes the landmarks with a given collection of landmarks.
      Parameters:
      landmarks - Collection of landmarks to initialize with.
  • Method Details

    • getAllLandmarks

      public List<Landmark> getAllLandmarks()
      Description copied from interface: Landmarks
      Returns all feature points or empty list.
      Specified by:
      getAllLandmarks in interface Landmarks
      Returns:
      All landmarks of the face or empty list if no landmarks are present.
    • getStandardFeaturePoints

      public List<Landmark> getStandardFeaturePoints()
      Specified by:
      getStandardFeaturePoints in interface Landmarks
      Returns:
      list of standard feature points
    • getCustomLandmarks

      public List<Landmark> getCustomLandmarks()
      Specified by:
      getCustomLandmarks in interface Landmarks
      Returns:
      list of custom feature points
    • addLandmark

      public boolean addLandmark(Landmark landmark)
      Description copied from interface: Landmarks
      Adds all types of Landmark (including standard or custom) to the face if they are not already present.
      Specified by:
      addLandmark in interface Landmarks
      Parameters:
      landmark - Landmark to add
      Returns:
      true if the landmark was added, false otherwise
    • removeLandmark

      public boolean removeLandmark(Landmark landmark)
      Description copied from interface: Landmarks
      Removes any type of Landmark from the face.
      Specified by:
      removeLandmark in interface Landmarks
      Parameters:
      landmark - Landmark to remove
      Returns:
      true if the landmark was removed, false otherwise
    • hasLandmarks

      public boolean hasLandmarks()
      Description copied from interface: Landmarks
      Checks if HumanFace has feature points
      Specified by:
      hasLandmarks in interface Landmarks
      Returns:
      true if yes and false if not
    • getNextUserLandmarkId

      public int getNextUserLandmarkId()
      Description copied from interface: Landmarks
      Generates a new unique ID for a user-defined landmark. The ID series for user-defined landmarks starts from ID 501.
      Specified by:
      getNextUserLandmarkId in interface Landmarks
      Returns:
      a new unique ID for a user-defined landmark
    • clone

      public LandmarksImpl clone()
      Description copied from interface: Landmarks
      Clones the landmarks
      Specified by:
      clone in interface Landmarks
      Overrides:
      clone in class Object
      Returns:
      a clone of the landmarks