imread

Read images to numpy arrays

https://github.com/luispedro/imread

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 14 committers (7.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.5%) to scientific vocabulary

Keywords

c-plus-plus computer-vision image-processing python python-2 python-3

Keywords from Contributors

closember gtk qt tk wx
Last synced: 6 months ago · JSON representation ·

Repository

Read images to numpy arrays

Basic Info
  • Host: GitHub
  • Owner: luispedro
  • License: mit
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 688 KB
Statistics
  • Stars: 72
  • Watchers: 10
  • Forks: 20
  • Open Issues: 2
  • Releases: 2
Topics
c-plus-plus computer-vision image-processing python python-2 python-3
Created about 14 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Citation Authors

README.md

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:

  • imread: Reads an image file
  • imread_multi: Reads an image file with multiple images. Currently, TIFF and STK (a TIFF sub-based format) support this function.
  • imsave: Writes an image file

Example (which uses mahotas for Gaussian filtering):

```python 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:

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

To compile on debian/ubuntu:

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

To compile on Mac:

bash sudo port install libpng tiff webp

Either way, you can then compile with:

bash python setup.py build

and install with:

bash 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)

  • Fix build issue (#43, patch by \@carlosal1015)

Version 0.7.4 (2020-04-14)

  • Add missing header files to distribution

Version 0.7.3 (2020-04-09)

  • Add missing test data to distribution

Version 0.7.2 (2020-03-24)

  • Fix several memory access bugs in parsers (reported by Robert Scott)

Version 0.7.1 (2019-05-09)

  • Fix 16-bit RGB/RGBA TIFF write (patch by Tomi Aarnio)

Version 0.7.0 (2018-09-30)

  • Add support for reading ImageJ ROIs

Version 0.6.1 (2018-02-15)

  • Support pathlib paths as function arguments
  • Fix 16 bit PNG write support (patch by Tomi Aarnio)

Version 0.6 (2016-09-21)

  • Add [supports_format]{.title-ref} function
  • Make png compression level tunable when calling imsave
  • Add imsave_multi
  • Add partial support for reading PNG files in Gray+alpha format

Version 0.5.1 (2014-11-06)

  • Improve tests to work after installation
  • Fix compilation in MSVC (patch by Christoph Gohlke)

Version 0.5 (2014-10-16)

  • Add magic-number based format auto-detection
  • Auto detect whether webp is installed
  • Fix WebP reading (update to newer API)

Version 0.4 (2014-07-21)

  • Add configuration for TIFF saving
  • Correctly save 16 bit PNG images
  • Better error messages for JPEG

Version 0.3.2 (2013-10-06)

  • Added imload*/imwrite synonyms as suggested by Thouis (Ray) Jones
  • Options framework
  • Allow user to specify JPEG quality when saving
  • Fix loading of 16 bit PNG images

Version 0.3.1 (2013-06-20)

  • Fix possible crash on error with TIFF
  • Fix compilation on Windows (reported by Volker Hilsenstein)
  • Make it easy to compile without WebP

Version 0.3.0 (2013-07-29)

  • Support for reading from in-memory blobs
  • Support for reading & writing TIFF metadata
  • Add PHOTOMETRIC tag to TIFF (reported by Volker Hilsenstein)
  • Support writing RGB TIFFs

Version 0.2.6 (2013-06-19)

  • Fix hard crash when saving with non-existing file type
  • Fix compilation on MacOS (patch by Alexander Bohn)
  • Add verbose argument to tests.run()
  • Better error when attempting to save floating point images

Version 0.2.5 (2012-10-29)

  • Correctly accept uppercase extensions
  • Python 3 support (patch by Christoph Gohlke [pull request 8 on github])
  • Read 1-Bit PNGs
  • Read simple BMPs (compression and many bit types not supported)
  • More complete debug mode (export DEBUG=2 when building), more checks

Version 0.2.4 (2012-06-26)

  • Add lzw.cpp to source distribution
  • Support saving 16-bit TIFF
  • Better Mac OS support (patch from Alexander Bohn)

Version 0.2.3 (2012-06-8)

  • Fix imread_multi

Version 0.2.2 (2012-06-5)

  • Add [formatstr]{.title-ref} argument to imread
  • Open files in binary mode on Windows (patch by Christoph Gohlke)
  • Read-only support for LSM files
  • Read-only support for XCF files (through [xcf2png]{.title-ref})
  • Fix writing of non-contiguous images (at least PNG was affected)

Version 0.2.1 (2012-02-11)

  • Add missing files to distribution

Version 0.2 (2012-03-19)

  • Compile on MSVC++ (Patches by Christoph Gohlke)
  • Support for WebP
  • Support for 1-bit TIFFs
  • Better error message
  • Support for multi-page TIFF reading
  • Experimental read-only support for STK files

Version 0.1 (2012-02-28)

  • Support for PNG
  • Support for TIFF
  • Support for JPEG

Owner

  • Name: Luis Pedro Coelho
  • Login: luispedro
  • Kind: user
  • Location: Luxembourg & Shanghai
  • Company: Fudan University

Citation (CITATION)

This package is an off-shoot of mahotas. As it, currently, does not have its
own publication, so you are asked to cite the mother package: If you use
imread-mahotas on a scientific publication, please cite:

    **Luis Pedro Coelho** Mahotas: Open source software for scriptable computer
    vision in Journal of Open Research Software, vol 1, 2013. [`DOI
    <http://dx.doi.org/10.5334/jors.ac>`__]


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 = {http://dx.doi.org/10.5334/jors.ac},
        month = {July},
        volume = {1}
    }

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 306
  • Total Committers: 14
  • Avg Commits per committer: 21.857
  • Development Distribution Score (DDS): 0.072
Past Year
  • Commits: 5
  • Committers: 1
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Luis Pedro Coelho l****s@l****g 284
cgohlke c****e@u****u 8
Tomi Aarnio t****o@g****m 2
Eric Buehl e****l@g****m 2
pgajdos p****s@s****z 1
Thouis (Ray) Jones t****s@g****m 1
Laurie O l****n@h****m 1
Christoph Deil D****h@g****m 1
Carlos Aznarán c****l@u****e 1
Bill Tollett w****s 1
Alexander Bohn / FI$H2k f****0@g****m 1
Tomi Aarnio t****o@p****e 1
Tomi Aarnio t****o@n****m 1
Brian Bian q****n@m****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 26
  • Total pull requests: 18
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 12 days
  • Total issue authors: 21
  • Total pull request authors: 11
  • Average comments per issue: 3.08
  • Average comments per pull request: 1.61
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • thouis (3)
  • toaarnio (2)
  • hmaarrfk (2)
  • cgohlke (2)
  • the0demiurge (1)
  • MikiGrit (1)
  • sciunto (1)
  • flekschas (1)
  • JasonBens (1)
  • stromnov (1)
  • andrew-d (1)
  • McNoggins (1)
  • carlosal1015 (1)
  • SCH227 (1)
  • JoeGardner000 (1)
Pull Request Authors
  • toaarnio (3)
  • cgohlke (3)
  • ericbuehl (2)
  • pgajdos (2)
  • fish2000 (2)
  • cdeil (1)
  • qbbian (1)
  • EpicWink (1)
  • thouis (1)
  • carlosal1015 (1)
  • wtollett-usgs (1)
Top Labels
Issue Labels
feature-request (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 1,436 last-month
  • Total docker downloads: 11
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 141
    (may contain duplicates)
  • Total versions: 30
  • Total maintainers: 2
pypi.org: imread

imread: Image reading library

  • Versions: 24
  • Dependent Packages: 2
  • Dependent Repositories: 140
  • Downloads: 1,436 Last month
  • Docker Downloads: 11
Rankings
Dependent repos count: 1.3%
Dependent packages count: 3.2%
Average: 3.5%
Docker downloads count: 4.0%
Downloads: 5.7%
Maintainers (2)
Last synced: 6 months ago
conda-forge.org: imread

Mahotas-imread is a simple module to read images into numpy arrays

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Dependent repos count: 24.3%
Forks count: 36.0%
Stargazers count: 37.2%
Average: 37.3%
Dependent packages count: 51.6%
Last synced: 6 months ago

Dependencies

dev-requirements.txt pypi
  • numpy * development
readthedocs-requirements.txt pypi
  • matplotlib *
  • numpy *
  • numpydoc *
requirements.txt pypi
  • numpy *
setup.py pypi
  • numpy *
.github/workflows/python-package-linux.yml actions
  • RalfG/python-wheels-manylinux-build v0.4.2-manylinux2014_x86_64 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/test-python-package-with-conda.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite