⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.m

📁 matlab人脸检测软件
💻 M
字号:
% Version : 5.0
% Date : MAY / 18 / 2007
% Author  : Omid Bonakdar Sakhi

clear all;
clc;
close all;
if ~exist('gabor.mat','file')
    fprintf ('Creating Gabor Filters ...');
    create_gabor;
end
if exist('net.mat','file')
    load net;
else
    createffnn
end
if exist('imgdb.mat','file')
    load imgdb;
else
    IMGDB = loadimages;
end
while (1==1)
    choice=menu('Face Detection',...
                'Create Database',...
                'Initialize Network',...
                'Train Network',...
                'Test on Photos',...
                'Exit');
    if (choice ==1)
        IMGDB = loadimages;
    end
    if (choice == 2)
        createffnn
    end    
    if (choice == 3)
        net = trainnet(net,IMGDB);
    end
    if (choice == 4)
        [file_name file_path] = uigetfile ('*.jpg');
        if file_path ~= 0
            im = imread ([file_path,file_name]);
            try 
                im = rgb2gray(im);
            end 
            tic
            im_out = imscan (net,im);
            toc
            figure;imshow(im_out,'notruesize');
        end
    end
    if (choice == 5)
        clear all;
        clc;
        close all;
        return;
    end    
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -