?? test_main.m
字號:
clc;close all;clear all;
deletedatabase('my_database'); % Delete "my_database", if it exists. If input database
% does not exist no action is performed
img = imread('s1_1.pgm'); % Load an image into workspace
ID = 1; % ID is a progressive, integer number
add2database(img,ID,'my_database'); % Add this image for person #1 to database "my_database"
img = imread('s2_1.pgm'); % Add another image to the database ("my_database" DB)
ID = 2; % This second image is person #2
add2database(img,ID,'my_database');
img = imread('s3_1.pgm'); % Add another image to the database ("my_database" DB)
ID = 3; % This third image is person #3
add2database(img,ID,'my_database');
img = imread('s1_2.pgm'); % Add another image to the database ("my_database" DB)
ID = 1; % For this fourth image added to DB I have to use ID #1.
add2database(img,ID,'my_database');
% Now database of known faces is ready. You can add other images, of
% course, to make the recognition process more robust.
img = imread('s1_3.pgm'); % Load an unknown image
ID = recognitionVSdatabase(img,'my_database'); % Face identification: it is necessary to specify
% input image and the database of "known" faces
disp('Recognized ID');
disp(ID);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -