資源簡(jiǎn)介
一個(gè)關(guān)于坐標(biāo)轉(zhuǎn)換的算法,ICP迭代算法實(shí)現(xiàn)。VC++ 6.0
代碼片段和文件信息
/*
Copyright?2011.?All?rights?reserved.
Institute?of?Measurement?and?Control?Systems
Karlsruhe?Institute?of?Technology?Germany
This?file?is?part?of?libicp.
Authors:?Andreas?Geiger
libicp?is?free?software;?you?can?redistribute?it?and/or?modify?it?under?the
terms?of?the?GNU?General?Public?License?as?published?by?the?Free?Software
Foundation;?either?version?3?of?the?License?or?any?later?version.
libicp?is?distributed?in?the?hope?that?it?will?be?useful?but?WITHOUT?ANY
WARRANTY;?without?even?the?implied?warranty?of?MERCHANTABILITY?or?FITNESS?FOR?A
PARTICULAR?PURPOSE.?See?the?GNU?General?Public?License?for?more?details.
You?should?have?received?a?copy?of?the?GNU?General?Public?License?along?with
libicp;?if?not?write?to?the?Free?Software?Foundation?Inc.?51?Franklin
Street?Fifth?Floor?Boston?MA?02110-1301?USA?
*/
//?Demo?program?showing?how?libicp?can?be?used
#include?
#include?“icpPointToPoint.h“
#include?“icpPointToPlane.h“
#include?“l(fā)asreader.h“
#include?“l(fā)aswriter.h“
#include?“l(fā)asdefinitions.h“
using?namespace?std;
int?main?(int?argc?char**?argv)?{
??//?define?a?3?dim?problem?with?10000?model?points
??//?and?10000?template?points:
??int32_t?dim?=?3;
??
??int32_t?num=10000;
???double*?M?=?new?double[3*num];
??double*?T?=??new?double[3*num];
??
??//?set?model?and?template?points
??cout?<??cout?<“Creating?template?by?shifting?model?by?(111)?...“?<??int32_t?k=0;
??for?(double?x=-2;?x<2;?x+=0.04)?{
????for?(double?y=-2;?y<2;?y+=0.04)?{
??????double?z=5*x*exp(-x*x-y*y);
??????M[k*3+0]?=?x;
??????M[k*3+1]?=?y;
??????M[k*3+2]?=?z;
??????T[k*3+0]?=?x-1;
??????T[k*3+1]?=?y-1;
??????T[k*3+2]?=?z-1;
??????k++;
????}
??}
??
??//?start?with?identity?as?initial?transformation
??//?in?practice?you?might?want?to?use?some?kind?of?prediction?here
??Matrix?R?=?Matrix::eye(3);
??Matrix?t(31);
??//double?m=0.01;
??//?run?point-to-plane?ICP?(-1?=?no?outlier?threshold)
??cout?<??IcpPointToPlane?icp(Mnumdim);
??icp.fit(TnumRt-1);
??//?results
??cout?<??cout?<“R:“?<??cout?<“t:“?<
??//?free?memory
??free(M);
?free(T);
??//delete?[]M;
???//delete?[]T;
??//?success
??return?0;
}
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件?????325120??2014-03-30?18:29??ICPdemo_test\Debug\ICPdemo_test.exe
?????文件????1862524??2014-03-30?18:29??ICPdemo_test\Debug\ICPdemo_test.ilk
?????文件????2903040??2014-03-30?18:29??ICPdemo_test\Debug\ICPdemo_test.pdb
?????文件??????11034??2014-03-31?19:30??ICPdemo_test\ICPdemo_test\Debug\cl.command.1.tlog
?????文件?????535634??2014-03-31?19:30??ICPdemo_test\ICPdemo_test\Debug\CL.read.1.tlog
?????文件???????8602??2014-03-31?19:30??ICPdemo_test\ICPdemo_test\Debug\CL.write.1.tlog
?????文件????????406??2014-03-17?11:07??ICPdemo_test\ICPdemo_test\Debug\ICPdemo_test.exe.em
?????文件????????472??2014-03-30?18:26??ICPdemo_test\ICPdemo_test\Debug\ICPdemo_test.exe.em
?????文件????????381??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\ICPdemo_test.exe.intermediate.manifest
?????文件?????????84??2014-03-31?19:30??ICPdemo_test\ICPdemo_test\Debug\ICPdemo_test.lastbuildstate
?????文件???????2003??2014-03-31?19:30??ICPdemo_test\ICPdemo_test\Debug\ICPdemo_test.log
?????文件??????????0??2014-03-31?19:30??ICPdemo_test\ICPdemo_test\Debug\ICPdemo_test.unsuccessfulbuild
?????文件????????214??2014-03-17?11:07??ICPdemo_test\ICPdemo_test\Debug\ICPdemo_test_manifest.rc
?????文件??????79369??2014-03-31?19:28??ICPdemo_test\ICPdemo_test\Debug\lasreader.obj
?????文件??????77775??2014-03-31?19:28??ICPdemo_test\ICPdemo_test\Debug\laswriter.obj
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件??????????2??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件???????5590??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件???????9966??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件???????3558??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\li
?????文件?????169566??2014-03-31?19:28??ICPdemo_test\ICPdemo_test\Debug\matrix.obj
?????文件????????850??2014-03-30?18:29??ICPdemo_test\ICPdemo_test\Debug\mt.command.1.tlog
............此處省略56個(gè)文件信息
評(píng)論
共有 條評(píng)論