%改进算法及性能分析 clear clc a=imread'rice.png; a=double(a; [m1,n1]=size(a; b=zeros(m1,n1*8; for i=1:1:m1 for j=1:1:n1 for t=0:1:7 if mod(floor(a(i,j)/2^t,2)==1 b(i,j*8-t)=1; else b(i,j*8-t)=0; end end end e