|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Wires Estimate, Differential, and HampelFilter for one stream without hiding any of them. More...
#include <MotionChannel.hpp>
Collaboration diagram for MayaFlux::Kinesis::MotionChannel< T >:Classes | |
| struct | DerivativeCacheEntry |
| One memoized derivative<N>() result, tagged by the update() generation it was computed for. More... | |
Public Member Functions | |
| template<size_t N> | |
| T | derivative () |
| Compute the N-th derivative, routed through a configured HampelFilter for that order if one exists. | |
| void | enable_trajectory_2d (Lattice2D lattice, size_t window=16) |
| Enable symbolic trajectory tracking over a 2D lattice. | |
| void | enable_trajectory_3d (Lattice3D lattice, size_t window=16) |
| Enable symbolic trajectory tracking over a 3D lattice. | |
| Stochastic::Estimate & | estimate_for_component (size_t component) |
| Direct access to one component's Estimate instance. | |
| HampelFilter< T > * | filter_for_order (size_t order) |
| Direct access to a configured filter, or nullptr if that order has no filter configured. | |
| void | filter_order (size_t order, size_t window=8, double threshold_mad=3.5, size_t max_consecutive_rejections=3) |
| Configure Hampel screening for one derivative order. | |
| Memory::HistoryBuffer< T > & | history () |
| Direct access to the underlying HistoryBuffer. | |
| double | last_dt () const |
| dt passed to the most recent update() call | |
| MotionChannel (Stochastic::EstimateModel model, size_t window, double adapt_rate=0.05, size_t history_capacity=8) | |
| Construct a channel. | |
| SymbolicTrajectory< Lattice2D, glm::uvec2 > * | trajectory_2d () |
| Direct access to the 2D trajectory, or nullptr if not enabled. | |
| SymbolicTrajectory< Lattice3D, glm::uvec3 > * | trajectory_3d () |
| Direct access to the 3D trajectory, or nullptr if not enabled. | |
| void | update (const T &raw_sample, double dt) |
| Feed one raw sample, denoise it, and push the cleaned value. | |
Static Public Attributes | |
| static constexpr size_t | component_count = estimate_component_count_v<T> |
Private Attributes | |
| std::map< size_t, DerivativeCacheEntry > | m_derivative_cache |
| std::vector< Stochastic::Estimate > | m_estimates |
| std::map< size_t, std::unique_ptr< HampelFilter< T > > > | m_filters |
| uint64_t | m_generation { 0 } |
| Memory::HistoryBuffer< T > | m_history |
| double | m_last_dt { 0.0 } |
| std::unique_ptr< SymbolicTrajectory< Lattice2D, glm::uvec2 > > | m_trajectory_2d |
| std::unique_ptr< SymbolicTrajectory< Lattice3D, glm::uvec3 > > | m_trajectory_3d |
Wires Estimate, Differential, and HampelFilter for one stream without hiding any of them.
A caller tracking a raw stream through denoise -> differentiate -> spike-screen has to make several real decisions: which EstimateModel fits this stream's behavior, what window sizes, which derivative orders (velocity, acceleration, ...) actually need Hampel screening versus which can be trusted straight out of Differential. None of those decisions have validated defaults; they depend on the specific device and use case. MotionChannel does not guess them. It requires the caller to configure each one explicitly through methods named after the exact class and parameter being configured, then does the mechanical wiring (per-component Estimate fan-out for vector T, HistoryBuffer maintenance, routing each requested derivative order through its configured filter or leaving it unfiltered) so the caller is not hand-assembling that plumbing at every call site.
Every piece MotionChannel owns is reachable: estimate_for_component(), history(), filter_for_order() return direct references, so a caller can inspect or override anything the builder configured rather than trusting an opaque pipeline.
| T | Sample type: double, glm::vec2, or glm::vec3. |
Definition at line 107 of file MotionChannel.hpp.