MATLAB: What does a histogram represent of a image

histogramimage analysis

What is the x axis and y axis in a histogram of a image. how does it work ?

Best Answer

The x axis is the gray level (intensity, brightness) of the image. The y axis is the count of how many pixels in the image have the gray level. It's often useful to look at the histogram to figure out how to threshold the image to create a binary image of foreground and background objects so that you can do connected components labeling and measurement of various characteristics with the regionprops() function.
Related Question