Detects MSER-like nodes from a monotone increasing attribute defined on the hierarchy.
More...
|
| | MSERComputer (const ValuedMorphologicalTree< T > &valuedTree, std::vector< Real > attr_increasing) |
| | Creates an MSER detector backed by an owned attribute buffer.
|
| | MSERComputer (const ValuedMorphologicalTree< T > &valuedTree, const Real *attr_increasing) |
| | Creates an MSER detector backed by a non-owning attribute view.
|
| | MSERComputer (const ValuedMorphologicalTree< T > &valuedTree) |
| | Creates an MSER detector that lazily falls back to AREA.
|
|
| MSERComputer (const MSERComputer &)=default |
| | Copies the evaluator while preserving owned-buffer safety.
|
|
| MSERComputer (MSERComputer &&) noexcept=default |
| | Moves the evaluator while preserving its referenced tree.
|
|
MSERComputer & | operator= (const MSERComputer &)=delete |
| | Assignment is unavailable because the evaluator stores tree references.
|
|
MSERComputer & | operator= (MSERComputer &&)=delete |
| | Move assignment is unavailable because the evaluator stores tree references.
|
|
| ~MSERComputer ()=default |
| | Destroys the MSER evaluator.
|
| std::vector< uint8_t > | computeMSER (AltitudeDifference< T > altitudeWindowRadius) |
| | Computes the MSER indicator vector for an altitude-window radius.
|
| Real | getVariation (NodeId node) |
| | Returns the variation score currently associated with a node.
|
| Real | getAttrMSER (NodeId node) |
| | Returns the attribute used by the MSER stability measure, lazily computing AREA when no external buffer has been provided.
|
| NodeId | nodeWithMinimumVariationInWindow (NodeId node) |
| | Returns the node with minimum variation among the current node and its altitude-window neighbours.
|
| NodeId | ancestorInStabilityWindow (NodeId node) const |
| | Returns the ancestor used in the current stability window.
|
| NodeId | descendantInStabilityWindow (NodeId node) const |
| | Returns the descendant used in the current stability window.
|
| std::vector< Real > & | getVariations () |
| | Returns the current variation array, indexed by node slot.
|
| int | numNodes () |
| | Returns the number of nodes selected as MSER-like in the last run.
|
| void | setMaxVariation (Real maxVariation) |
| | Sets the maximum accepted variation value.
|
| void | setMinAttribute (Real minAttr) |
| | Sets the lower bound of the accepted attribute interval.
|
| void | setMaxAttribute (Real maxAttr) |
| | Sets the upper bound of the accepted attribute interval.
|
template<AltitudeValue T, std::floating_point Real = float>
class mmcfilters::MSERComputer< T, Real >
Detects MSER-like nodes from a monotone increasing attribute defined on the hierarchy.
The class implements the classical MSER stability measure in tree form. It is intentionally tied to ValuedMorphologicalTree<T>: the altitude neighbourhood is computed from the altitude buffer owned by the valuedTree tree, not from an arbitrary external altitude array. Given an altitude-window radius, each node is paired with an ancestor and a descendant located at the requested distance in altitude space. The node variation is then defined from a monotone increasing attribute as:
variation(node) = (attr(ancestor(node)) - attr(descendant(node))) / attr(node)
A node is marked as MSER-like when:
- both window neighbours exist;
- its variation is a strict local minimum with respect to those neighbours;
- the variation lies below maxVariation;
- the attribute value is within the user-specified [minAttr, maxAttr] acceptance interval.
If no external attribute buffer is supplied, the class lazily computes AREA and uses it as the increasing attribute. The object may therefore act either as a lightweight view over an externally owned buffer or as a small owner of the fallback AREA buffer.
- Note
- MSER requires a globally monotone altitude capability on the topology. Standard max-tree and min-tree producers provide that capability. Standard tree-of-shapes and self-dual residual-tree producers publish NodeAltitudeOrder::Unconstrained and are therefore rejected. The descriptive tree kind itself is not used as the acceptance gate.
Definition at line 59 of file MSERComputer.hpp.