can we change the intensity value of the histogram??
2 views (last 30 days)
Image Analyst on 3 Jul 2015
Yes. To change the counts array, just change it. For example to change the number of counts in bin #101 (which holds counts for gray level 100), and to get rid of big spikes at the ends, do this:
[pixelCounts, grayLevels] = imhist(grayImage);
pixelCounts(101) = 1234; % Change count to 1234.
% Suppress big spikes at 0 and 255:
pixelCounts(1) = 0;
pixelCounts(256) = 0;