Introduction
1. Core Types
menpo is a relatively high-level software package. It is not a replacement for pillow, scikit-image, or opencv - it ties all these lower-level packages together in to a unified higher-level framework. As a result, we have a family of core types that wrap numpy arrays and provide an elegant API. You will find that the vast majority of functions and methods in Menpo take and return these core types, so it's well worth getting used to them - there are only a handful.
Images
Image- n-dimensional image with k-channels ofdtypedataBooleanImage-Imagerestricted to 1 channel ofnp.booldata, and with additional methods for masking operationsMaskedImage-Imagewith aBooleanImageattached. Has methods for masking operations on an image with k-channels ofdtypedata
Shapes
PointCloud- n-dimensional ordered point collectionPointUndirectedGraph-PointCloudwith undirected connectivityPointDirectedGraph-PointCloudwith directed connectivityPointTree-PointCloudwith directed connectivity and without loopsTriMesh-PointCloudwith a triangulation
2. Core Interfaces
menpo is an object oriented framework built around a set of three core interfaces, each one governing a particular facet of menpo's design:
Vectorizable- efficient bi-directional conversion ofmenpotypes to a numpy vector. Mostmenpotypes areVectorizable.Landmarkable- objects that can be annotated with spatial labelled landmarks. Inmenpoall images and shapes areLandmarkable.Transform- spatial transformations that can be applied to any shape and used to drive image warps
We will see how these interfaces lead to common patterns throughout menpo later in this guide.