def _makeCodebook(self,data,ncodes=128):
        [centroids, membership] = cluster.kmeans2(data,ncodes, minit='points')
        return(centroids)
Do the k-means ... this is slow as as shit
dataset/ETHPy150Open sightmachine/SimpleCV/SimpleCV/Features/BOFFeatureExtractor.py/BOFFeatureExtractor._makeCodebook