標(biāo)題:
MATLAB仿真人臉識別程序
[打印本頁]
作者:
sundaykiller
時間:
2017-7-3 10:32
標(biāo)題:
MATLAB仿真人臉識別程序
本人本科設(shè)計的人臉識別。有MATLAB仿真。
0.png
(52.04 KB, 下載次數(shù): 70)
下載附件
2017-7-3 23:37 上傳
MATLAB源程序如下:
% b=imread('r.jpg');
% figure(1),imshow(b);
% x=rgb2gray% g=medfilt2(x,[5 5]);figure(2);%中值濾波
% imshow(g);
% clear all;
% b=imread('r.jpg');
% x=rgb2gray(b); %轉(zhuǎn)成灰度圖像
% H=adapthisteq(x);%直方圖均衡化
% figure(1),imshow(b);
% xlabel('原始圖像');
% figure(2),imshow(H);
% xlabel('adapthisteq均衡化');
clear all;
b=imread('ri.jpg');
figure(1);
imshow(b);
x=rgb2gray(b); %轉(zhuǎn)成灰度圖像
imhist(x);
xlabel('(b)');%直方圖
newI=im2bw(x,128/255);%根據(jù)上面直方圖選擇閾值125,劃分圖像的前景和背景?
figure(3);
subplot(1,2,1);
imshow(b);
xlabel('(a) 原始圖像');
subplot(1,2,2);
imshow(newI);
xlabel('(b)分割后圖像');
% F=rgb2gray(imread('r.jpg'));
% subplot(3,2,1);
% imshow(F);
% title('原圖');
% subplot(3,2,2);
% imhist(F);
% title('原圖直方圖');
% subplot(3,2,3);
% f=adapthisteq(F);
% imshow(f);
% title('adapthisteq均衡后圖');
% subplot(3,2,4);
% imhist(f);
% title('adapthisteq均衡后直方圖');
% subplot(3,2,5);
% H2=histeq(F);
% imshow(H2);
% title('histeq均衡后圖');
% subplot(3,2,6);
% imhist(f);
% title('histeq均衡后直方圖');
%
% clear all;
% F=rgb2gray(imread('r.jpg'));
% g=medfilt2(F,[5 5]);%中值濾波
% figure;
% subplot(3,2,1);
% imshow(g);
% title('中值濾波')
% subplot(3,2,2);
% imhist(g);
% title('中值濾波直方圖');
% g1=wiener2(F,[5 5]);%自適應(yīng)濾波
% subplot(3,2,3);
% imshow(g1);
% title('自適應(yīng)濾波')
% subplot(3,2,4);
% imhist(g1);
% title('自適應(yīng)濾波');
% g2=filter2(fspecial('average',3),F)/255;%均值濾波
% subplot(3,2,5);
% imshow(g2);
% title('均值濾波')
% subplot(3,2,6);
% imhist(g2);
% title('均值濾波');
% subplot(3,2,3);
% f=adapthisteq(g);
% imshow(f);
% title('中值濾波adapthisteq均衡后圖');
% subplot(3,2,4);
% imhist(f);
% title('中值濾波adapthisteq均衡后直方圖');
% newI=im2bw(g,115/255);%根據(jù)上面直方圖選擇閾值,劃分圖像的前景和背景
% figure;
% imshow(newI);
% % title('adapthisteq均衡后圖');
% newI1=im2bw(g1,110/255);%根據(jù)上面直方圖選擇閾值劃分圖像的前景和背景
% figure;
% imshow(newI1);
% %title('histeq均衡后圖');
% newI1=im2bw(g2,20);%根據(jù)上面直方圖選擇閾值,劃分圖像的前景和背景
% figure;
% imshow(newI2);
…………限于本文篇幅 余下代碼請從51黑下載附件…………
復(fù)制代碼
所有資料51hei提供下載:
chengxu.rar
(472.66 KB, 下載次數(shù): 113)
2017-7-3 10:32 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1