'This feature extractor takes in a color image and returns a normalized color
histogram of the pixel counts of each hue.'

def extract(self, img):

    img = img.toHLS()
    h = img.getEmpty(1)
    cv.Split(img.getBitmap(), h, None, None, None)
    npa = np.array(h[:, :])
    npa = npa.reshape(1, (npa.shape[0] * npa.shape[1]))
    hist = np.histogram(npa, self.mNBins, normed=True, range=(0, 255))
    return hist[0].tolist()
