Вы находитесь на странице: 1из 1

%This code produces the DCT of an image %It shows how to display the DCT coefficients %using the

log A = imread('zebras.jpg'); B = dct2(double(A(:,:,1))); figure(1), imshow(A,[]); title('Original'); figure(2), imshow(B,[]); title('DCT'); Bmax = max(max(B)); k = 10/(log(1 + Bmax)); C = k*log(1 + abs(B)); figure(3), imshow(C,[]); title('log DCT'); %E = ind2gray(C); imwrite(C,'logDCTzebras10.bmp');

Вам также может понравиться