import_mesh

menpo.io.base.import_mesh(filepath, landmark_resolver=None, texture=True)[source]

Single mesh (and associated landmarks and texture) importer.

Iff an mesh file is found at filepath, returns a TriMesh representing it. Landmark files sharing the same filename will be imported and attached too. If texture coordinates and a suitable texture are found the object returned will be a TexturedTriMesh.

Parameters:

filepath : String

A relative or absolute filepath to an image file.

landmark_resolver: function, optional :

If not None, this function will be used to find landmarks for the mesh. The function should take one argument (the mesh itself) and provide a string or list of strings detailing the landmarks to be imported.

texture: Boolean, optional :

If False, don’t search for textures.

Default: True

Returns :

——- :

:class:`menpo.shape.TriMesh` :

An instantiated trimesh (or textured trimesh) file object