www.pudn.com > cat.rar > qukuai.m
%***********************提取块坐标为K1,K2的图像块*************************
function [partimage]=qukuai(lastimage1,k1,k2,B) %partimage块图像,B原图分的快数*************
temp=lastimage1;
M=length(temp);
temp1=1;
temp2=1;
m1=k1-1;
m2=k2-1;
for i=(1+M/B*m1):(M/B+M/B*m1)
for j=(1+M/B*m2):(M/B+M/B*m2)
if temp2==M/B+1
temp1=temp1+1;
temp2=1;
end
partimage(temp1,temp2)=temp(i,j);
temp2=temp2+1;
end
end