MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ peak_per_channel()

MAYAFLUX_API std::vector< double > MayaFlux::peak_per_channel ( const std::vector< Kakshya::DataVariant > &  channels)

Find peak amplitude per channel for multi-channel data.

Parameters
channelsVector of channel data
Returns
Vector of peak amplitude values, one per channel

Definition at line 242 of file Yantra.cpp.

243{
244 auto analyzer = std::make_shared<Yantra::StandardEnergyAnalyzer>();
245 analyzer->set_energy_method(Yantra::EnergyMethod::PEAK);
246 auto result = analyzer->analyze_energy(channels);
247 std::vector<double> peaks;
248 for (const auto& channel : result.channels) {
249 peaks.push_back(channel.max_energy);
250 }
251 return peaks;
252}

References MayaFlux::Yantra::PEAK.