Package cz.fidentis.analyst.data.face
Interface HumanFace
- All Superinterfaces:
HumanFaceEventBus
,Serializable
- All Known Implementing Classes:
HumanFaceImpl
A single human face consisting of a mesh, feature points, space partitioning structures, and other data structures.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCustomLandmark
(Landmark landmark) Adds custom landmark to faceReturns all feature points or empty list.Returns bounding box ornull
Returns canonical path to the folder in which the face file is located, i.e.,getPath()
withgetShortName()
suffix removed.Gets the glyphs of the face or empty listgetId()
Returns unique ID of the face.Returns already computed k-d tree of the triangular mesh ornull
.Returns the triangular mesh model of the human face.Returns already computed octree of the triangular mesh ornull
.getPath()
Returns canonical path to the face fileReturns short name of the face without its path in the name.getState()
Returns a deep copy of current state.Returns Interactive mask.boolean
Checks if the human face has assigned a bounding boxboolean
Checks if the human face has assigned glyphsboolean
Checks if HumanFace has KdTree calculatedboolean
Checks if HumanFace has feature pointsboolean
Checks if HumanFace has octree calculatedboolean
Returnstrue
if the face has the symmetry plane computed.void
loadFeaturePoints
(String path, String fileName) Reads feature points from a file on the given path.boolean
removeCustomLandmark
(Landmark landmark) Removes custom landmark from facevoid
setBoundingBox
(Box boundingBox) Set a bounding box.void
Sets the glyphs.void
Sets teh octreevoid
setMeshModel
(MeshModel meshModel) Sets the mesh model.void
Sets teh octreevoid
setState
(HumanFaceState state) Falls back to given state.void
setSurfaceMask
(SurfaceMask surfaceMask) Set a surface mask.void
setSymmetryPlane
(Plane plane) Sets the symmetry plane.Methods inherited from interface cz.fidentis.analyst.data.face.HumanFaceEventBus
announceEvent, registerListener, unregisterListener
-
Method Details
-
getMeshModel
MeshModel getMeshModel()Returns the triangular mesh model of the human face.- Returns:
- the triangular mesh model of the human face
-
setMeshModel
Sets the mesh model.- Parameters:
meshModel
- new mesh model, must not benull
- Throws:
IllegalArgumentException
- if new model is missing
-
setSymmetryPlane
Sets the symmetry plane. If the input argument isnull
, then removes the plane.- Parameters:
plane
- The new symmetry plane
-
getSymmetryPlane
Plane getSymmetryPlane()- Returns:
- The face's symmetry plane
-
hasSymmetryPlane
boolean hasSymmetryPlane()Returnstrue
if the face has the symmetry plane computed.- Returns:
true
if the face has the symmetry plane computed.
-
loadFeaturePoints
Reads feature points from a file on the given path.- Parameters:
path
- Directory where the file is locatedfileName
- Name of the file- Throws:
IOException
- on I/O failure
-
getAllLandmarks
Returns all feature points or empty list.- Returns:
- The face's feature points.
-
getStandardFeaturePoints
- Returns:
- list of standard feature points
-
getCustomLandmarks
- Returns:
- list of custom feature points
-
addCustomLandmark
Adds custom landmark to face -
removeCustomLandmark
Removes custom landmark from face- Parameters:
landmark
- Landmark to remove- Returns:
- true if the landmark was removed, false otherwise
-
hasLandmarks
boolean hasLandmarks()Checks if HumanFace has feature points- Returns:
- true if yes and false if not
-
getId
String getId()Returns unique ID of the face.- Returns:
- unique ID of the face.
-
getPath
String getPath()Returns canonical path to the face file- Returns:
- canonical path to the face file
-
getShortName
String getShortName()Returns short name of the face without its path in the name. May not be unique.- Returns:
- short name of the face without its path in the name
-
getDirectory
String getDirectory()Returns canonical path to the folder in which the face file is located, i.e.,getPath()
withgetShortName()
suffix removed.- Returns:
- Returns canonical path to the folder in which the face file is located
-
getOctree
Octree getOctree()Returns already computed octree of the triangular mesh ornull
.- Returns:
- Already computed octree of the triangular mesh or
null
-
hasOctree
boolean hasOctree()Checks if HumanFace has octree calculated- Returns:
- true if yes and false if not
-
setOctree
Sets teh octree- Parameters:
octree
- New octree. Can benull
-
getKdTree
KdTree getKdTree()Returns already computed k-d tree of the triangular mesh ornull
.- Returns:
- Already computed k-d tree of the triangular mesh or
null
-
setKdTree
Sets teh octree- Parameters:
kdTree
- New k-d tree. Can benull
-
hasKdTree
boolean hasKdTree()Checks if HumanFace has KdTree calculated- Returns:
- true if yes and false if not
-
getSurfaceMask
SurfaceMask getSurfaceMask()Returns Interactive mask. The mask can be empty;- Returns:
- the interactive mask
-
getState
HumanFaceState getState()Returns a deep copy of current state.- Returns:
- a deep copy of current state.
-
setState
Falls back to given state. No event is triggered - it up to the caller.- Parameters:
state
- Old state. Must not benull
-
getGlyphs
Gets the glyphs of the face or empty list- Returns:
- list of glyphs or empty list
-
setGlyphs
Sets the glyphs.- Parameters:
glyphs
- Glyphs. Can benull
-
hasGlyphs
boolean hasGlyphs()Checks if the human face has assigned glyphs- Returns:
true
, if the glyphs exist
-
getBoundingBox
Box getBoundingBox()Returns bounding box ornull
- Returns:
- bounding box or
null
-
setBoundingBox
Set a bounding box.- Parameters:
boundingBox
- Bounding box ornull
-
hasBoundingBox
boolean hasBoundingBox()Checks if the human face has assigned a bounding box- Returns:
true
, if the bounding box exists
-
setSurfaceMask
Set a surface mask.- Parameters:
surfaceMask
- surfaceMask ornull
-