And then calculate the number of the bins, into which there are pixels to be divided
Best Answer
Assuming your image is of type double (i.e: intensity range is 0-1), then:
bins = linspace(0, 1, 16); %if image is uint8, then linspace(0, 255, 16)
bincoords = discretize(rgbimage, bins);
bincoords(row, col, :) is a 3 element vector giving you the location ofpixel(row, col) into that 16x16x16 histogram cube. If you want to change that into linear indices:
Best Answer