mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
mmcfilters::attributes::computers::HuMomentsComputer Class Reference

Computes the seven Hu invariant moments. More...

#include <MomentBasedAttributeComputer.hpp>

Static Public Member Functions

template<std::floating_point Real>
static void compute (const AttributeComputeContext< Real > &context)
 Computes the requested Hu invariant moments.
 
template<std::floating_point Real>
static void computeUnitRows (const UnitAttributeComputeContext< Real > &context)
 Materializes Hu moments for one-pixel unit supports.
 

Static Public Attributes

static constexpr std::string_view familyName = "hu-moments"
 Family name used in dependency-plan diagnostics.
 
static constexpr AttributeComputerFamily family = AttributeComputerFamily::HuMoments
 Stable family id used by the scheduler.
 
static constexpr AttributeComputerDomain domain = AttributeComputerDomain::Topology
 Execution domain required by the computer.
 
static constexpr std::array< Attribute, 7 > producedAttributes
 Canonical list of Hu moments produced together.
 

Detailed Description

Computes the seven Hu invariant moments.

Hu moments are derived from normalised central moments and provide descriptors that are invariant to translation, scale, and rotation. This computer expects the central moments and AREA to have been materialised by upstream computers, then evaluates the seven classical Hu combinations for each live node independently.

Note
The normalisation step is undefined for degenerate zero-area supports. In practice such supports should not occur for live nodes in a valid tree.

Definition at line 490 of file MomentBasedAttributeComputer.hpp.

Member Function Documentation

◆ compute()

template<std::floating_point Real>
static void mmcfilters::attributes::computers::HuMomentsComputer::compute ( const AttributeComputeContext< Real > &  context)
inlinestatic

Computes the requested Hu invariant moments.

Requires one dependency source containing all central moments and another containing AREA. Sources are resolved semantically through context.dependencies, so their order in the dependency span is not part of the contract.

Parameters
contextOperation context or diagnostic label.

Definition at line 518 of file MomentBasedAttributeComputer.hpp.

◆ computeUnitRows()

template<std::floating_point Real>
static void mmcfilters::attributes::computers::HuMomentsComputer::computeUnitRows ( const UnitAttributeComputeContext< Real > &  context)
inlinestatic

Materializes Hu moments for one-pixel unit supports.

The degenerate one-pixel support uses zero for all Hu invariants in the exported unit path.

Parameters
contextOperation context or diagnostic label.

Definition at line 547 of file MomentBasedAttributeComputer.hpp.

Member Data Documentation

◆ domain

constexpr AttributeComputerDomain mmcfilters::attributes::computers::HuMomentsComputer::domain = AttributeComputerDomain::Topology
staticconstexpr

Execution domain required by the computer.

Definition at line 499 of file MomentBasedAttributeComputer.hpp.

◆ family

constexpr AttributeComputerFamily mmcfilters::attributes::computers::HuMomentsComputer::family = AttributeComputerFamily::HuMoments
staticconstexpr

Stable family id used by the scheduler.

Definition at line 496 of file MomentBasedAttributeComputer.hpp.

◆ familyName

constexpr std::string_view mmcfilters::attributes::computers::HuMomentsComputer::familyName = "hu-moments"
staticconstexpr

Family name used in dependency-plan diagnostics.

Definition at line 493 of file MomentBasedAttributeComputer.hpp.

◆ producedAttributes

constexpr std::array<Attribute, 7> mmcfilters::attributes::computers::HuMomentsComputer::producedAttributes
inlinestaticconstexpr
Initial value:
{HuMoment1, HuMoment2, HuMoment3, HuMoment4,
HuMoment5, HuMoment6, HuMoment7}

Canonical list of Hu moments produced together.

Definition at line 504 of file MomentBasedAttributeComputer.hpp.


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