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
采纳的回答
Sabarinathan Vadivelu
2012-12-29
编辑:Sabarinathan Vadivelu
2012-12-29
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 个评论
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
Yes like that only it will work. Put that inside the for loop.
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');
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
See the above comment. I answered for that also
how to confirm that these values are stored..
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...
Unable to perform assignment
because the left and right sides
have a different number of
elements.
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
标签
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
