PeakInterpolationComplex Class Reference

Algorithm to interpolate peaks in a vector of Complex values. More...

#include <PeakInterpolationComplex.h>

List of all members.

Public Member Functions

 PeakInterpolationComplex ()
 ~PeakInterpolationComplex ()
void process (const MatrixXC &frames, const MatrixXR &peakPositions, const MatrixXR &peakMagnitudes, const MatrixXR &peakPhases, MatrixXR *peakPositionsInterpolated, MatrixXR *peakMagnitudesInterpolated, MatrixXR *peakPhasesInterpolated)


Detailed Description

Algorithm to interpolate peaks in a vector of Complex values.

This class represents an object to interpolate peaks in a vector of Complex values. The algorithm interpolates the positions and magnitudes of a set of peaks, given the original frame, peak positions and peak magnidutes.

The interpolation consists in fitting a parabola (quadratic interpolation) on the point of the peak and the two points surrounding it.

Note that the interpolation is performed in the decibel domain, and in order to avoid innecessary transformations the resulting interpolated peak magnitudes are returned in decibels.

Author:
Ricard Marxer
See also:
PeakDetection, PeakDetectionComplex, PeakInterpolation, PeakInterpolationComplex, PeakTracking, PeakTrackingComplex

Constructor & Destructor Documentation

Constructs a peak interpolation object.

Destroys the algorithm and frees its resources.


Member Function Documentation

void process ( const MatrixXC &  frames,
const MatrixXR &  peakPositions,
const MatrixXR &  peakMagnitudes,
const MatrixXR &  peakPhases,
MatrixXR *  peakPositionsInterpolated,
MatrixXR *  peakMagnitudesInterpolated,
MatrixXR *  peakPhasesInterpolated 
)

Interpolates the peaks on each of the rows of frames, peakPositions, peakMagnitudes, peakPhases to put the resulting peak interpolated positions, magnitudes and phases in the rows of peakPositions, peakMagnitudes and peakMagnitudes respectively.

Parameters:
frames matrix of Complex values.
peakPositions matrix of Real values (but always Integers) for the peak indices. The matrix must have the same number of rows as frames and the same number of columns as peakMagnitudes.
peakMagnitudes pointer to a matrix of Real values for the peak magnitudes. The matrix must have the same number of rows as frames and the same number of columns as peakPositions and peakPhases.
peakPhases pointer to a matrix of Real values for the peak phases. The matrix must have the same number of rows as frames and the same number of columns as peakMagnitudes and peakPositions.
peakPositionsInterpolated pointer to a matrix of Real values for the peak positions. The matrix should have the same number of rows and columns as peakPositions, peakMagnitudes and peakPhases.
peakMagnitudesInterpolated pointer to a matrix of Real values for the peak magnitudes. The matrix should have the same number of rows and columns as peakPositions, peakMagnitudes and peakPhases. Note that the units of this matrix are decibels.
peakPhasesInterpolated pointer to a matrix of Real values for the peak phases. The matrix should have the same number of rows and columns as peakPositions, peakMagnitudes and peakPhases.
Note that peaks with positions values smaller than 0.0 (usually -1.0) are not considered peaks and will not be interpolated or modified.

Note that if the output matrices are not of the required size they will be resized, reallocating a new memory space if necessary.


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

Generated on Tue Mar 31 20:38:33 2009 for Loudia by  doxygen 1.5.6