how to reconstruct image in jpeg compression?

3 views (last 30 days)
i am doing image compression using JPEG but i cannot reconstruct the image after inverse DCT. I used the following code...
if true
% code
end
% Restore back image
%----------------------------------------------------------
recon_image=double(recon_image);
recon_image=recon_image + 128 * (ones(size(recon_image)));
recon_image = mat2gray(recon_image);
I1=I1 + 128 * (ones(size(I1)));
I1 = mat2gray(I1);
row = row - pad_rows;
coln = coln - pad_colns;
recon_image = recon_image(1:row, 1:coln);
recon_image = mat2gray(recon_image);

Answers (0)

Community Treasure Hunt

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

Start Hunting!