MATLAB: Grey Level Histogram of IMAGE

image histogram

Can any one tell me how to calculate the grey level histogram of image without using direct function in matlab imhist?

Best Answer

Loop over every pixel. For each pixel, get the gray level. The gray level is an index to your "counts" array. Increment that element by one. Details are left up to you.