Package cz.fidentis.analyst.data.face
Interface HumanFaceFactory
public interface HumanFaceFactory
This class provides services that instantiates a human face.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic HumanFace
Reads a 3D human face from the given OBJ file.static HumanFace
Reads a 3D human face from the given OBJ file.static HumanFace
Recover human face from serialized dump file.static HumanFace
Creates a human face from existing mesh model.static void
Save face data by rewriting existing files!static void
Save face by writing the data into a new files.
-
Method Details
-
create
Reads a 3D human face from the given OBJ file.- Parameters:
file
- OBJ fileloadLandmarks
- Iftrue
, then the constructor aims to load landmarks as well- Throws:
IOException
- on I/O failure
-
create
Reads a 3D human face from the given OBJ file.- Parameters:
file
- OBJ file- Throws:
IOException
- on I/O failure
-
create
Recover human face from serialized dump file. As the dump file can contain additional objects, e.g., camera, it is supposed that the given input stream is set to a human face object.- Parameters:
in
- A dump file as object input stream- Returns:
- The instance of the human face
- Throws:
IOException
- If reading failsClassNotFoundException
- If there is no human face in the stream
-
create
Creates a human face from existing mesh model. The mesh model is stored directly (not copied).- Parameters:
name
- Name of created human facemodel
- Mesh model- Throws:
IllegalArgumentException
- if themodel
isnull
-
save
Save face data by rewriting existing files!- Parameters:
face
- Face- Throws:
IOException
- on IO error
-
saveAs
Save face by writing the data into a new files.- Parameters:
face
- Facefile
- Basic file name without suffixes- Throws:
IOException
- on IO error, especially if the files already exist
-