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

Computes geometric central moments up to third order. More...

#include <MomentBasedAttributeComputer.hpp>

Static Public Member Functions

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

Static Public Attributes

static constexpr std::string_view familyName = "central-moments"
 Family name used in dependency-plan diagnostics.
 
static constexpr AttributeComputerFamily family = AttributeComputerFamily::CentralMoments
 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 central moments produced together.
 

Detailed Description

Computes geometric central moments up to third order.

The computer exposes the classical central moments required by the rest of the moment-based descriptors:

The implementation is organised in two passes over the hierarchy:

  1. accumulate raw geometric moments over each subtree support;
  2. convert those raw moments to central moments at the node centroid.

Raw moments are additive across disjoint supports, so child values can be merged directly into their parent without the centroid-shift error that occurs when summing already-centralised child moments.

Definition at line 419 of file MomentBasedAttributeComputer.hpp.

Member Function Documentation

◆ compute()

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

Computes the requested central moments.

The output buffer is indexed by dense internal node id and interpreted by context.attrNames. Coordinates are row-major image coordinates interpreted as (x = column, y = row). The method accumulates raw moments bottom-up and converts them to central moments after each subtree support has been assembled.

Parameters
contextOperation context or diagnostic label.

Definition at line 448 of file MomentBasedAttributeComputer.hpp.

◆ computeUnitRows()

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

Materializes central moments for one-pixel unit supports.

All central moments of a one-pixel support are zero.

Parameters
contextOperation context or diagnostic label.

Definition at line 462 of file MomentBasedAttributeComputer.hpp.

Member Data Documentation

◆ domain

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

Execution domain required by the computer.

Definition at line 428 of file MomentBasedAttributeComputer.hpp.

◆ family

constexpr AttributeComputerFamily mmcfilters::attributes::computers::CentralMomentsComputer::family = AttributeComputerFamily::CentralMoments
staticconstexpr

Stable family id used by the scheduler.

Definition at line 425 of file MomentBasedAttributeComputer.hpp.

◆ familyName

constexpr std::string_view mmcfilters::attributes::computers::CentralMomentsComputer::familyName = "central-moments"
staticconstexpr

Family name used in dependency-plan diagnostics.

Definition at line 422 of file MomentBasedAttributeComputer.hpp.

◆ producedAttributes

constexpr std::array<Attribute, 7> mmcfilters::attributes::computers::CentralMomentsComputer::producedAttributes
inlinestaticconstexpr
Initial value:
{CentralMoment20, CentralMoment02, CentralMoment11, CentralMoment30,
CentralMoment03, CentralMoment21, CentralMoment12}

Canonical list of central moments produced together.

Definition at line 433 of file MomentBasedAttributeComputer.hpp.


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