Fork me on GitHub

Mahotas: Computer Vision in Python

Mahotas is a set of functions for image processing and computer vision in Python.

It is completely based on numpy arrays as its datatype. It has its heavy routines implemented in clean C++ in a way that is both very clean, type independent (using templates), and fast.

All of the code is self contained and it has no other dependencies than numpy. Freeimage or imread are an optional dependency if you want to use the imread and imsave functions.

The code is well documented (all public functions are extensively documented) and well tested (almost 100% test coverage). It has no known bugs (if you email me a bug report with a clear test case, I will typically fix it in less than 24 hours).

Package and API documentation

There is a manuscript about mahotas, which will hopefully evolve into a journal publication later.

Algorithms

  • SURF
  • watershed
  • thresholding
  • convex hull computation
  • polygon drawing
  • feature computation: Haralick textures, local binary patterns, and Zernike moment
  • distance transform
  • freeimage & imread interface
  • ...

Install

You can get the code from pypi or the cutting edge from github. Instalation should be possible using::

pip install mahotas

or:

easy_install mahotas

You can also find Windows packages here by Christoph Gohlke at UCI. He also has other useful Python packages.

For FreeBSD, mahotas is available in the ports section.

Support

The official forum for discussion of mahotas issues is the pythonvision mailing list. Also, check out pythonvision.org while you're at it.

For bug reports, mail me. If you report a bug, I will try to fix it. If it has a unit test, I promise to fix it.

Currently, there are no known bugs.

Article filed in categories: Software Python