What is the difference between functions imhist and hist?
2 次查看(过去 30 天)
显示 更早的评论
Please anyone tell me the difference between functions imhist and hist. Can't we use function 'hist' for finding histogram of an image? If not, why?
0 个评论
采纳的回答
Youssef Khmou
2014-5-4
编辑:Youssef Khmou
2014-5-4
Imhist function is designed to work with images which can have different numeric types such as uint8, uint16, while hist is for other numeric data. In terms of functionality, hist is general function and imhist is for special case of images. here is an example for comparison :
I=im2double(imread('circuit.tif'));
F=hist(I(:),500);
figure; plot(F)
F2=imhist(I,500);
figure; plot(F2)
% This example needs adjustment of the x axis ...
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!