SignalUtils::RealCepstrum Function

void RealCepstrum(TVec *Src, TVec *Dst, bool DumpDC = true, TSignalWindowType WindowType = TSignalWindowType::wtHanning, bool Magnitude = false);

Compute the real cepstrum.

#NameTypeDescription
1SrcTVec *
2DstTVec *
3DumpDC = truebool
4WindowType = TSignalWindowType::wtHanningTSignalWindowType
5Magnitude = falsebool
Remarks:

Computes the real cepstrum of Src and places it in Dst. The real cepstrum is the inverse transform of the log-magnitude spectrum: c_x[q] = F^(-1){ logbigl| F{x[n]}bigr| }[q],

rc = IFFT(log(abs(FFT(x)))

x.. time series

where q is the quefrency (a time-like index). Because the magnitude spectrum is even, the result is real. A periodicity in the magnitude spectrum (for example an echo at delay D) appears as a peak in the cepstrum at quefrency q=D, which is the basis of echo and pitch detection. If DumpDC is True the DC component is removed before the forward FFT, and WindowType selects the analysis window (the Hanning window is a good default). When Magnitude is True the magnitude of the cepstrum is returned. The argument of the logarithm is the spectrum magnitude, which is non-negative, so no complex logarithm is needed.

References:

[1] Discrete-time signal processing, Oppenheim and Schafer, Prentice-Hall, 1989.

See Also: SignalUtils::CplxCepstrum, SignalUtils::CplxCepstrumInv
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler