DPCM encoder et decoder FOR DC COEFFICIENTS (in JPEG compression)
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Communitys
Weitere Antworten in Power Electronics Control
Siehe auch
Kategorien
Mehr zu Source Coding finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!