def perform_feature_model(self, feature):
        if feature == 'sift':
            sift = SIFT(self.DATABASE_IMAGES_PATH)
            sift.read_and_clusterize(num_cluster=150)
            feature_vectors = sift.calculate_centroids_histogram()
        else:
            histogram_of_gradients = HistogramOfGradients(self.DATABASE_IMAGES_PATH)
            feature_vectors = histogram_of_gradients.get_image_vectors()

        self.database_connection.create_feature_model_table(feature)
        self.database_connection.insert_feature_data(feature, feature_vectors)
 def perform_classification_feature_model(self, feature, path, cluster_count):
     self.database_connection.create_feature_model_table(feature)
     if "histogram_of_gradients" in feature:
         histogram_of_gradients = HistogramOfGradients(path)
         feature_vectors = histogram_of_gradients.get_image_vectors()
     elif "local_binary_pattern" in feature:
         local_binary_pattern = LocalBinaryPattern(path)
         feature_vectors = local_binary_pattern.get_image_vectors()
     elif "sift" in feature:
         sift = SIFT(path)
         sift.read_and_clusterize(num_cluster=int(cluster_count))
         feature_vectors = sift.calculate_centroids_histogram()
     self.database_connection.insert_feature_data(feature, feature_vectors)