Skip to main content

Python tools for multi-scale image processing, including Laplacian pyramids, Wavelets, and Steerable Pyramids.

Project description

pyrtools: tools for multi-scale image processing

PyPI Version Anaconda-Server Badge License: MIT Python version Build Status Documentation Status DOI Binder codecov

Briefly, the tools include:

  • Recursive multi-scale image decompositions (pyramids), including Laplacian pyramids, QMFs, Wavelets, and steerable pyramids. These operate on 1D or 2D signals of arbitrary dimension.
  • Fast 2D convolution routines, with subsampling and boundary-handling.
  • Fast point-operations, histograms, histogram-matching.
  • Fast synthetic image generation: sine gratings, zone plates, fractals, etc.
  • Display routines for images and pyramids. These include several auto-scaling options, rounding to integer zoom factors to avoid resampling artifacts, and useful labeling (dimensions and gray-range).

This is a python 3 port of Eero Simoncelli's matlabPyrTools, but it does not attempt to recreate all of the matlab code from matlabPyrTools. The goal is to create a Python interface for the C code at the heart of matlabPyrTools.

NOTE: If you are only interested in the complex steerable pyramid, we have a pytorch implementation in the plenoptic package; the implementation in plenoptic is differentiable.

Citing us

If you use pyrtools in a published academic article or presentation, please cite us! You can find the link to the most recent release on Zenodo here (though please specify the version you used not the most recent one!). You can also get a formatted citation at the top right of our GitHub repo

Installation

You can install pyrtools using either pip:

pip install pyrtools

or conda:

conda install pyrtools -c conda-forge

You may also install from source, directly from the git repository. This is largely useful if you are seeking to modify the code or make contributions. To do so, clone the repository and run pip install. On Mac or Linux, that looks like:

git clone https://github.com/LabForComputationalVision/pyrtools.git
cd pyrtools/
pip install .

You may also want an editable install, pip install -e ., in which case changes you make in the source code will be reflected in your install.

Pyramid resources

If you would like to learn more about pyramids and why they're helpful for image processing, here are some resources to get you started:

Usage:

  • load modules:
import pyrtools as pt
  • create pyramid:
pyr = pt.pyramids.LaplacianPyramid(img)
  • reconstruct image from pyramid:
recon_img = pyr.recon_pyr()

Please see TUTORIALS/02_pyramids.ipynb for more examples.

For developres

Testing

You can find unit tests in TESTS/unitTests.py and run them with python TESTS/unitTests.py.

Build the documentation

NOTE: If you just want to read the documentation, you do not need to do this; documentation is built automatically on readthedocs.

However, it can be built locally as well. You would do this if you've made changes locally to the documentation (or the docstrings) that you would like to examine before pushing.

# create a new virtual environment and then...
# install pyrtools with sphinx and documentation-related dependencies
pip install -e .[docs]
# build documentation
cd docs/
make html

The index page of the documentation will then be located at docs/_build/html/index.html, open it in your browser to navigate around.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrtools-1.0.10.tar.gz (7.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyrtools-1.0.10-py3-none-win_amd64.whl (100.8 kB view details)

Uploaded Python 3Windows x86-64

pyrtools-1.0.10-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (116.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

pyrtools-1.0.10-py3-none-macosx_11_0_arm64.whl (93.2 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

pyrtools-1.0.10-py3-none-macosx_10_9_x86_64.whl (95.4 kB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file pyrtools-1.0.10.tar.gz.

File metadata

  • Download URL: pyrtools-1.0.10.tar.gz
  • Upload date:
  • Size: 7.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrtools-1.0.10.tar.gz
Algorithm Hash digest
SHA256 d553769201e1fb338564ecf43568ead9ad8a7b3fc1ed741fa0039f569d1ea80b
MD5 520b68a9e27f51371cf2cdb9f8172da2
BLAKE2b-256 f222c107a9a7b0f177f7e259cee11c3f3cc72c72f2cde7f6751f14e68ca5eba2

See more details on using hashes here.

File details

Details for the file pyrtools-1.0.10-py3-none-win_amd64.whl.

File metadata

  • Download URL: pyrtools-1.0.10-py3-none-win_amd64.whl
  • Upload date:
  • Size: 100.8 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrtools-1.0.10-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 dbd3eb16c21fe82735e43bb2406dfe541c22c40123e1499bb35d6b59ebf645e9
MD5 fe678dc6a1a4dddc69adb872a3b67811
BLAKE2b-256 8e873063c9df011f39ce5bb45f171ff0952dd0d9839625c5ae4b99d0377259c2

See more details on using hashes here.

File details

Details for the file pyrtools-1.0.10-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyrtools-1.0.10-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 41d1b28b4e151c599ae3457db5dbff5f0a6954f447d83b209e23ef2d5a7cbc2f
MD5 4d6f5b5162c293b61722a086345a1e79
BLAKE2b-256 8391a449a051306882172b763fa74056f23f580ab5ce221a53a79b9009191fb8

See more details on using hashes here.

File details

Details for the file pyrtools-1.0.10-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyrtools-1.0.10-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 11eb03b4136cccfa8ee391d6738821716f286f098cdf2cae54202b80ca219dbb
MD5 5c728148d7f5ff0d6fa47307c550b9ac
BLAKE2b-256 fd95535f50e66eef7a4b2f9973e255483f7d337f8dbc18a4ee271050a52bdac8

See more details on using hashes here.

File details

Details for the file pyrtools-1.0.10-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyrtools-1.0.10-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bdfda128eb6cd8dc60aca7c0ea3cffc6ef910bf98f10fde00599676360fa8495
MD5 4fb1919aa8f1dc541754132ccb2e7a30
BLAKE2b-256 9f31341de4c97e8fba227b1ac582e79d846cd08d366ca2375982527d3a8a32ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page