Skip to main content

Library for connected image filtering based on morphological trees

Project description

MorphologicalAttributeFilters

MorphologicalAttributeFilters is a C++/Python library for connected image filtering based on morphological trees (component trees and trees of shapes). The code provides high-performance implementations together with Python bindings for interactive experimentation.

Key features

  • Construction of morphological trees (component tree, tree of shapes) with different connectivities.
  • Incremental computation of geometric, bit-quads, topological, stats and other attributes.
  • Attribute-based filters (direct and subtractive rules).
  • Utilities for extinction values and MSER.
  • Pybind11 bindings that expose the high-level operations to Python.

Installation

pip install mmcfilters

Quick example

import numpy as np
import mmcfilters
Type = mmcfilters.Attribute.Type

img = np.random.randint(0, 255, size=(128, 128), dtype=np.uint8)

maxtree = mmcfilters.MorphologicalTree(img, True, 1.5)
#mintree = mmcfilters.MorphologicalTree(img, False, 1.5)
#tos = mmcfilters.MorphologicalTree(img) 

filter = mmcfilters.AttributeFilters(maxtree)
area = mmcfilters.Attribute.computeSingleAttribute(maxtree, Type.AREA)

img_filtered = filter.filteringDirectRule(area > 50)

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

mmcfilters-0.1.25.tar.gz (13.7 MB view details)

Uploaded Source

Built Distribution

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

mmcfilters-0.1.25-cp312-cp312-macosx_11_0_arm64.whl (683.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file mmcfilters-0.1.25.tar.gz.

File metadata

  • Download URL: mmcfilters-0.1.25.tar.gz
  • Upload date:
  • Size: 13.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mmcfilters-0.1.25.tar.gz
Algorithm Hash digest
SHA256 b9e51f891df4516026de606122332954c275fc640405713ab3497ef39c7a0c4d
MD5 9b18e79f78f6f92f090a54c36d17b18e
BLAKE2b-256 0242e37ee0a83235a4653a912c305944f4587715c8bd51c434ecc74840f444cb

See more details on using hashes here.

File details

Details for the file mmcfilters-0.1.25-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mmcfilters-0.1.25-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4166fea40e2af83b68558709c62cf3aaf37a9008d569f157a6bafa4610f7e59d
MD5 7badba0d40218fb73a0d14d98b02d1e5
BLAKE2b-256 f789849068fd93c4b7fc699977a4d537e3d66e869f1c5b8d96c194e5a4995b0c

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