function out1=shiyan2(filename) x=imread(filename); tt= histeq(x); imshow(tt); figure; x=double(x); [m,n]=size(x); a=zeros(1,256); for i=1:m for j=1:n k=x(i,j)+1; a(k)=a(k)+1; end end b(1)=a(1)/m/n; for i=2:256