資源簡介
自己實現的經典ICP算法,采用PCA作了粗拼接,然后使用K-d樹算法加速選取對應點,使用bunny數據進行了拼接實驗,并計算了其RMS誤差。經典ICP算法中不包含篩選刪除誤匹配點對的步驟,因此精度較低。
代碼片段和文件信息
function?b?=?ascread(filename)??????%read?my?file
format?long;
fi?=?fopen(filename‘r‘);???????%openfile??‘r‘讀出參數
if?fi?0
??error(sprintf(‘File?%s?not?found‘?filename))
end
templine?=?1;?%
a?=?sscanf(fgetl(fi)?‘%d‘);%%fgetl從已經打開的文件中讀取一行,并且丟掉末尾的換行符。
templine?=?templine?+1;
if?length(a)==1
????points=a(1);
end
pointlist?=?zeros(3points);
for?vnum?=?1?:?points
??coord?=?sscanf(fgetl(fi)?‘%e?%e?%e‘);
??if?length(coord)?~=?3
????errmsg?=?sprintf(‘Each?vertex?line?must?contain?three?coordinates?(error?on?line?%d)‘?templine);
????error(errmsg);
??end
??templine?=?templine?+1;
??pointlist(:vnum)?=?coord;
end
b?=?cell({points;pointlist});
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-04-04?14:51??Basic_ICP\
?????文件?????????704??2018-04-04?14:51??Basic_ICP\ascread.m
?????文件?????1182978??2018-04-04?14:51??Basic_ICP\bun000.asc
?????文件?????1161413??2018-04-04?14:51??Basic_ICP\bun045.asc
?????文件????????1493??2018-04-04?14:51??Basic_ICP\init.m
?????文件????????1365??2018-04-04?14:51??Basic_ICP\register_demo.m
?????文件?????????178??2018-04-04?14:51??Basic_ICP\RMScompute.m
?????文件????????1120??2018-04-04?14:51??Basic_ICP\Solvecircle.m
評論
共有 條評論