Exemplo n.º 1
0
 def compute_hist(self):
     bow_voc = Vocabulary.objects.get().get_data()
     imgs = populator.list_images(self.directory)
     for path, img in imgs:
         print(path)
         bow_hist = self.populator.bow_hist(img, bow_voc)
         color_hist = self.populator.color_hist(img)
         _, img_path = os.path.split(path)
         Image.set_bow_hist(img_path, bow_hist)
         Image.set_color_hist(img_path, color_hist)
Exemplo n.º 2
0
 def compute_voc(self, limit=1000):
     imgs = populator.list_images(self.directory)
     Vocabulary.set_data(self.populator.generate_vocabulary(imgs, limit))