So I want to remove the higher frequency dct from an image and reconstruct it, so i followed an example by Matlab https://www.mathworks.com/help/images/ref/dct2.html. However, when i tried with my own image, it didn't turn out to be great. I'm using an image:
and i followed every step in the link with:
img = imread('giraffe.png');img = rgb2gray(img);J = dct2(img);figureimshow(log(abs(J)),[])colormap(gca,jet(64))colorbar
The colorbar
J(abs(J) < 10) = 0;img_r = idct2(J);imshow(img_r)
But my output image became:
Why did this happen?
Best Answer