mmorph
Mathematical morphology for NumPy images. mmorph is the successor of the SDC Morphology Toolbox: the same well-tested C core, with a modern Python API, binary wheels for current Python versions and NumPy 2.
pip install mmorph # NumPy and Pillow
pip install "mmorph[viz]" # plus matplotlib, for mmorph.viz.show and friends
import mmorph as mm
from mmorph import se
f = mm.data.load("cameraman")
grad = mm.morphological_gradient(f, se.box())
markers = mm.regional_minima(mm.h_minima_filter(grad, 20))
regions = mm.watershed(grad, markers, output="regions")
mm.viz.show_labels(regions)
It covers classical filters (dilation, erosion, openings, closings,
top-hats, alternating sequential filters), connected filters
(reconstruction, area and attribute filters, h-maxima, max-tree), watersheds,
distance transforms, skeletons, hit-or-miss transforms and measurements, on 2D
images and 3D volumes. Images are plain NumPy arrays: bool for binary images
and uint8, uint16 or int32 for grayscale.
Code written for the original toolbox keeps working through mmorph.compat,
which provides the mm* functions with their original behavior:
from mmorph.compat import *
g = mmopen(mmreadgray("cameraman.tif"), mmsedisk(3))
Every function is checked against the original toolbox on sample images, on random inputs and with the original test suite; defects found on the way (memory errors, wrong results on 64-bit platforms and on volumes) are fixed.
License
mmorph is distributed under the license of the SDC Morphology Toolbox,
included in the package as LICENSE.txt.
Metadata
Release files for mmorph 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 28.1 MB
Release files / mmorph-2.0.0-cp312-abi3-win_arm64.whl
| Download URL | mmorph-2.0.0-cp312-abi3-win_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
1a0e414e61cb6632b4d6f1f5d3986c1bafd45d15f388e9c7c374700c1035ebae
|
|
BLAKE2b-256 checksum How to use checksums |
fddedb6fb822ef8ce5c9c1d478e758eb522aafd89210db82070a028f4ddf25ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp312-abi3-win_amd64.whl
| Download URL | mmorph-2.0.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c962e61b7660183e3ded181e260beed5c064ab2cb9f550f759a39b61432cc3be
|
|
BLAKE2b-256 checksum How to use checksums |
bf3281720c33429561dff9b8bd68d452170dcc42313344134a147dad07c9c6bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp312-abi3-musllinux_1_2_x86_64.whl
| Download URL | mmorph-2.0.0-cp312-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f796dd46d3953bbb7d484fd5408a4e18537d2e95cb41d47604ebe9e39654ac3a
|
|
BLAKE2b-256 checksum How to use checksums |
bfbcc57b18cba535baf3445076d0be1095496e6880630940594be70329107368
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp312-abi3-musllinux_1_2_aarch64.whl
| Download URL | mmorph-2.0.0-cp312-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0c53d02aac5a4d517d83567314fc47b0d7ef4f8acf8f7c0ae681deaed6f3b708
|
|
BLAKE2b-256 checksum How to use checksums |
81e10131bd53f826000191a10e53a62bb667076f5eb3396cf8d17f17b597ec46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | mmorph-2.0.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c26f0cc34c963fcc23369cfea13ef29f53f884d430d1f417be2a263b15a4da8f
|
|
BLAKE2b-256 checksum How to use checksums |
19454237e4ea0d5ab5e3228bbe44e9294d04f37c0feefcd8ebbd0957a13d5b22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | mmorph-2.0.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
ba8c23facd9590f8f8466e93ec52ee285da7eed060b4e417ab5f027cdf32c018
|
|
BLAKE2b-256 checksum How to use checksums |
8fbac5cfa4c9049797ad3922348b6e9e8549d46fe2739c7d3c189fd4972b5c6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | mmorph-2.0.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
138d2ea3b03440f91afcb7c489189c45b3e47f5d74d1ba5685763291fe8fca69
|
|
BLAKE2b-256 checksum How to use checksums |
56b68377c2abaeb10ce83218965497f3294abacba3b0e277365eee2ef1318e40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp312-abi3-macosx_10_15_x86_64.whl
| Download URL | mmorph-2.0.0-cp312-abi3-macosx_10_15_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 abi3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
056bb247adc42180ef230c2db797cb0f63589ba44f0a15350e9032902b1459b5
|
|
BLAKE2b-256 checksum How to use checksums |
9e3534c51f5201c5f414c4afe5e1fe4b8b71139b6ffdbf5d109bca5b18d5e322
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp311-cp311-win_arm64.whl
| Download URL | mmorph-2.0.0-cp311-cp311-win_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
c2d0b26ea821f4373c2fa4e175bb1d50e7909a02e14802a8a62d8f6785dc8293
|
|
BLAKE2b-256 checksum How to use checksums |
ade40774e03c1aa13bbd201a520b2972a5de34e6ba956bca186040c9ee8e742b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp311-cp311-win_amd64.whl
| Download URL | mmorph-2.0.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5c9c9f7da9feee663d1b6e9255c4e15836362808c0322f1981964be36d8f543a
|
|
BLAKE2b-256 checksum How to use checksums |
cf9493b2849c4dc30562f71bd191930684125be1ba493993f83ca370040db07a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | mmorph-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
80638a6d8ab24e2449ef52609bcf8ffaf3286db94749e0c550d84d3592484e61
|
|
BLAKE2b-256 checksum How to use checksums |
31638cde351b23f60d680f58a3efd43cfa6b43fcad6b73d69153c2a20b761a2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl
| Download URL | mmorph-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
14b63e20bec2fb805faba20dd9fe50cf4ca8c0084d18e49d1f7071967b7a47cc
|
|
BLAKE2b-256 checksum How to use checksums |
3724dad77e68c669df8c70930a43662a45e67c1470bc5cb7a32dd57a7c15075b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | mmorph-2.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d84623609907d6298b456c824950ee716d77d90c7098f5824f2c96107576ab1e
|
|
BLAKE2b-256 checksum How to use checksums |
42c301f2a26ddb6eea1f9d90c8b19c3a62a426cba80ba483839b11be65d26b5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | mmorph-2.0.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
be5feb7cc2eacc4049314fd10177ea2f279a61901f2968675f2953a6ad6842e0
|
|
BLAKE2b-256 checksum How to use checksums |
a4125b47b4579b90561d95dfff35aee0ab52682e20b26f980ac6356d897c0d73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | mmorph-2.0.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bb8e788e0307d8057778adbbfb8b9e244e6e2ae9c7574ffe2a9b1721f43456ae
|
|
BLAKE2b-256 checksum How to use checksums |
520c747f2b29ebd085843089f3592d9ea7d178b8b6a517aad456287df6397ff7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / mmorph-2.0.0-cp311-cp311-macosx_10_15_x86_64.whl
| Download URL | mmorph-2.0.0-cp311-cp311-macosx_10_15_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
c4a690e3f870672fa29246a683b5e6a17879fe614052fb215ce990edafdb07d0
|
|
BLAKE2b-256 checksum How to use checksums |
0e7d4cfc6cd84fa9b9e046195bedcd02bde5575d94ce40605d2a954e1e462bb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency log