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

資源簡介

針對傳統攝像機自標定方法的上述不足,利用遺傳算法完成了Hartley新的Kruppa方程的攝像機自標定過程,以便將這個過程完全轉化為通過代價函數最小化來求得攝像機的內參數,這就排除了極點的不穩定因素。實驗結果表明,該方法是簡單、有效的,可以作為一種通用的標定工具

資源截圖

代碼片段和文件信息

%%?generitic?algrithm
%%?floating?encoding
%%?f(x)=x1^2+x2^2
%%?min?f(x)
clear;
clc;
rand(‘state‘sum(100*clock))
NP=30;
pm=0.05;
pc=0.8;
alaf=0.5;
dimentions=2;
b=0.5;
UB=30;
LB=-30;
Maxiterations=50;
child=rand(NPdimentions)*(UB-LB)+LB;??%%?initialize?
farther=child;
iterations=0;
bestfx=[];
while?iterations%%?computer?the?fitness
for?p=1:NP
????x1=farther(p1);
????x2=farther(p2);
????fx(p)=x1^2+x2^2;
????fitness(p)=1/(fx(p)+0.0000001);????
end
[XI]=sort(fitness);
bestnumber=I(NP);
bestfx(iterations+1)=min(fx);

%%?computer?the?fitness?accumulation
for?p=1:NP
????if?p==1
????????fitacc(p)=fitness(p);
????else
????????fitacc(p)=fitacc(p-1)+fitness(p);
????end
end
%%?copy?operation
for?p=1:NP
????if?p==bestnumber
????????child(p:)=farther(p:);
????else
????????randfit=rand*fitacc(NP);
????
????????for?i=1:NP
????????????if?fitacc(i)>=randfit
????????????????break;
????????????end????????????
????????end
????????child(p:)=farther(i:);
????end
end

%%?crossover?operation
for?number1=1:NP
????if?number1==bestnumber
????????child(number1:)=child(number1:);
????else
????????number2=number1;
????????
????????while?number2==number1
????????????number2=rand*NP;
????????????number2=number2-rem(number21)+1;
????????end
????
????????if?pc>rand
????????????child(number1:)=alaf*child(number1:)+(1-alaf)*child(number2:);
????????else
????????????child(number1:)=child(number1:);
????????end
????end
end

%%?mutate?operation
for?p=1:NP
????if?p==bestnumber
????????child(p:)=child(p:);
????else
????????if?pm>rand
????????????deta=rand;
????????????power=(1-iterations/Maxiterations)^b;
????????????d=rand*dimentions;
????????????d=d-rem(d1)+1;
????????????if?(rand-0.5)>0
????????????????child(pd)=child(pd)+(UB-child(pd))*(1-deta^power);????????????????
????????????else
????????????????child(pd)=child(pd)-(child(pd)-LB)*(1-deta^power);
????????????end
????????else
????????????child(p:)=child(p:);
????????end
????end
end
farther=child;
iterations=iterations+1;
end
hold?on
plot(bestfx);
for?i=1:Maxiterations
????if?bestfx(i)<0.001
????????plot(ibestfx(i)‘r*‘);
????????break;
????end
end

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

?????文件?????220100??2010-03-20?22:37??基于遺傳算法的攝像機自標定方法.caj

?????文件???????2249??2008-08-24?16:32??GA.m

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

???????????????222349????????????????????2


評論

共有 條評論