| Image Processing Toolbox™ | ![]() |
B = idct2(A)
B = idct2(A,m,n)
B = idct2(A,[m n])
B = idct2(A) returns the two-dimensional inverse discrete cosine transform (DCT) of A.
B = idct2(A,m,n) pads A with 0's to size m-by-n before transforming. If [m n] < size(A), idct2 crops A before transforming.
B = idct2(A,[m n]) same as above.
For any A, idct2(dct2(A)) equals A to within roundoff error.
The input matrix A can be of class double or of any numeric class. The output matrix B is of class double.
idct2 computes the two-dimensional inverse DCT using

Create a DCT matrix.
RGB = imread('autumn.tif');
I = rgb2gray(RGB);
J = dct2(I);
imshow(log(abs(J)),[]), colormap(jet), colorbarSet values less than magnitude 10 in the DCT matrix to zero, then reconstruct the image using the inverse DCT function idct2.
J(abs(J)<10) = 0; K = idct2(J); figure, imshow(I) figure, imshow(K,[0 255])
[1] Jain, A. K., Fundamentals of Digital Image Processing, Englewood Cliffs, NJ, Prentice Hall, 1989, pp. 150-153.
[2] Pennebaker, W. B., and J. L. Mitchell, JPEG: Still Image Data Compression Standard, New York, Van Nostrand Reinhold, 1993.
![]() | iccwrite | ifanbeam | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |