I tried this(is it correct?) :
RGB=imread('d:\168.bmp');
n=65536;
% Converts the RGB image to an indexed image X ;n = colors
[IND,map] = rgb2ind(RGB,n);
% Convert RGB colormap to HSV colormap(is it correct?)
cmap=rgb2hsv(map);
% Calcula the color variance of the HSV colormap
color_variance=var(cmap);
Is the color_variance represent the actual color variance for an image,because I have three coloumns!!!