import_landmark_file¶
-
menpo.io.
import_landmark_file
(filepath, group=None, asset=None)[source]¶ Single landmark file importer.
If a landmark file is found at
filepath
, returns a dictionary of landmarks where keys are the group names and the values arePointCloud
or subclasses. If the optionalgroup
argument is supplied then a single group with the given name is returned rather than a dictionary- Parameters
filepath (pathlib.Path or str) – A relative or absolute filepath to an landmark file.
group (str, optional) – The name of the landmark group to return from the landmark dictionary. If None, then a dictionary is returned where keys are the group names and the values are
PointCloud
or subclasses.asset (object, optional) – The object the landmark belongs to (useful for things like rescaling)
- Returns
landmarks (dict {str:
PointCloud
} orPointCloud
) – Dictionary mapping landmark groups toPointCloud
or subclasses ORPointCloud
or subclass ifgroup == None