|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API double MayaFlux::Kinesis::Discrete::estimate_frequency | ( | std::span< const double > | data, |
| double | sample_rate, | ||
| double | fallback = 0.0, |
||
| double | threshold = 0.0 |
||
| ) |
Estimate the dominant cycle frequency of a sampled signal.
Detects zero-crossing positions in data and derives frequency from the mean inter-crossing interval. Each consecutive pair of crossings represents one half-period; the mean of all half-periods gives a robust estimate robust to occasional spurious crossings.
Returns fallback when fewer than two crossings are found (signal is silent, DC, or the buffer is shorter than one half-cycle).
| data | Input span (any sampled sequence) |
| sample_rate | Samples per second |
| fallback | Value returned when estimation is not possible |
| threshold | Zero-crossing detection threshold (default: 0.0) |
fallback Definition at line 646 of file Analysis.cpp.
References estimate_frequency(), MayaFlux::Kinesis::threshold(), and zero_crossing_positions().
Referenced by estimate_frequency().
Here is the call graph for this function:
Here is the caller graph for this function: