MATLAB: Histogram of HSV quantized image

image processing

Hi i want to share with you the results of an HSV quantized image Histogram
i used an image 256X384 converted it into HSV and quantized it into (8X3X3) for H, S and V respectively and after that i made a weighted sum G= 9*H + 3*S + 3*V for this matrix i used this function:
histG=imhist(G,72)
but the output is like that:
histG =
2820
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
13500
is this ok or i have something wrong ? if it is right please explain to me why i got this output.
Thank you

Best Answer

G= 9*H + 3*S + 3*V
is the wrong weighted sum. You want to add V, not 3*V .
It appears that only the low bin and the high bin are being used in the histogram, as if you had an error in your quantization that led to the results always being either (0,0,0) or the maximum value (8,3,3). The V vs 3*V would not account for this, but a quantization mistake would. Or, alternately, you might have good quantization but a black and white image is being quantized.