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 ofdtype
dataBooleanImage
-Image
restricted to 1 channel ofnp.bool
data, and with additional methods for masking operationsMaskedImage
-Image
with aBooleanImage
attached. Has methods for masking operations on an image with k-channels ofdtype
data
Shapes
PointCloud
- n-dimensional ordered point collectionPointUndirectedGraph
-PointCloud
with undirected connectivityPointDirectedGraph
-PointCloud
with directed connectivityPointTree
-PointCloud
with directed connectivity and without loopsTriMesh
-PointCloud
with 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 ofmenpo
types to a numpy vector. Mostmenpo
types areVectorizable
.Landmarkable
- objects that can be annotated with spatial labelled landmarks. Inmenpo
all 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.