Matlab functions    from  BioméCardio    

 
   hmf
imax   

idctn

N-dimensional inverse Discrete Cosine Transform

Contents

Download

idctn.m

Syntax

   X = idctn(Y)

Description

X = idctn(Y) inverts the N-dimensional DCT transform, returning the original array if Y was obtained using Y = dctn(X).

Notes: The returned array is of class double. For vectors and matrices, idctn(Y) is similar to idct(Y) and idct2(Y) within round-off errors. idct and idct2 are included in the Signal and Image Processing Toolboxes. No toolbox is required for idctn.

Example

Perform the discrete cosine transform (DCT) of an image using dctn and display the resulting coefficients.

RGB = imread('autumn.tif');
I = rgb2gray(RGB);
imshow(I) % original gray-scaled image

J = dctn(I); % discrete cosine transform
imshow(log(abs(J)),[])

The commands below set values less than magnitude 10 in the DCT matrix to zero, then recover the image using the inverse DCT. DCT can be used as an image compressor.

J(abs(J)<10) = 0; % lossy compression
K = idctn(J); % inverse DCT
imshow(K,[0 255])

Reference & Information

Narasimha M. et al, On the computation of the discrete cosine transform, IEEE Trans Comm, 26, 6, 1978, pp 934-936.

Discrete Cosine Transform on Wikipedia.

See also

idct, idct2, dctn, smoothn

About the author

Damien Garcia, Eng., Ph.D.
Assistant professor, Department of radiology
CRCHUM, University of Montreal Hospital
Montreal, QC, Canada
Damien.Garcia.REMOVE-THIS@BiomeCardio.com

www.biomecardio.com