Introduction

  1. Core Types
  2. Core Interfaces

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 of dtype data
  • BooleanImage - Image restricted to 1 channel of np.bool data, and with additional methods for masking operations
  • MaskedImage - Image with a BooleanImage attached. Has methods for masking operations on an image with k-channels of dtype data

Shapes

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 of menpo types to a numpy vector. Most menpo types are Vectorizable.
  • Landmarkable - objects that can be annotated with spatial labelled landmarks. In menpo all images and shapes are Landmarkable.
  • 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.

results matching ""

    No results matching ""