资源简介

不怎么实用,希望各位批评指导,相互学习 clear all,close all, TestDatabasePath = uigetdir('E:\我的大学', 'Select test database path');%自己设置地址 prompt = {'Enter test image name:'}; dlg_title = 'finger Recognition System'; num_lines= 1; def = {'1'}; TestImage = inputdlg(prompt,dlg_title,num_lines,def); TestImage = strcat(TestDatabasePath,'\',char(TestImage),'.bmp'); im = imread(TestImage); tic I=imresize(im,[200 200]); figure(1),subplot(131),imshow(I),title('原图'); set(gcf,'position',[1 1 600 600]); level=graythresh(I); J=im2bw(I,level); figure(1),subplot(132),imshow(J),title('二值图');

资源截图

代码片段和文件信息

function D=DistEuclidian(dataset1dataset2)
h = waitbar(0‘Distance Computation‘);
switch nargin
    case 1
        [m1n1]=size(dataset1);
        m2=m1;
        D=zeros(m1m2);
        for i=1:m1
            waitbar(i/m1)
            for j=1:m2
                if i==j
                    D(ij)=NaN;
                else
                    D(ij)=sqrt((dataset1(i1)-dataset1(j1))^2+(dataset1(i2)-dataset1(j2))^2);
                end
            end
        end
    case 2
        [m1n1]=size(dataset1);
        [m2n2]=size(dataset2);
        D=zeros(m1m2);
        for i=1:m1
            waitbar(i/m1)
            for j=1:m2
                D(ij)=sqrt((dataset1(i1)-dataset2(j1))^2+(dataset1(i2)-dataset2(j2))^2);
            end
        end
    otherwise
        error(‘only one or two input arguments‘)
end

close(h)

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

     文件     120054  2007-07-24 09:47  bishe\1.bmp

     文件     132118  2000-08-21 00:19  bishe\10.bmp

     文件     132118  2000-08-21 00:19  bishe\11.bmp

     文件     132118  2000-08-21 00:19  bishe\12.bmp

     文件     132118  2000-08-21 00:19  bishe\13.bmp

     文件     132118  2000-08-21 00:19  bishe\14.bmp

     文件     132118  2000-08-21 00:19  bishe\15.bmp

     文件     132118  2000-08-21 00:23  bishe\16.bmp

     文件     132118  2000-08-21 00:28  bishe\17.bmp

     文件     132118  2000-08-21 00:28  bishe\18.bmp

     文件     132118  2000-08-21 00:28  bishe\19.bmp

     文件     307254  2007-11-30 13:15  bishe\2.bmp

     文件     132118  2000-08-21 00:28  bishe\20.bmp

     文件     132118  2000-08-21 00:23  bishe\21.bmp

     文件     132118  2000-08-21 00:28  bishe\22.bmp

     文件     132118  2000-08-21 00:28  bishe\23.bmp

     文件     132118  2000-08-21 00:28  bishe\24.bmp

     文件     132118  2000-08-21 00:28  bishe\25.bmp

     文件     132118  2000-08-21 00:19  bishe\26.bmp

     文件     132118  2000-08-21 00:19  bishe\27.bmp

     文件     132118  2000-08-21 00:19  bishe\28.bmp

     文件     132118  2000-08-21 00:23  bishe\29.bmp

     文件     132118  2000-08-21 00:19  bishe\3.bmp

     文件     132118  2000-08-21 00:28  bishe\30.bmp

     文件     132118  2000-08-21 00:28  bishe\31.bmp

     文件     132118  2000-08-21 00:28  bishe\32.bmp

     文件     132118  2000-08-21 00:28  bishe\33.bmp

     文件     132118  2000-08-21 00:28  bishe\34.bmp

     文件     132118  2000-08-21 00:28  bishe\35.bmp

     文件     132118  2000-08-21 00:28  bishe\36.bmp

............此处省略43个文件信息

评论

共有 条评论