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

1 visualización (últimos 30 días)
fekri saleh
fekri saleh el 17 de Mayo de 2012
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

Respuestas (0)

Comunidades de usuarios

Más respuestas en  Power Electronics Control

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by