

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Digital Image Processing; Subject: Electrical and Computer Engr; University: University of Illinois - Chicago; Term: Fall 2006;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


function B = image_2_squares(A);
% A is assumed to by 256 x 256 B = zeros(64,1024); for R = 0: for C = 0: Bcol = 1 + R + C32; Arow = R8; Acol = C8; B(:,Bcol) = reshape(A(Arow+[1:8],Acol+[1:8]),64,1); end end*
return
function A = squares_2_image(B);
% B is assumed to by 64 x 1024 A = zeros(256,256); for Bcol = 1: C = floor((Bcol-1)/32); R = (Bcol-1) - C32; Arow = R8; Acol = C8; A(Arow+[1:8],Acol+[1:8]) = reshape(B(:,Bcol),8,8); end*
return