當前位置:編程學習大全網 - 源碼下載 - 誰能幫我運行壹下這個人臉識別的代碼 。Matlab的代碼,急需啊!把運行的數據和運行結果截圖給我,謝謝!

誰能幫我運行壹下這個人臉識別的代碼 。Matlab的代碼,急需啊!把運行的數據和運行結果截圖給我,謝謝!

sh167779@163.com

求程序

程序執行過程為:

程序運行後首先提示將TestDatabase,TrainDatabase兩個文件夾添加到路徑中

然後提示從TestDatabase中隨便選擇壹張圖片,程序會從TrainDatabase中選出與剛才所選相同的圖片

效果如下

手選圖片

程序挑出來的圖片

主程序代碼如下:

clear all

clc

close all

% You can customize and fix initial directory paths

TrainDatabasePath = uigetdir(strcat(matlabroot,'\work'), 'Select training database path' );

TestDatabasePath = uigetdir(strcat(matlabroot,'\work'), 'Select test database path');

prompt = {'Enter test image name (a number between 1 to 10):'};

dlg_title = 'Input of FLD-Based Face Recognition System';

num_lines= 1;

def = {'1'};

TestImage? = inputdlg(prompt,dlg_title,num_lines,def);

TestImage = strcat(TestDatabasePath,'\',char(TestImage),'.jpg');

im = imread(TestImage);

T = CreateDatabase(TrainDatabasePath);

[m V_PCA V_Fisher ProjectedImages_Fisher] = FisherfaceCore(T);

OutputName = Recognition(TestImage, m, V_PCA, V_Fisher, ProjectedImages_Fisher);

SelectedImage = strcat(TrainDatabasePath,'\',OutputName);

SelectedImage = imread(SelectedImage);

imshow(im)

title('Test Image');

figure,imshow(SelectedImage);

title('Equivalent Image');

str = strcat('Matched image is :? ',OutputName);

disp(str)

  • 上一篇:Python開源商城源代碼
  • 下一篇:在交換友情鏈接時,妳希望看到什麽,是快照、收藏,還是外鏈?
  • copyright 2024編程學習大全網