Home

Awesome

mahotas-imread: Read Image Files

License Install with conda image Test mahotas-imread

IO with images and numpy arrays.

Mahotas-imread is a simple module with a small number of functions:

Example (which uses mahotas for Gaussian filtering):

from imread import imread, imsave
from mahotas import gaussian_filter
lena = imread('lena.jpeg')

lena = gaussian_filter(lena.astype(float), 4.)
imsave('lena-filtered.jpeg', lena)

This grew out of frustration at current image loading solutions in Python, in either my packages [mahotas] or packages from others [scikit-image, for example].

The relationship with numpy is very contained and this could be easily repurposed to load images in other frameworks, even other programming languages.

Online documentation

Python versions 2.6, 2.7, 3.3+ are officially supported.

Citation

::: {#Citation} If you use imread on a published publication, please cite the main mahotas paper (imread is a spin-off of mahotas): :::

Luis Pedro Coelho Mahotas: Open source software for scriptable computer vision in Journal of Open Research Software, vol 1, 2013. [DOI]

In Bibtex format:

@article{mahotas,
    author = {Luis Pedro Coelho},
    title = {Mahotas: Open source software for scriptable computer vision},
    journal = {Journal of Open Research Software},
    year = {2013},
    doi = {https://dx.doi.org/10.5334/jors.ac},
    month = {July},
    volume = {1}
}

Installation/Dependencies

The easiest environment to install mahotas-imread is anaconda, through conda-forge. Just use:

conda config --add channels conda-forge
conda install imread

To compile on debian/ubuntu:

sudo apt-get install libpng12-dev libtiff4-dev libwebp-dev
sudo apt-get install xcftools

To compile on Mac:

sudo port install libpng tiff webp

Either way, you can then compile with:

python setup.py build

and install with:

python setup.py install

On Windows, you can also just download a pre-built package from C. Gohlke's repository

On nix, you can use:

nix-env -iA nixpkgs.python3Packages.imread

or use the pkgs.python3Packages.imread object in your *.nix files.

Links & Contacts

History

Version 0.7.5 (2023-11-22)

Version 0.7.4 (2020-04-14)

Version 0.7.3 (2020-04-09)

Version 0.7.2 (2020-03-24)

Version 0.7.1 (2019-05-09)

Version 0.7.0 (2018-09-30)

Version 0.6.1 (2018-02-15)

Version 0.6 (2016-09-21)

Version 0.5.1 (2014-11-06)

Version 0.5 (2014-10-16)

Version 0.4 (2014-07-21)

Version 0.3.2 (2013-10-06)

Version 0.3.1 (2013-06-20)

Version 0.3.0 (2013-07-29)

Version 0.2.6 (2013-06-19)

Version 0.2.5 (2012-10-29)

Version 0.2.4 (2012-06-26)

Version 0.2.3 (2012-06-8)

Version 0.2.2 (2012-06-5)

Version 0.2.1 (2012-02-11)

Version 0.2 (2012-03-19)

Version 0.1 (2012-02-28)