Metadata-Version: 2.2
Name: mmcfilters
Version: 0.1.5
Summary: Library for connected image filtering based on morphological trees
Home-page: https://github.com/wonderalexandre/ComponentTreeLearn
Author: Wonder Alexandre Luz Alves
Author-email: worderalexandre@gmail.com
License: GPL-3.0
Project-URL: Source, https://github.com/wonderalexandre/ComponentTreeLearn
Project-URL: Documentation, https://github.com/wonderalexandre/ComponentTreeLearn
Keywords: morphological trees,mathematical morphology,image processing,computer vision
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Programming Language :: Python
Classifier: Programming Language :: C++
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: summary

# 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, topological and radiometric attributes.
* Attribute-based filters (direct and subtractive rules, pruning, openings, ultimate attribute opening, etc.).
* Utilities for extinction values, primitive families, MSER and Bit-Quads.
* Pybind11 bindings that expose the high-level operations to Python.

## Installation

```bash
pip install mmcfilters
```

## Quick example

```python
import numpy as np
import mmcfilters

img = np.random.randint(0, 255, size=(128, 128), dtype=np.uint8)
tree = mmcfilters.MorphologicalTree(img, True, 1.5)

attrs = mmcfilters.AttributeComputedIncrementally.computeSingleAttribute(tree, mmcfilters.Attribute.AREA)
area = np.asarray(attrs[1]).reshape(-1)

flt = mmcfilters.AttributeFilters(tree)
filtered = flt.filteringDirectRule(area > 50).reshape(img.shape)
```
