資源簡介
[原創]根據文獻使用matlab實現了PFH算法,并使用它對bunny數據進行了基于特征匹配和RANSAC的拼接實驗。關鍵點選取和特征匹配部分是直接用的之前文獻復原的內容(資源已發布),僅用來測試PFH的有效性。由于運行速度過慢,我將代碼分為三塊,依次運行PFH_demo.m(關鍵點提取)、PFH_demo2.m(PFH計算,耗時)、PFH_demo3.m(拼接實驗與結果展示)。代碼中實現的是64維度的描述符,與PCL中的略有不同。關鍵點如果用3D harris效果應該會更好一點。

代碼片段和文件信息
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?13:22??My_PFH\
?????文件?????????704??2015-12-23?13:38??My_PFH\ascread.m
?????文件?????1182978??2010-10-14?20:28??My_PFH\bun000.asc
?????文件?????1161413??2010-10-14?20:28??My_PFH\bun045.asc
?????文件?????????608??2018-04-03?18:47??My_PFH\lsqnormest.m
?????文件????????1719??2018-04-04?13:08??My_PFH\PFH_demo.m
?????文件????????2523??2017-01-12?16:41??My_PFH\PFH_demo2.m
?????文件????????2941??2018-04-03?20:38??My_PFH\PFH_demo3.m
?????文件????????1200??2016-03-09?17:27??My_PFH\Quater_Registration.m
評論
共有 條評論