function [m]=imhist(im);
m=zeros(256);
[l,c]=size(im);
for i = 1 : l
	for j= 1 : c
		//ng=im(i,j);
		m(ng)= m(ng)+1;
	end;
end;
endfunction;
