• 大小: 33KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-09
  • 语言: Matlab
  • 标签: 指纹识别  

资源简介

一套关于指纹识别的,我带的本科生毕业设计,现在发上来给大家共享,有这方面研究的绝对是好材料。程序中有指纹图像的归一化,图像分割,图像增强,方向图,细化,特征提取,伪特征去除,特征匹配等等。

资源截图

代码片段和文件信息

clc
clear all
close all


originI=imread(‘qwe.bmp‘);
[mns] = size(originI);
I=originI;
if s == 3
    I = rgb2gray(originI);
end
I=double(I);
figure imshow(uint8(I)) 
tic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 归一化

M=0;var=0;
for x=1:m
    for y=1:n
        M=M+I(xy);
    end
end
M1=M/(m*n);
for x=1:m
    for y=1:n
        var=var+(I(xy)-M1)*(I(xy)-M1);
    end
end
var1=var/(m*n);
%c=sqrt(30*(I(xy)-M1)/var1);
for x=1:m
    for y=1:n
        if I(xy)>=M1
            I(xy)=150+sqrt(2000*(I(xy)-M1)/var1);
        else
            I(xy)=150-sqrt(2000*(M1-I(xy))/var1);
        end
    end
end
%figure imshow(uint8(I)) 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 分割
M = 10;      %1
H = m/M;  L= n/M;

aveg1=zeros(HL);
var1=zeros(HL);
for x=1:H;
   for y=1:L;
       aveg=0;var=0;
        for i=1:M;
            for j=1:M;
                aveg=I(i+(x-1)*Mj+(y-1)*M)+aveg;

            end
        end
         aveg1(xy)=aveg/(M*M);
        for i=1:M;
            for j=1:M;
                var=(I(i+(x-1)*Mj+(y-1)*M)-aveg1(xy))*(I(i+(x-1)*Mj+(y-1)*M)-aveg1(xy))+var;

            end
        end
        
        var1(xy)=var/(M*M);
        
   end
end
Gmean=0;Vmean=0;
for x=1:H
    for y=1:L
        Gmean=Gmean+aveg1(xy);
        Vmean=Vmean+var1(xy);
    end
end
Gmean1=Gmean/(H*L);
Vmean1=Vmean/(H*L);

gtemp=0;gtotle=0;vtotle=0;vtemp=0;
for x=1:H
    for y=1:L
       if Gmean1>aveg1(xy)
           gtemp=gtemp+1;
           gtotle=gtotle+aveg1(xy);
       end
       if Vmean1           vtemp=vtemp+1;
           vtotle=vtotle+var1(xy);
       end 
    end
end
G1=gtotle/gtemp;V1=vtotle/vtemp;


gtemp1=0;gtotle1=0;vtotle1=0;vtemp1=0;
for x=1:H
    for y=1:L
       if G1           gtemp1=gtemp1+1;
           gtotle1=gtotle1+aveg1(xy);
       end
       if 0           vtemp1=vtemp1+1;
           vtotle1=vtotle1+var1(xy);
       end 
    end
end
G2=gtotle1/gtemp1;V2=vtotle1/vtemp1;

moban=zeros(HL);
T1=G2;T2=V2;
T3=G1-100;T4=V2-10;
for x=1:H
   for y=1:L
       if aveg1(xy)>T1 && var1(xy)           moban(xy)=1;
       end
       if aveg1(xy)           moban(xy)=1;
       end
   end
end

for x=2:H-1
    for y=2:L-1
        if moban(xy)==1
            if moban(x-1y) + moban(x-1y+1) +moban(xy+1) + moban(x+1y+1) + moban(x+1y) + moban(x+1y-1) + moban(xy-1) + moban(x-1y-1) <=4
                moban(xy)=0;
            end
        end
    end
end  %2



Icc = ones(mn);
for x=1:H
   for y=1:L
       if  moban(xy)==1
          
          for i=1:M
            for j=1:M
                I(i+(x-1)*Mj+(y-1)*M)=G1;
                Icc(i+(x-1)*Mj+(y-1)*M)=0;
            end
          end
 
       end
       
   end
end
%figure imshow(uint8(I)) 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     270054  2010-03-21 15:27  指纹识别\qwe.bmp

     文件      17308  2010-04-11 13:08  指纹识别\SHEJIzhiwen.m

     目录          0  2010-04-11 13:11  指纹识别

----------- ---------  ---------- -----  ----

               287362                    3


评论

共有 条评论