get_matrix_dct - Computes the discrete cosine transform (DCT) of a matrix


#include "wrap_fftw/wrap_fftw.h"

Example compile flags (system dependent):
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 

int get_matrix_dct
	Matrix **output_mpp,
	const Matrix *input_mp


This routine computes the discrete cosine transform (DCT) of a matrix. The first argument is the adress of the target matrix. If the target matrix itself is null, then a matrix of the appropriate size is created. If the target matrix is the wrong size, it is resized. Finally, if it is the right size, then the storage is recycled, as is.


NO_ERROR on success, and ERROR on failure, with an error message being set.


This routine simply wraps the appropriate fftw library functions for convenient use with our our data structures. The fftw library can also be used directly in conjunction with the kjb_library by including fftw3.h (the makefile builder should know where to find everthing). This can be preferable in some cases where one wants to exploit the tuning mechanism from that library, and cut down on overhead. However, for ocasional use, the savings won't be very great.


The default behaviour of this routine is to inherits fftw's normalization strategy which is to return unnormalized transforms. This means that taking the transform, and then inverting, requires division by N=num_cols*num_rows. This behaviour can be changed using the set_fftw_style() function. Currently the style setting of FFTW_MATLAB_STYLE is not valid with DCT because it has not yet been implemented (on the TODO list).



This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.


Kobus Barnard


Kobus Barnard


set_fftw_style , get_matrix_inverse_dct , get_matrix_dft , get_matrix_inverse_dft , get_vector_dft