Problem in blockwise zigzag processing of frame

2 次查看(过去 30 天)
I have two frames and i am dividing each frame into 8x8 blocks now i want to apply zigzag on each 8x8 block of both frames.here is my code in that i am getting only zigzag of 1st block.but i want zizag of all.what should i have to do?
bs=8; % Block Size (8x8)
nob=(r/bs)*(c/bs) % Total number of 8x8 Blocks, r=no of rows,
% Dividing the image into 8x8 Blocks
kk=0;
for i=1:(r/bs)
for j=1:(c/bs)
Block1(:,:,kk+j)=B3((bs*(i-1)+1:bs*(i-1)+bs),(bs*(j-1)+1:bs*(j-1)+bs)); % B3&B4 are frames
A(:,:)=zigzag(Block1(:,:,kk+j))
Block2(:,:,kk+j)=B4((bs*(i-1)+1:bs*(i-1)+bs),(bs*(j-1)+1:bs*(j-1)+bs));
C(:,:)=zigzag(Block2(:,:,kk+j))
end
kk=kk+(r/bs)
end

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by