Get image's histogram in both grayscale and color space