MorphologicalAttributeFilters
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.
 
std::vector< uint8_tcomputeByDepth (int depthDelta)
 Computes the stable-region indicator vector for a positive depth delta.
 
Real getVariation (NodeId node)
 Returns the variation score currently associated with a node.
 
Real getAttribute (NodeId node)
 Returns the increasing attribute used by the criterion.
 
NodeId nodeWithMinimumVariationInWindow (NodeId node) const
 Returns the node with minimum variation in the depth window.
 
NodeId ascendantInStabilityWindow (NodeId node) const
 Returns the ascendant 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 getNumNodes () 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. depthDelta is a number of tree edges, not an altitude distance:

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

variation(node) = (attr(asc(node)) - attr(desc(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 40 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 43 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.

Definition at line 75 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.

Definition at line 84 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.

Definition at line 94 of file DepthStableRegionComputer.hpp.

Member Function Documentation

◆ ascendantInStabilityWindow()

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

Returns the ascendant used in the current depth window.

Definition at line 183 of file DepthStableRegionComputer.hpp.

◆ computeByDepth()

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

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

Definition at line 100 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.

Definition at line 188 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 criterion.

Definition at line 152 of file DepthStableRegionComputer.hpp.

◆ getNumNodes()

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

Returns the number of nodes selected in the last run.

Definition at line 198 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.

Definition at line 130 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.

Definition at line 193 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.

Definition at line 164 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.

Definition at line 213 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.

Definition at line 203 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.

Definition at line 208 of file DepthStableRegionComputer.hpp.


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