Reconstruct the initial image with idct2

10 views (last 30 days)
Damien Dubois
Damien Dubois on 17 Jun 2021
Commented: Damien Dubois on 20 Jun 2021
Hello, for an assignment I needed to create an image of 512x512 pixels black with in its center a square of white pixel of 100pixels, then I had to make its transformation into discrete cosine and now I must thanks to the function idct2, reconstruct the initial image by retaining only :
  • The 80% largest coefficients of the DCT
  • The 50% largest coefficients of the DCT
  • The 20% largest coefficients of the DCT
But I don't know how to set this parameter, here is my code currently.
image=zeros(512,512);
image(206:305,206:305)=255;
J = dct2(image);
imshow(log(abs(J)),[])
colormap parula
colorbar

Accepted Answer

Jonas
Jonas on 19 Jun 2021
Edited: Jonas on 19 Jun 2021
have a look into this post
  3 Comments
Damien Dubois
Damien Dubois on 20 Jun 2021
Thank you very much for your precious help

Sign in to comment.

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by