How to create database to store values

I have extracted two eatures of an image and have saved it in a variable
A=[f1 f2]%f1,f2 features
now i have 100 images and i want to save it to database,so finally my database will contain values of size 100x2
please help

 Respuesta aceptada

Sabarinathan Vadivelu
Sabarinathan Vadivelu el 29 de Dic. de 2012
Editada: Sabarinathan Vadivelu el 29 de Dic. de 2012
for i = 1 : 100 % 100 is number of images
A{i} = [f1 f2]; % make A as a cell
end
save('features.mat','A'); % create database

10 comentarios

Pat
Pat el 29 de Dic. de 2012
i have used 2 uiget file to select different images say fingerfrint and iris,extracted features and saved them a=[f1 f2];
now if i select other finger and iris image the features must be added in same database
Sabarinathan Vadivelu
Sabarinathan Vadivelu el 29 de Dic. de 2012
Yes like that only it will work. Put that inside the for loop.
Pat
Pat el 29 de Dic. de 2012
for i=1:100
if i dont know how many files am choosing ,what must be done
for i = 1 : 2
[file path] = uigetfile('*.jpg','Select the image');
I = imread(strcat(path,file));
% Extract the feautures
% f1 f2 are generated
A{i} = [f1 f2];
end
save('features.mat','A');
for 100 images, It is not possible to select all the 100 images manually, So
srcFiles = dir('E:\New Folder\*.jpg') % the folder in which ur images exists
for i = 1 : length(srcFiles)
filename = imread(['E:\New Folder\',srcFiles(i).name]);
inImage = imread(filename);
% Generate the features f1 and f2
Feature{i} = [f1 f2];
end
save('featuresextract.mat','Feature');
Pat
Pat el 29 de Dic. de 2012
I am using 2 uigetfile
one for face f1 and other for iris f2
A=[f1 f2],
if am choosing more images,how to append it to the database
Sabarinathan Vadivelu
Sabarinathan Vadivelu el 29 de Dic. de 2012
See the above comment. I answered for that also
saranya
saranya el 7 de Feb. de 2014
how to confirm that these values are stored..
Srikanth
Srikanth el 7 de Feb. de 2014
I have 1000 images of database and 4 features extracted for each image using graycoprops for glcm ... i wanted to create a mat file.... please could u help me in creating a mat file...
AJ
AJ el 9 de Nov. de 2019
Unable to perform assignment
because the left and right sides
have a different number of
elements.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Preguntada:

Pat
el 29 de Dic. de 2012

Comentada:

AJ
el 9 de Nov. de 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by