<< dct Image_Processing_Tool_2 fwht >>

Image_Processing_Tool_2 >> Image_Processing_Tool_2 > dct2

dct2

Two dimensional discrete cosine transform

Calling Sequence

B = dct2(A)
B = dct2(A, m, n)

Arguments

A

Real or complex vector/matrix/array.

B

Real or complex vector/matrix/array.

m

positive integer (number of rows).

n

positive integer (number of columns).

Description

B = dct2(A) returns the two dimensional discrete cosine transform of a. Size of b and a are same. B = dct2(A, m, n) returns the two dimensional discrete cosine transform of a having size m-by-n by padding or truncating the size of a before transformation.

Examples

<p class="para">Besides the usage of the 2-D DCT as part of image compression algorithms, it is widely used as feature extraction or dimensionality reduction method in pattern recognition applications, in image watermarking and data hiding and in various image processing applications.</p>

Image_RGB = imread('image.tif');
Image_I = im2gray(Image_RGB);
Image_J = dct2(Image_I);
imshow(Image_J);

See Also

Authors

<< dct Image_Processing_Tool_2 fwht >>