フィルターのクリア

DPCM encoder et decoder FOR DC COEFFICIENTS (in JPEG compression)

3 ビュー (過去 30 日間)
fekri saleh
fekri saleh 2012 年 5 月 17 日
Hi, What is the coding and decoding of DPCM for DC coefficients for jpeg image compression ?? I am using matlab R2011b. I've got this code (for coding) from mathworks but I can’t decode it. help me plz…
% DPCM FOR DC COEFFICIENTS
a=1;
for i=1:8:size(luma,1);% luma: Luminance image original
for j=1:8:size(luma,2)
temp141(1:8,a:a+7)=temp1(i:i+7,j:j+7);% temp1: luma after the quantization
a=a+8;
end
end
cnt=2;
for i=1:8:size(temp141,2)-7
temp121=temp141(1,i);% copy first element of the first 8x8 block
if i==size(temp141,2)-7
break;
else
i=i+8;% increment along column to point to the 1st element of the 2nd 8x8 block
end
temp131=temp141(1,i); % copy the first element of the 2nd 8x8 block
dpcm1(cnt,1)=temp131-temp121 % subtract the 2nd element from the first element
cnt=cnt+1;
i=i-8; % decrement the column index
end

回答 (0 件)

コミュニティ

カテゴリ

Help Center および File ExchangeSource Coding についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by