DPCM encoder et decoder FOR DC COEFFICIENTS (in JPEG compression)
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
커뮤니티
더 많은 답변 보기: Power Electronics Community
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!