dct2() - Image Processing
B = dct2(A) returns the two-dimensional
discrete cosine transform of A. The matrix B is
the same size as A and contains the discrete cosine
transform coefficients B(k1,k2).B = dct2(A,m,n) pads the
matrix A with 0's to size m-by-n before
transforming. If m or n is smaller
than the corresponding dimension of A, dct2 truncates A.B = dct2(A,[m n]) same as
above.
Syntax
B = dct2(A)B = dct2(A,m,n)B = dct2(A,[m n])
Example
RGB = imread('autumn.tif');
I = rgb2gray(RGB);
J = dct2(I);
imshow(log(abs(J)),[]), colormap(jet(64)), colorbar
Output / Return Value
Limitations
Alternatives / See Also
Reference