如题所述
确保你的图像是二维灰度图像,灰度直方图图像就为uint8型就可以。
I=imread('D:\ebook\spot2.bmp');%%I为二维灰度图像,600*600,uint8型
imhist(I);
参考资料:sername