Table of Contents
QccVectorDCT, QccVectorInverseDCT - one-dimensional discrete cosine
transform (DCT) and inverse tranform of a signal vector
#include
"libQccPack.h"
int QccVectorDCT(const QccVector input_signal, QccVector
output_signal, int signal_length);
int QccVectorInverseDCT(const QccVector
input_signal, QccVector output_signal, int signal_length);
QccVectorDCT() calculates the one-dimensional discrete cosine transform
(DCT) of input_signal. The result is returned in output_signal, which must
be allocated prior to calling QccVectorDCT(). Both input_signal and output_signal
have the same length, signal_length.
QccVectorInverseDCT() calculates the
inverse DCT of input_signal, returning its results in output_signal.
Both QccVectorDCT() and QccVectorInverseDCT() return 0 on success,
1 on error.
These routines implement the type-II DCT; the
implementation is slow, and uses calls directly to cos(3)
. Most applications
should probably use QccFastDCTForwardTransform1D(3)
and QccFastDCTInverseTransform1D(3)
which are based on a faster FFT-based implementation, but rely on the GNU
Scientific Library (GSL) for the FFT. QccVectorDCT() and QccVectorInverseDCT()
are provided for use when GSL is not available.
QccFastDCTForwardTransform1D(3)
,
QccFastDCTInverseTransform1D(3)
, QccVector(3)
, QccPack(3)
A. K. Jain, Fundamentals
of Digital Image Processing. Englewood Cliffs, NJ: Prentice Hall, 1989.
Copyright (C) 1997-2021 James E. Fowler
Table of Contents