フィルターのクリア

image compressing with DCT

4 ビュー (過去 30 日間)
adi
adi 2011 年 11 月 22 日
what is the coding Elimination of DCT coefficients for jpeg image compression ?? i using matlab R2008a
help me..
  1 件のコメント
Walter Roberson
Walter Roberson 2011 年 11 月 22 日
I do not understand this question as phrased, unless it is a duplicate of your other question http://www.mathworks.com/matlabcentral/answers/21891-jpeg-image-compressing-with-dct

サインインしてコメントする。

回答 (1 件)

Hamrit
Hamrit 2012 年 5 月 13 日
dvalue=imread('yourimage');
dvalue = double(dvalue)/255;
dvalue = rgb2gray(dvalue);
imshow(dvalue)
img_dct=dct2(dvalue);
img_pow=(img_dct).^2;
img_pow=img_pow(:);
[B,index]=sort(img_pow);%no zig-zag
B=flipud(B);
index=flipud(index);
compressed_dct=zeros(size(dvalue));
coeff = 20000;% maybe change the value
for k=1:coeff
compressed_dct(index(k))=img_dct(index(k));
end
im=idct2(compressed_dct);
imwrite(im, 'Hassan.jpg')
not for color Jpeg

カテゴリ

Help Center および File ExchangeDenoising and Compression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by