# pyrtools: tools for multi-scale image processing
[![PyPI Version](https://img.shields.io/pypi/v/pyrtools.svg)](https://pypi.org/project/pyrtools/)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pyrtools/badges/version.svg)](https://anaconda.org/conda-forge/pyrtools)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/LabForComputationalVision/pyrtools/blob/main/LICENSE)
![Python version](https://img.shields.io/badge/python-3.8|3.9|3.10|3.11|3.12-blue.svg)
[![Build Status](https://github.com/LabForComputationalVision/pyrtools/workflows/build/badge.svg)](https://github.com/LabForComputationalVision/pyrtools/actions?query=workflow%3Abuild)
[![Documentation Status](https://readthedocs.org/projects/pyrtools/badge/?version=latest)](https://pyrtools.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/137527035.svg)](https://zenodo.org/doi/10.5281/zenodo.10161031)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/v1.0.6?filepath=TUTORIALS%2F)
[![codecov](https://codecov.io/gh/LabForComputationalVision/pyrtools/branch/main/graph/badge.svg?token=Ei9TYftdYi)](https://codecov.io/gh/LabForComputationalVision/pyrtools)
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](https://github.com/LabForComputationalVision/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](https://github.com/LabForComputationalVision/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](https://zenodo.org/doi/10.5281/zenodo.10161031) (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](https://github.com/LabForComputationalVision/pyrtools)
# Installation
You can install `pyrtools` using either pip:
```sh
pip install pyrtools
```
or conda:
```sh
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:
``` sh
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:
- Brian Wandell's [Foundations of
Vision](https://foundationsofvision.stanford.edu/chapter-8-multiresolution-image-representations/),
chapter 8 (the rest of the book is helpful if you want to
understand the basics of the visual system).
- [Adelson et al, 1984, "Pyramid methods in image
processing".](http://persci.mit.edu/pub_pdfs/RCA84.pdf)
- Notes from David Heeger on [steerable
filters](http://www.cns.nyu.edu/~david/handouts/steerable.pdf)
- Notes from Eero Simoncelli on [the Steerable
Pyramid](http://www.cns.nyu.edu/~eero/STEERPYR/)
# 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](https://pyrtools.readthedocs.io/en/latest/).
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.
Raw data
{
"_id": null,
"home_page": null,
"name": "pyrtools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "image processing, visual information processing, computational models",
"author": "Pyrtools authors",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/05/f4/1d7d91918292206a305627f7152be275d200325c00d03483f27978c80c79/pyrtools-1.0.6.tar.gz",
"platform": null,
"description": "# pyrtools: tools for multi-scale image processing\n\n[![PyPI Version](https://img.shields.io/pypi/v/pyrtools.svg)](https://pypi.org/project/pyrtools/)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pyrtools/badges/version.svg)](https://anaconda.org/conda-forge/pyrtools)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/LabForComputationalVision/pyrtools/blob/main/LICENSE)\n![Python version](https://img.shields.io/badge/python-3.8|3.9|3.10|3.11|3.12-blue.svg)\n[![Build Status](https://github.com/LabForComputationalVision/pyrtools/workflows/build/badge.svg)](https://github.com/LabForComputationalVision/pyrtools/actions?query=workflow%3Abuild)\n[![Documentation Status](https://readthedocs.org/projects/pyrtools/badge/?version=latest)](https://pyrtools.readthedocs.io/en/latest/?badge=latest)\n[![DOI](https://zenodo.org/badge/137527035.svg)](https://zenodo.org/doi/10.5281/zenodo.10161031)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/v1.0.6?filepath=TUTORIALS%2F)\n[![codecov](https://codecov.io/gh/LabForComputationalVision/pyrtools/branch/main/graph/badge.svg?token=Ei9TYftdYi)](https://codecov.io/gh/LabForComputationalVision/pyrtools)\n\nBriefly, the tools include:\n - Recursive multi-scale image decompositions (pyramids), including\n Laplacian pyramids, QMFs, Wavelets, and steerable pyramids. These\n operate on 1D or 2D signals of arbitrary dimension.\n - Fast 2D convolution routines, with subsampling and boundary-handling.\n - Fast point-operations, histograms, histogram-matching.\n - Fast synthetic image generation: sine gratings, zone plates, fractals, etc.\n - Display routines for images and pyramids. These include several\n auto-scaling options, rounding to integer zoom factors to avoid\n resampling artifacts, and useful labeling (dimensions and gray-range).\n\nThis is a python 3 port of Eero Simoncelli's\n[matlabPyrTools](https://github.com/LabForComputationalVision/matlabPyrTools),\nbut it does not attempt to recreate all of the matlab code from matlabPyrTools.\nThe goal is to create a Python interface for the C code at the heart of\nmatlabPyrTools.\n\n**NOTE**: If you are only interested in the complex steerable pyramid, we have a\npytorch implementation in the\n[plenoptic](https://github.com/LabForComputationalVision/plenoptic/) package;\nthe implementation in plenoptic is differentiable.\n\n# Citing us\n\nIf you use `pyrtools` in a published academic article or presentation, please\ncite us! You can find the link to the most recent release on Zenodo\n[here](https://zenodo.org/doi/10.5281/zenodo.10161031) (though please specify\nthe version you used not the most recent one!). You can also get a formatted\ncitation at the top right of our [GitHub\nrepo](https://github.com/LabForComputationalVision/pyrtools)\n\n# Installation\n\nYou can install `pyrtools` using either pip:\n\n```sh\npip install pyrtools\n```\n\nor conda:\n\n```sh\nconda install pyrtools -c conda-forge\n```\n\nYou may also install from source, directly from the git repository. This is\nlargely useful if you are seeking to modify the code or make contributions. To\ndo so, clone the repository and run `pip install`. On Mac or Linux, that looks\nlike:\n\n``` sh\ngit clone https://github.com/LabForComputationalVision/pyrtools.git\ncd pyrtools/\npip install .\n```\n\nYou may also want an editable install, `pip install -e .`, in which case changes\nyou make in the source code will be reflected in your install.\n\n# Pyramid resources\n\nIf you would like to learn more about pyramids and why they're helpful\nfor image processing, here are some resources to get you started:\n\n - Brian Wandell's [Foundations of\n Vision](https://foundationsofvision.stanford.edu/chapter-8-multiresolution-image-representations/),\n chapter 8 (the rest of the book is helpful if you want to\n understand the basics of the visual system).\n - [Adelson et al, 1984, \"Pyramid methods in image\n processing\".](http://persci.mit.edu/pub_pdfs/RCA84.pdf)\n - Notes from David Heeger on [steerable\n filters](http://www.cns.nyu.edu/~david/handouts/steerable.pdf)\n - Notes from Eero Simoncelli on [the Steerable\n Pyramid](http://www.cns.nyu.edu/~eero/STEERPYR/)\n\n# Usage:\n\n- load modules:\n```\nimport pyrtools as pt\n```\n\n- create pyramid:\n```\npyr = pt.pyramids.LaplacianPyramid(img)\n```\n\n- reconstruct image from pyramid:\n```\nrecon_img = pyr.recon_pyr()\n```\n\nPlease see `TUTORIALS/02_pyramids.ipynb` for more examples.\n\n# For developres\n\n## Testing\n\nYou can find unit tests in `TESTS/unitTests.py` and run them with `python\nTESTS/unitTests.py`.\n\n## Build the documentation\n\nNOTE: If you just want to read the documentation, you do not need to\ndo this; documentation is built automatically on\n[readthedocs](https://pyrtools.readthedocs.io/en/latest/).\n\nHowever, it can be built locally as well. You would do this if you've\nmade changes locally to the documentation (or the docstrings) that you\nwould like to examine before pushing.\n\n```\n# create a new virtual environment and then...\n# install pyrtools with sphinx and documentation-related dependencies\npip install -e .[docs]\n# build documentation\ncd docs/\nmake html\n```\n\nThe index page of the documentation will then be located at\n`docs/_build/html/index.html`, open it in your browser to navigate\naround.\n",
"bugtrack_url": null,
"license": null,
"summary": "Python tools for multi-scale image processing, including Laplacian pyramids, Wavelets, and Steerable Pyramids.",
"version": "1.0.6",
"project_urls": {
"Documentation": "https://pyrtools.readthedocs.io/en/latest/",
"Download": "https://zenodo.org/records/10403034",
"Homepage": "https://github.com/LabForComputationalVision/pyrtools"
},
"split_keywords": [
"image processing",
" visual information processing",
" computational models"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "39ab7db2e90d4138d6e692c7269e9da8a1ad5cfd58239634d0e85660a6410e9b",
"md5": "6345f7e1330462a934f677f7e65aeacb",
"sha256": "ceda5aa6f19bc91dd568d933406b04e20c1f955c12f9ea03b34e2ddd485b67e9"
},
"downloads": -1,
"filename": "pyrtools-1.0.6-py3-none-macosx_10_9_x86_64.whl",
"has_sig": false,
"md5_digest": "6345f7e1330462a934f677f7e65aeacb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 95150,
"upload_time": "2024-11-13T17:39:00",
"upload_time_iso_8601": "2024-11-13T17:39:00.488883Z",
"url": "https://files.pythonhosted.org/packages/39/ab/7db2e90d4138d6e692c7269e9da8a1ad5cfd58239634d0e85660a6410e9b/pyrtools-1.0.6-py3-none-macosx_10_9_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "48df2165c518e135bc478fd9038da6283e1cd0a7be3fe6375598a692afe30188",
"md5": "1f2cf7b86950e56d5d037f128b8aef91",
"sha256": "b36794babb11b663c90d43a0080266afdc5ae67984a243493f933059ea7cc915"
},
"downloads": -1,
"filename": "pyrtools-1.0.6-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "1f2cf7b86950e56d5d037f128b8aef91",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 92138,
"upload_time": "2024-11-13T17:39:02",
"upload_time_iso_8601": "2024-11-13T17:39:02.292676Z",
"url": "https://files.pythonhosted.org/packages/48/df/2165c518e135bc478fd9038da6283e1cd0a7be3fe6375598a692afe30188/pyrtools-1.0.6-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bcf6e54642f78c19c0a001212e2afd02e6152df31d96dbe9e61423785ddaa337",
"md5": "c65eb24adffa74398f964cb8176d5598",
"sha256": "0e2a9b86e51cd4f3c95a6fc561285be4a9937747465e815062b81beeb9260811"
},
"downloads": -1,
"filename": "pyrtools-1.0.6-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "c65eb24adffa74398f964cb8176d5598",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 115873,
"upload_time": "2024-11-13T17:39:03",
"upload_time_iso_8601": "2024-11-13T17:39:03.401746Z",
"url": "https://files.pythonhosted.org/packages/bc/f6/e54642f78c19c0a001212e2afd02e6152df31d96dbe9e61423785ddaa337/pyrtools-1.0.6-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6b55b16c7777f6d0c63e7fa953afe166aaf018083d5fbd2d23eba7317fdbff8a",
"md5": "1be7a971f354dd2b8f4f6165be36a0b0",
"sha256": "f28be101c92f57d33443fb1e15cb4c23d07e888ba4591fe1b2ff07ea22cae2c8"
},
"downloads": -1,
"filename": "pyrtools-1.0.6-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "1be7a971f354dd2b8f4f6165be36a0b0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 99427,
"upload_time": "2024-11-13T17:39:04",
"upload_time_iso_8601": "2024-11-13T17:39:04.523865Z",
"url": "https://files.pythonhosted.org/packages/6b/55/b16c7777f6d0c63e7fa953afe166aaf018083d5fbd2d23eba7317fdbff8a/pyrtools-1.0.6-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "05f41d7d91918292206a305627f7152be275d200325c00d03483f27978c80c79",
"md5": "135f6c93dbf3daacffcf0d6b604b42b9",
"sha256": "0abfb5a7ccac9b40c8f9cdbc15edb4bd0090c7eed01dac9e9d668ed37bc8f99f"
},
"downloads": -1,
"filename": "pyrtools-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "135f6c93dbf3daacffcf0d6b604b42b9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7457112,
"upload_time": "2024-11-13T17:39:06",
"upload_time_iso_8601": "2024-11-13T17:39:06.672315Z",
"url": "https://files.pythonhosted.org/packages/05/f4/1d7d91918292206a305627f7152be275d200325c00d03483f27978c80c79/pyrtools-1.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-13 17:39:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LabForComputationalVision",
"github_project": "pyrtools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pyrtools"
}