91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

用matlab寫的,采用doubly modified Hausdorff distance做人臉識別,識別率很高

資源截圖

代碼片段和文件信息

function?m2hd=MyM2HD(im1im2NP)
%Input:?two?normalised?binary?image:?set1?set2they?are?of?the?same?size
%Input:?N?is?the?size?of?neighborhoodsaythe?width?of?the?neighborhood?is?2*N+1
%Input:?P?is?the?penalty
%?tic;
m2hd=max(FM2HD(im1im2NP)FM2HD(im2im1NP));
%?toc

function?fm2hd=FM2HD(im1im2NP)
%Input:?two?normalised?binary?image:?set1?set2they?are?of?the?same?size
%Input:?N?is?the?size?of?neighborhoodsaythe?width?of?the?neighborhood?is?2*N+1
%Input:?P?is?the?penalty
%Ouput:?Forward?M2HD?from?im1?to?im2
[rc]=size(im2);
[point_r1pointc1]=find(im1>0);
[point_r2pointc2]=find(im2>0);
set1=[point_r1pointc1];
set2=[point_r2pointc2];
s1=size(set1);
s2=size(set2);
%計算im2中以各像素為中心的鄰域內的所有像素之和,若和大于0,則說明在鄰域中存在值為1的點
%由于FFT計算的是圓卷積,因此邊緣點的計算可能會有錯誤
nb=real(ifft2(fft2(im2).*fft2(ones(2*N+1)rc)));%得到以im2中某一點為正方形鄰域右下角(不是中心)內所有元素之和
nb=circshift(nb[-N-N]);%得到以im2中某一點為中心的鄰域內所有元素之和
nb=(nb>=1);%提取im2中所有在以之為中心的鄰域中有值為1的點的點
%計算min||a-b||s.t.?b?belongs?to?set2
%?min1to2=zeros(s1(1)1);
%?d1to2=zeros(s1(1)1);
%?for?i=1:s1(1)
%?????min1to2(i)=min(sqrt(sum((repmat(set1(i:)[s2(1)?1])?-?set2).^22)));
%?????if?nb(point_r1(i)pointc1(i))>0%如果set1中的點在im2中有鄰近點
%?????????d1to2(i)=min1to2(i);
%?????else
%?????????d1to2(i)=P;
%?????end
%?end
%?fm2hd=sum(d1to2)/s1(1);
%%%%%%%%%%%%?revised?version?%%%%%%%%%%%%%%%%%%%%
hasneighbor=im1.*nb;%提取im1中所有在im2中有鄰近點的點
[hasrhasc]=find(hasneighbor>0);
hasnb=[hasrhasc];%im1中所有在im2中有鄰近點的點的集合
sizehasnb=size(hasnb);
%對于在im2中有鄰近點的點,d(aB)=min||a-b||s.t.?b?belongs?to?set2
minhasnb=zeros(sizehasnb(1)1);
for?i=1:sizehasnb(1)
????minhasnb(i)=min(sqrt(sum((repmat(hasnb(i:)[s2(1)?1])?-?set2).^22)));
end
%compute?the?M2HD?for?the?remaining?points?in?set1?d(aB)=P
fm2hd=sum(minhasnb)+(s1(1)-sizehasnb(1))*P;
fm2hd=fm2hd/s1(1);







????????
????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????2046??2012-06-06?23:50??MyM2HD.m

?????文件????????780??2012-06-05?09:30??MyMatch_M2HD.m

?????文件????????782??2012-06-07?11:08??normalize.m

?????文件????????896??2012-06-07?09:45??Sobel.m

?????文件????????153??2012-06-03?00:05??SobelRGB.m

-----------?---------??----------?-----??----

?????????????????4657????????????????????5


評論

共有 條評論