img=imread('c:\test.bmp'); p=rgb2gray(img); h=imhist(p); h1=h(1:2:256); h2=1:2:256; stem(h2,h1,'r--'); figure,imhist(p);