1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | function [endpoint,bifurpoint] = minutiae_ext(thin) endpoint=[]; bifurpoint=[]; width = size(thin,2); height = size(thin,1); width = width-3; height = height-3; for h=1:1:height for w=50:1:width-50 if thin(h+1,w+1)==1 continue; end sum=0; for j=h:1:h+2 for i=w:1:w+2 sum = sum + thin(j,i); end end if sum==7 e=[h+1,w+1]; endpoint=[endpoint;e]; elseif sum==5 flag=0; if thin(h,w+1)+thin(h+2,w+1)+thin(h+1,w)==0 flag=1; elseif thin(h,w+1)+thin(h+2,w+1)+thin(h+1,w+2)==0 flag=1; elseif thin(h+1,w)+thin(h+1,w+2)+thin(h+2,w+1)==0 flag=1; elseif thin(h+1,w)+thin(h+1,w+2)+thin(h,w+1)==0 flag=1; elseif thin(h,w)+thin(h+2,w+2)+thin(h+2,w)==0 flag=1; elseif thin(h,w)+thin(h+2,w+2)+thin(h,w+2)==0 flag=1; elseif thin(h+2,w)+thin(h,w+2)+thin(h+2,w+2)==0 flag=1; elseif thin(h+2,w)+thin(h,w+2)+thin(h,w)==0 flag=1; elseif thin(h,w)+thin(h+2,w)+thin(h+1,w+2)==0 flag=1; elseif thin(h+1,w)+thin(h,w+2)+thin(h+2,w+2)==0 flag=1; elseif thin(h,w)+thin(h,w+2)+thin(h+2,w+1)==0 flag=1; elseif thin(h+2,w)+thin(h+2,w+2)+thin(h,w+1)==0 flag=1; elseif thin(h+2,w)+thin(h,w+1)+thin(h+1,w+2)==0 flag=1; elseif thin(h+1,w)+thin(h+2,w+1)+thin(h,w+2)==0 flag=1; elseif thin(h+1,w)+thin(h,w+1)+thin(h+1,w+2)==0 flag=1; elseif thin(h,w)+thin(h+2,w+1)+thin(h+1,w+2)==0 flag=1; end if flag==1 b=[h+1,w+1]; bifurpoint=[bifurpoint;b]; end end end end end | cs |
'정보 보안 > 지문 & 홍채인식 프로젝트' 카테고리의 다른 글
main 함수 - 지문인식 (0) | 2020.02.05 |
---|---|
match 함수 - 지문인식 (0) | 2020.02.05 |
my_direction 함수 - 지문인식 (0) | 2020.02.05 |
toIdx 함수 - 지문인식 (0) | 2020.02.05 |
totheta 함수 - 지문인식 (0) | 2020.02.05 |