mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
mmcfilters::DepthStableRegionComputer< Real > Class Template Reference

Detects stable regions from a topological depth window. More...

#include <DepthStableRegionComputer.hpp>

Public Types

using variation_value_type = Real
 Floating-point type used to store variation scores.
 

Public Member Functions

 DepthStableRegionComputer (const MorphologicalTree &tree, std::vector< Real > attr)
 Creates a detector backed by an owned increasing-attribute buffer.
 
 DepthStableRegionComputer (const MorphologicalTree &tree, const Real *attr)
 Creates a detector backed by a non-owning attribute buffer.
 
 DepthStableRegionComputer (const MorphologicalTree &tree)
 Creates a detector that lazily computes topology-only AREA.
 
 DepthStableRegionComputer (const DepthStableRegionComputer &)=default
 Copies the evaluator while preserving owned-buffer safety.
 
 DepthStableRegionComputer (DepthStableRegionComputer &&) noexcept=default
 Moves the evaluator while preserving its referenced tree.
 
DepthStableRegionComputeroperator= (const DepthStableRegionComputer &)=delete
 Assignment is unavailable because the evaluator stores a tree reference.
 
DepthStableRegionComputeroperator= (DepthStableRegionComputer &&)=delete
 Move assignment is unavailable because the evaluator stores a tree reference.
 
std::vector< uint8_tcomputeByDepth (int depthWindowRadius)
 Computes the stable-region indicator vector for a positive depth-window radius.
 
Real getVariation (NodeId node)
 Returns the variation score currently associated with a node.
 
Real getAttribute (NodeId node)
 Returns the increasing attribute used by the stability measure.
 
NodeId nodeWithMinimumVariationInWindow (NodeId node) const
 Returns the node with minimum variation in the depth window.
 
NodeId ancestorInStabilityWindow (NodeId node) const
 Returns the ancestor used in the current depth window.
 
NodeId descendantInStabilityWindow (NodeId node) const
 Returns the descendant used in the current depth window.
 
std::vector< Real > & getVariations ()
 Returns the current variation array, indexed by node slot.
 
int numNodes () const
 Returns the number of nodes selected in the last run.
 
void setMaxVariation (Real value)
 Sets the maximum accepted variation value.
 
void setMinAttribute (Real value)
 Sets the lower bound of the accepted attribute interval.
 
void setMaxAttribute (Real value)
 Sets the upper bound of the accepted attribute interval.
 

Detailed Description

template<std::floating_point Real = float>
class mmcfilters::DepthStableRegionComputer< Real >

Detects stable regions from a topological depth window.

This class is the self-dual/topological counterpart of MSERComputer. depthWindowRadius is a number of tree edges, not an altitude distance:

The variation value uses the same area-variation form as MSER:

variation(node) = (attr(ancestor(node)) - attr(descendant(node))) / attr(node)

and selected nodes are strict local minima of this variation. The default attribute is AREA, computed from topology only.

Definition at line 41 of file DepthStableRegionComputer.hpp.

Member Typedef Documentation

◆ variation_value_type

template<std::floating_point Real = float>
using mmcfilters::DepthStableRegionComputer< Real >::variation_value_type = Real

Floating-point type used to store variation scores.

Definition at line 44 of file DepthStableRegionComputer.hpp.

Constructor & Destructor Documentation

◆ DepthStableRegionComputer() [1/3]

template<std::floating_point Real = float>
mmcfilters::DepthStableRegionComputer< Real >::DepthStableRegionComputer ( const MorphologicalTree tree,
std::vector< Real >  attr 
)
inline

Creates a detector backed by an owned increasing-attribute buffer.

Parameters
treeTree topology.
attrAttribute requested by the operation.

Definition at line 115 of file DepthStableRegionComputer.hpp.

◆ DepthStableRegionComputer() [2/3]

template<std::floating_point Real = float>
mmcfilters::DepthStableRegionComputer< Real >::DepthStableRegionComputer ( const MorphologicalTree tree,
const Real *  attr 
)
inline

Creates a detector backed by a non-owning attribute buffer.

Parameters
treeTree topology.
attrAttribute requested by the operation.

Definition at line 127 of file DepthStableRegionComputer.hpp.

◆ DepthStableRegionComputer() [3/3]

template<std::floating_point Real = float>
mmcfilters::DepthStableRegionComputer< Real >::DepthStableRegionComputer ( const MorphologicalTree tree)
inlineexplicit

Creates a detector that lazily computes topology-only AREA.

Parameters
treeTree topology.

Definition at line 138 of file DepthStableRegionComputer.hpp.

Member Function Documentation

◆ ancestorInStabilityWindow()

template<std::floating_point Real = float>
NodeId mmcfilters::DepthStableRegionComputer< Real >::ancestorInStabilityWindow ( NodeId  node) const
inline

Returns the ancestor used in the current depth window.

Parameters
nodeNode identifier.
Returns
The ancestor used in the current depth window.

Definition at line 218 of file DepthStableRegionComputer.hpp.

◆ computeByDepth()

template<std::floating_point Real = float>
std::vector< uint8_t > mmcfilters::DepthStableRegionComputer< Real >::computeByDepth ( int  depthWindowRadius)
inline

Computes the stable-region indicator vector for a positive depth-window radius.

Parameters
depthWindowRadiusPositive depth-window radius in tree edges.
Returns
The computed stable-region indicator vector.

Definition at line 155 of file DepthStableRegionComputer.hpp.

◆ descendantInStabilityWindow()

template<std::floating_point Real = float>
NodeId mmcfilters::DepthStableRegionComputer< Real >::descendantInStabilityWindow ( NodeId  node) const
inline

Returns the descendant used in the current depth window.

Parameters
nodeNode identifier.
Returns
The descendant used in the current depth window.

Definition at line 229 of file DepthStableRegionComputer.hpp.

◆ getAttribute()

template<std::floating_point Real = float>
Real mmcfilters::DepthStableRegionComputer< Real >::getAttribute ( NodeId  node)
inline

Returns the increasing attribute used by the stability measure.

Parameters
nodeNode identifier.
Returns
Increasing-attribute value of the requested node.

Definition at line 187 of file DepthStableRegionComputer.hpp.

◆ getVariation()

template<std::floating_point Real = float>
Real mmcfilters::DepthStableRegionComputer< Real >::getVariation ( NodeId  node)
inline

Returns the variation score currently associated with a node.

Parameters
nodeNode identifier.
Returns
The variation score currently associated with a node.

Definition at line 174 of file DepthStableRegionComputer.hpp.

◆ getVariations()

template<std::floating_point Real = float>
std::vector< Real > & mmcfilters::DepthStableRegionComputer< Real >::getVariations ( )
inline

Returns the current variation array, indexed by node slot.

Returns
The current variation array, indexed by node slot.

Definition at line 239 of file DepthStableRegionComputer.hpp.

◆ nodeWithMinimumVariationInWindow()

template<std::floating_point Real = float>
NodeId mmcfilters::DepthStableRegionComputer< Real >::nodeWithMinimumVariationInWindow ( NodeId  node) const
inline

Returns the node with minimum variation in the depth window.

Parameters
nodeNode identifier.
Returns
The node with minimum variation in the depth window.

Definition at line 205 of file DepthStableRegionComputer.hpp.

◆ numNodes()

template<std::floating_point Real = float>
int mmcfilters::DepthStableRegionComputer< Real >::numNodes ( ) const
inline

Returns the number of nodes selected in the last run.

Returns
The number of nodes selected in the last run.

Definition at line 249 of file DepthStableRegionComputer.hpp.

◆ setMaxAttribute()

template<std::floating_point Real = float>
void mmcfilters::DepthStableRegionComputer< Real >::setMaxAttribute ( Real  value)
inline

Sets the upper bound of the accepted attribute interval.

Parameters
valueValue.

Definition at line 273 of file DepthStableRegionComputer.hpp.

◆ setMaxVariation()

template<std::floating_point Real = float>
void mmcfilters::DepthStableRegionComputer< Real >::setMaxVariation ( Real  value)
inline

Sets the maximum accepted variation value.

Parameters
valueValue.

Definition at line 259 of file DepthStableRegionComputer.hpp.

◆ setMinAttribute()

template<std::floating_point Real = float>
void mmcfilters::DepthStableRegionComputer< Real >::setMinAttribute ( Real  value)
inline

Sets the lower bound of the accepted attribute interval.

Parameters
valueValue.

Definition at line 266 of file DepthStableRegionComputer.hpp.


The documentation for this class was generated from the following file: