Commit ed46bb04 authored by Claire Lemoine's avatar Claire Lemoine
Browse files

gabor

parent fb46b97a
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 4 08:16:25 2020
@author: capliera
"""
import numpy as np
import csv
# GABOR FEATURES DOWNLOADING
filename = r'C://Users//Claire Lemoine//Documents//Claire//Cours//Traitement_d_images_de_base//Lab-3//Part-2-CBIR//dataset.csv'
file = open(filename,"r")
data = csv.reader(file, delimiter = ";")
data = np.array(list(data))
# Gabor Feature matrix
X_str = data[:, 3:27]
nb_samples, nb_features = np.shape(X_str)
print('(nb_samples, nb_features) = ', nb_samples, nb_features)
print('\n')
# Data conversion into numerical values
# X is the features matrix
X = np.zeros((len(X_str),nb_features), float)
for i in range(len(X_str)):
for j in range(nb_features):
X[i,j] = float(X_str[i,j])
#
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment