MayaFlux 0.3.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 244 of file Yantra.cpp.

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

References MayaFlux::Yantra::PEAK.