#include <SpectralPeakDescriptors.hxx>
Public Member Functions | |
SpectralPeakDescriptors () | |
SpectralPeakDescriptors (const SpectralPeakDescriptors &prototype, const bool shareData=false, const bool deep=true) | |
__COMMON_DYNAMIC_TYPE (SpectralPeakDescriptors, 10) | |
__COMMON_DYN_ATTRIBUTE (0, public, TData, MagnitudeMean) protected | |
The average amplitude (arithmetic mean) of the spectral peaks. | |
bool | LoadMagnitudeMean (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (1, public, TData, HarmonicCentroid) protected | |
The center of gravity of the spectral peaks. | |
bool | LoadHarmonicCentroid (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (2, public, TData, HarmonicDeviation) protected | |
Spectral deviation of magnitude components from spectral envelope. | |
bool | LoadHarmonicDeviation (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (3, public, TData, FirstTristimulus) protected | |
Energy ratio of the first harmonic to the energy of all peaks. | |
bool | LoadFirstTristimulus (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (4, public, TData, SecondTristimulus) protected | |
Energy ratio of the second, third and forth harmonic to the energy of all peaks. | |
bool | LoadSecondTristimulus (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (5, public, TData, ThirdTristimulus) protected | |
Energy ratio of all the harmonics starting from the fifth to the energy of all peaks. | |
bool | LoadThirdTristimulus (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (6, public, TData, OddHarmonics) protected | |
Energy ratio of odd harmonics (excluding the fundamental) to the energy of all peaks. | |
bool | LoadOddHarmonics (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (7, public, TData, EvenHarmonics) protected | |
Energy ratio of even harmonics to the energy of all peaks. | |
bool | LoadEvenHarmonics (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (8, public, TData, OddToEvenRatio) protected | |
Ratio of "OddHarmonics" to "EvenHarmonics". | |
bool | LoadOddToEvenRatio (CLAM::Storage &s) |
__COMMON_DYN_ATTRIBUTE (9, public, Array< TData >, HPCP) protected | |
bool | LoadHPCP (CLAM::Storage &s) |
SpectralPeakDescriptors (SpectralPeakArray *pSpectralPeakArray) | |
SpectralPeakDescriptors (TData initVal) | |
const SpectralPeakArray * | GetpSpectralPeakArray () const |
void | SetpSpectralPeakArray (SpectralPeakArray *pSpectralPeakArray) |
void | ConcreteCompute () |
Definition at line 39 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::SpectralPeakDescriptors | ( | ) | [inline] |
Definition at line 41 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::SpectralPeakDescriptors | ( | const SpectralPeakDescriptors & | prototype, | |
const bool | shareData = false , |
|||
const bool | deep = true | |||
) | [inline] |
Definition at line 41 of file SpectralPeakDescriptors.hxx.
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::__COMMON_DYN_ATTRIBUTE | ( | 9 | , | |
public | , | |||
Array< TData > | , | |||
HPCP | ||||
) | [inline] |
Definition at line 125 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYN_ATTRIBUTE | ( | 8 | , | |
public | , | |||
TData | , | |||
OddToEvenRatio | ||||
) | [inline] |
Ratio of "OddHarmonics" to "EvenHarmonics".
Returns zero if both values are zero.
Range: [0, 1]
Formula:
Definition at line 124 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYN_ATTRIBUTE | ( | 7 | , | |
public | , | |||
TData | , | |||
EvenHarmonics | ||||
) | [inline] |
Energy ratio of even harmonics to the energy of all peaks.
Returns zero for array with less than 2 peaks.
Definition at line 110 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYN_ATTRIBUTE | ( | 6 | , | |
public | , | |||
TData | , | |||
OddHarmonics | ||||
) | [inline] |
Energy ratio of odd harmonics (excluding the fundamental) to the energy of all peaks.
Returns zero for array with less than 3 peaks.
Definition at line 101 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYN_ATTRIBUTE | ( | 5 | , | |
public | , | |||
TData | , | |||
ThirdTristimulus | ||||
) | [inline] |
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.
Definition at line 94 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYN_ATTRIBUTE | ( | 4 | , | |
public | , | |||
TData | , | |||
SecondTristimulus | ||||
) | [inline] |
Energy ratio of the second, third and forth harmonic to the energy of all peaks.
Returns zero for array with less than 2 peaks.
Definition at line 89 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYN_ATTRIBUTE | ( | 3 | , | |
public | , | |||
TData | , | |||
FirstTristimulus | ||||
) | [inline] |
Energy ratio of the first harmonic to the energy of all peaks.
Returns zero for empty peak array.
Definition at line 84 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYN_ATTRIBUTE | ( | 2 | , | |
public | , | |||
TData | , | |||
HarmonicDeviation | ||||
) | [inline] |
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.
Definition at line 78 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYN_ATTRIBUTE | ( | 1 | , | |
public | , | |||
TData | , | |||
HarmonicCentroid | ||||
) | [inline] |
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.
Definition at line 59 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYN_ATTRIBUTE | ( | 0 | , | |
public | , | |||
TData | , | |||
MagnitudeMean | ||||
) | [inline] |
The average amplitude (arithmetic mean) of the spectral peaks.
It is computed on linear scale. Range: [0, 100]
Definition at line 47 of file SpectralPeakDescriptors.hxx.
CLAM::SpectralPeakDescriptors::__COMMON_DYNAMIC_TYPE | ( | SpectralPeakDescriptors | , | |
10 | ||||
) |
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.
const SpectralPeakArray * CLAM::SpectralPeakDescriptors::GetpSpectralPeakArray | ( | ) | const |
Definition at line 71 of file SpectralPeakDescriptors.cxx.
bool CLAM::SpectralPeakDescriptors::LoadEvenHarmonics | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 110 of file SpectralPeakDescriptors.hxx.
bool CLAM::SpectralPeakDescriptors::LoadFirstTristimulus | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 84 of file SpectralPeakDescriptors.hxx.
bool CLAM::SpectralPeakDescriptors::LoadHarmonicCentroid | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 59 of file SpectralPeakDescriptors.hxx.
bool CLAM::SpectralPeakDescriptors::LoadHarmonicDeviation | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 78 of file SpectralPeakDescriptors.hxx.
bool CLAM::SpectralPeakDescriptors::LoadHPCP | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 125 of file SpectralPeakDescriptors.hxx.
bool CLAM::SpectralPeakDescriptors::LoadMagnitudeMean | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 47 of file SpectralPeakDescriptors.hxx.
bool CLAM::SpectralPeakDescriptors::LoadOddHarmonics | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 101 of file SpectralPeakDescriptors.hxx.
bool CLAM::SpectralPeakDescriptors::LoadOddToEvenRatio | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 124 of file SpectralPeakDescriptors.hxx.
bool CLAM::SpectralPeakDescriptors::LoadSecondTristimulus | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 89 of file SpectralPeakDescriptors.hxx.
bool CLAM::SpectralPeakDescriptors::LoadThirdTristimulus | ( | CLAM::Storage & | s | ) | [inline] |
Definition at line 94 of file SpectralPeakDescriptors.hxx.
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().