Removing Values from Histogram
13 次查看(过去 30 天)
显示 更早的评论
I want to remove gray levels of particular range from Histogram of an Image. Anyone Know how to do?
采纳的回答
Image Analyst
2012-12-22
Let's say you had a masked image where a huge number of pixels were black and this produced a big spike in the histogram at zero. You can suppress this by setting that bin to zero.
[pixelCount, grayLevels] = imhist(grayImage, 256);
% Suppress zero bin:
pixelCount(1) = 0;
% Now plot:
bar(grayLevels, pixelCount);
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!