def extract(self, img):
        data = self._getPatches(img)
        p = spsd.cdist(data,self.mCodebook)
        codes = np.argmin(p,axis=1)
        [retVal,foo] = np.histogram(codes,self.mNumCodes,normed=True,range=(0,self.mNumCodes-1))
        return retVal
This method extracts a bag of features histogram for the input image using
dataset/ETHPy150Open sightmachine/SimpleCV/SimpleCV/Features/BOFFeatureExtractor.py/BOFFeatureExtractor.extract