import_image¶
- menpo.io.base.import_image(filepath, landmark_resolver=None)[source]¶
Single image (and associated landmarks) importer.
Iff an image file is found at filepath, returns a MaskedImage representing it. Landmark files sharing the same filename will be imported and attached too. If the image defines a mask, this mask will be imported.
This method is valid for both traditional images and spatial image types.
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 image. The function should take one argument (the image itself) and return a dictionary of the form {‘group_name’: ‘landmark_filepath’}
Returns: :class:`menpo.image.Image` :
An instantiated image class built from the image file.