#include <SpectralPeakDescriptors.hxx>
Definition at line 39 of file SpectralPeakDescriptors.hxx.
Public Member Functions | |
DYNAMIC_TYPE_USING_INTERFACE (SpectralPeakDescriptors, 10, Descriptor) | |
DYN_ATTRIBUTE (0, public, TData, MagnitudeMean) | |
The average amplitude (arithmetic mean) of the spectral peaks. | |
DYN_ATTRIBUTE (1, public, TData, HarmonicCentroid) | |
The center of gravity of the spectral peaks. | |
DYN_ATTRIBUTE (2, public, TData, HarmonicDeviation) | |
Spectral deviation of magnitude components from spectral envelope. | |
DYN_ATTRIBUTE (3, public, TData, FirstTristimulus) | |
Energy ratio of the first harmonic to the energy of all peaks. | |
DYN_ATTRIBUTE (4, public, TData, SecondTristimulus) | |
Energy ratio of the second, third and forth harmonic to the energy of all peaks. | |
DYN_ATTRIBUTE (5, public, TData, ThirdTristimulus) | |
Energy ratio of all the harmonics starting from the fifth to the energy of all peaks. | |
DYN_ATTRIBUTE (6, public, TData, OddHarmonics) | |
Energy ratio of odd harmonics (excluding the fundamental) to the energy of all peaks. | |
DYN_ATTRIBUTE (7, public, TData, EvenHarmonics) | |
Energy ratio of even harmonics to the energy of all peaks. | |
DYN_ATTRIBUTE (8, public, TData, OddToEvenRatio) | |
Ratio of "OddHarmonics" to "EvenHarmonics". | |
DYN_ATTRIBUTE (9, public, Array< TData >, HPCP) | |
SpectralPeakDescriptors (SpectralPeakArray *pSpectralPeakArray) | |
SpectralPeakDescriptors (TData initVal) | |
const SpectralPeakArray * | GetpSpectralPeakArray () const |
void | SetpSpectralPeakArray (SpectralPeakArray *pSpectralPeakArray) |
void | ConcreteCompute () |
CLAM::SpectralPeakDescriptors::SpectralPeakDescriptors | ( | SpectralPeakArray * | pSpectralPeakArray | ) |
Definition at line 36 of file SpectralPeakDescriptors.cxx.
References CLAM_ASSERT, and CLAM::EScale::eLinear.
CLAM::SpectralPeakDescriptors::SpectralPeakDescriptors | ( | TData | initVal | ) |
Definition at line 44 of file SpectralPeakDescriptors.cxx.
References CLAM::DynamicType::UpdateData().
CLAM::SpectralPeakDescriptors::DYNAMIC_TYPE_USING_INTERFACE | ( | SpectralPeakDescriptors | , | |
10 | , | |||
Descriptor | ||||
) |
CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE | ( | 0 | , | |
public | , | |||
TData | , | |||
MagnitudeMean | ||||
) |
The average amplitude (arithmetic mean) of the spectral peaks.
It is computed on linear scale. Range: [0, 100]
CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE | ( | 1 | , | |
public | , | |||
TData | , | |||
HarmonicCentroid | ||||
) |
The center of gravity of the spectral peaks.
Only the frequency value (in Hz) of the centroid is computed. Amplitude and frequency scale are linear for this operation.
CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE | ( | 2 | , | |
public | , | |||
TData | , | |||
HarmonicDeviation | ||||
) |
Spectral deviation of magnitude components from spectral envelope.
Descriptor is a MPEG7 LLD (HarmonicSpectralDeviation), see ISO/IEC JTC 1/SC 29 N WXYZ from 2001-03-14.
The local spectral envelopes (SE) are computed on linear scale as the mean of three consecutive peak amplitudes. For the first and the last peak only two peak amplitudes are used.
The spectral HarmonicDeviation is then defined as
,where SE and PeakAmplitude were converted to logarithmic scale. Returns zero for array with less than 4 peaks.
CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE | ( | 3 | , | |
public | , | |||
TData | , | |||
FirstTristimulus | ||||
) |
Energy ratio of the first harmonic to the energy of all peaks.
Returns zero for empty peak array.
CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE | ( | 4 | , | |
public | , | |||
TData | , | |||
SecondTristimulus | ||||
) |
Energy ratio of the second, third and forth harmonic to the energy of all peaks.
Returns zero for array with less than 2 peaks.
CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE | ( | 5 | , | |
public | , | |||
TData | , | |||
ThirdTristimulus | ||||
) |
Energy ratio of all the harmonics starting from the fifth to the energy of all peaks.
Returns zero for array with less than 5 peaks.
CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE | ( | 6 | , | |
public | , | |||
TData | , | |||
OddHarmonics | ||||
) |
Energy ratio of odd harmonics (excluding the fundamental) to the energy of all peaks.
Returns zero for array with less than 3 peaks.
CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE | ( | 7 | , | |
public | , | |||
TData | , | |||
EvenHarmonics | ||||
) |
Energy ratio of even harmonics to the energy of all peaks.
CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE | ( | 8 | , | |
public | , | |||
TData | , | |||
OddToEvenRatio | ||||
) |
Ratio of "OddHarmonics" to "EvenHarmonics".
Returns zero if both values are zero.
Formula:
const SpectralPeakArray * CLAM::SpectralPeakDescriptors::GetpSpectralPeakArray | ( | ) | const |
Definition at line 71 of file SpectralPeakDescriptors.cxx.
void CLAM::SpectralPeakDescriptors::SetpSpectralPeakArray | ( | SpectralPeakArray * | pSpectralPeakArray | ) |
Definition at line 75 of file SpectralPeakDescriptors.cxx.
References CLAM_ASSERT, CLAM::EScale::eLinear, CLAM::DescriptorTmpl< abs >::InitStats(), and CLAM::BaseMemOp::Reset().
void CLAM::SpectralPeakDescriptors::ConcreteCompute | ( | ) | [virtual] |
Implements CLAM::DescriptorTmpl< abs >.
Definition at line 86 of file SpectralPeakDescriptors.cxx.
References CLAM::StatsTmpl< abs, T, U, initOrder >::GetMean(), and CLAM::DescriptorTmpl< abs >::mpStats.