Info

此问题已关闭。 请重新打开它进行编辑或回答。

In my problem, i have taken rgb image of size 512*512,then converted it to greyscale and applied dct2 on it.now i want to do huffman coding of this.Plz tell me how to do this and also tell me if i am wrong.

1 次查看(过去 30 天)
I=imread('lena.jpg'); % Reads the image whose name is lena & format is jpg.
whos %
save I
load I
T1=I;
figure;imshow(I);
title('coloured image of lena')
T1=im2double(T1);
G=rgb2gray(T1);
whos
imshow(G);
imagesc(G);title('grayscale image of lena')
T2=G;
Z=dct2(T2);
figure;imshow(Z);
title('dct transformed')
  1 个评论
Walter Roberson
Walter Roberson 2013-11-27
dct is for lossy encoding, not lossless encoding.
dct and huffman is very likely "modified huffman encoding" rather than pure huffman encoding. You need to research the algorithm.

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by