%%classify32
%%takes a 32x32 block who's classification is undetermined and the block number
%%breaks the 32x32 block into four 16x16 blocks, and 
%%classifies each individually

%%vector of wavelet coefficients for 32x32 block
v=vcoeffmatrix(blocknum,:);

%%make four vectors of wavelet coefficients for each
%%of four 16x16 block that make up the 32x32 block
v1=[v(1:8)];                       
v2=[v(9:16)];               
v3=[v(129:136)];
v4=[v(137:144)];

%% makes vector of the quarters of LH (first part of vector v)
for j=16:16:112,
    v1=[v1,(v(j+1:j+8))];
    v2=[v2,v(j+9:j+16)];
end
for j=144:16:240,
    v3=[v3,v(j+1:j+8)];
    v4=[v4,v(j+9:j+16)];
end

%% continues vector, adding on the quarters of HL (2nd part of vector v) 
for j=256:16:368,
    v1=[v1,v(j+1:j+8)];    
    v2=[v2,v(j+9:j+16)];    
end
for j=384:16:496,
    v3=[v3,v(j+1:j+8)];
    v4=[v4,v(j+9:j+16)];
end

%%classify16 classifies each 16x16 block and edit final image according to classification
v16=v1;x=x;y=y;classify16
v16=v2; x=x; y=y+16; classify16
v16=v3; x=x+16; y=y-16;classify16
v16=v4; y=y+16;classify16

