CLAM::SpectralPeakDescriptors Class Reference

#include <SpectralPeakDescriptors.hxx>

Inheritance diagram for CLAM::SpectralPeakDescriptors:

CLAM::DescriptorTmpl< abs > CLAM::ProcessingData CLAM::DynamicType CLAM::Component

List of all members.


Detailed Description

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 SpectralPeakArrayGetpSpectralPeakArray () const
void SetpSpectralPeakArray (SpectralPeakArray *pSpectralPeakArray)
void ConcreteCompute ()

Constructor & Destructor Documentation

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().


Member Function Documentation

CLAM::SpectralPeakDescriptors::DYNAMIC_TYPE_USING_INTERFACE ( SpectralPeakDescriptors  ,
10  ,
Descriptor   
)

CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE ( ,
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 ( ,
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.

  • Units: Hz
  • Range: [0, Nyquist frequency]
  • Singularities
    • Returns zero for empty peak array.
      Todo:
      Peaks at 0Hz are not counted

CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE ( ,
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

\[ \sum_{i=1}^{Num. of Peaks} \left| PeakAmplitude(i) - SE(i)\right| \over {\sum_{i=1}^{Num. of Peaks}PeakAmplitude(i)} \]

,where SE and PeakAmplitude were converted to logarithmic scale. Returns zero for array with less than 4 peaks.

CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE ( ,
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 ( ,
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 ( ,
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 ( ,
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 ( ,
public  ,
TData  ,
EvenHarmonics   
)

Energy ratio of even harmonics to the energy of all peaks.

Precondition:
The peaks represents an ordered list of harmonics starting at the fundamental.
Returns zero for array with less than 2 peaks.

CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
OddToEvenRatio   
)

Ratio of "OddHarmonics" to "EvenHarmonics".

Returns zero if both values are zero.

Precondition:
The peaks represents an ordered list of harmonics starting at the fundamental.
Range: [0, 1]

Formula:

\[ \frac{OddHarmonics}{EvenHarmonics+OddHarmonics} \]

See also:
SpectralPeakDescriptors::DYN_ATTRIBUTE(OddHarmonics)

SpectralPeakDescriptors::DYN_ATTRIBUTE(EvenHarmonics)

CLAM::SpectralPeakDescriptors::DYN_ATTRIBUTE ( ,
public  ,
Array< TData ,
HPCP   
)

const SpectralPeakArray * CLAM::SpectralPeakDescriptors::GetpSpectralPeakArray (  )  const

Definition at line 71 of file SpectralPeakDescriptors.cxx.

void CLAM::SpectralPeakDescriptors::SetpSpectralPeakArray ( SpectralPeakArray pSpectralPeakArray  ) 

void CLAM::SpectralPeakDescriptors::ConcreteCompute (  )  [virtual]


The documentation for this class was generated from the following files:

Generated on Tue Aug 12 22:33:47 2008 for CLAM by  doxygen 1.5.5