图像分块程序,用于图像分块

时间:2018-08-06 04:21:24
【文件属性】:
文件名称:图像分块程序,用于图像分块
文件大小:443B
文件格式:M
更新时间:2018-08-06 04:21:24
图像分块 matlab 图像分块程序,用于图像分块function Plot=plot(img) I=img; rs=size(I,1); % 行数 cs=size(I,2); % 列数 % ch为列间隔 cw为行间隔 % numr为间隔块个数 numc为间隔块个数 ch=50; cw=50; numr=round(rs/ch); numc=round(cs/cw); % 区域块分割 Plot=cell(numr); t1=(0:numr-1)*ch+1; t2=(1:numr)*ch; t3=(0:numc-1)*cw+1; t4=(1:numc)*cw; for i=1:numr for j=1:numc x=t1(i):t2(i); y=t3(j):t4(j); Plot{i,j}=I(x,y); end end

网友评论