MATLAB: How the Peak value of the image histogram can be obtaind

Image Processing Toolboxpeak point of image histogram

How the Peak value of the image histogram can be obtaind?

Best Answer

[pixelCounts, grayLevels] = imhist(grayImage);
[maxCount, indexOfMax] = max(pixelCounts);
grayLevelAtMax = grayLevels(indexOfMax);