首先,选择一个输入图像,然后单击"选择图像"。
% Then you can
% - add this image to database (click on "Add selected image to database"
%
% If you choose to add image to database, a positive integer (sign ID) is
% required. This posivive integer is a progressive number which identifies
% a person (each person corresponds to a class).
% For example:
%
% - add "mike1.jpg" to database ---> the ID has to be 1 since Mike is the first
% person you are adding to database
% - add "mike2.jpg" to database ---> the ID has to be 1 since you have already
% added a Mike's image to database
% - add "paul1.jpg" to database ---> the ID has to be 2 since Paul is the second person
% you are adding to database
% - add "cindy1.jpg" to database ---> the ID has to be 3 since Cindy is
% the third person you are adding to database
% - add "paul2.jpg" to database ---> the ID has to be 2 once again since
% you have already added Paul to database
如何分配此唯一标志ID ??
答案 0 :(得分:0)
在加载图像并对其进行处理时,可以使用加载的确切名称进行保存。你也可以添加前缀和后缀。
有时,根据您的需要,您可以在图片名称末尾附加时间和日期。
在您的情况下,您在
中有filename
[filename, pathname, filterindex] = uigetfile('*.jpg', 'Pick a .jpg image');
做一些像:
[pathstr, name, ext] = fileparts(filename)
newFileName = name + '_normalize' + ext;
您可以添加任何您想要的后缀
,而不是'_normalize'
如果您想添加日期和时间,可以使用datetime('now')