function [h] imhist(im);
[x,y]=size(im);
h=zeros(1,256);
for i=1:x
	for j=1:y
		h(im(i,j)+1)=h(im(i,j)+1)+1;
		end
	end
endfunction;
