MATLAB: How can i plot Histogram for this?

histogramimage processingImage Processing Toolboxpixel

How can i plot histogram for an image with 3 bins, where the bins holds the pixel values falling in the region 0-40, 41-90, 91-255. Also how can i write these stats, as in the number of pixels in each of those regions. Plz Help ?

Best Answer

Try
edges = [0,41,91,255];
pixelCounts = histcounts(grayImage(:), edges);
Related Question