フィルターのクリア

Unable to read pcd files using pcdread in matlab 2016a

12 ビュー (過去 30 日間)
shome
shome 2018 年 5 月 17 日
回答済み: guojia guo 2021 年 4 月 14 日
I get following error when I try to read pcd file using pcread (My system is matlab2016a, ubuntu 16.04, 64bit):
a=pcread('test.pcd');
Error using visionPlyRead
Ply file parsing error: Unable to read 'ply' from header.
Error in pcread (line 47)
properties = visionPlyRead(filename,elementName,requiredProperties,optionalProperties);
The pcd file is 0.7 format and has "COUNT" set to 1. The header of the pcd file is as below:
# .PCD v.7 - Point Cloud Data file format
VERSION .7
FIELDS x y z rgb
SIZE 4 4 4 4
TYPE F F F F
COUNT 1
WIDTH 213
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 213
DATA ascii
I have also tried clouds without RGB. The header is:
# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z
SIZE 4 4 4
TYPE F F F
COUNT 1(changed from 1 1 1)
WIDTH 12007
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 12007
DATA ascii
I got errors in both cases. The files dont have any "nan" values
  2 件のコメント
Jan
Jan 2018 年 5 月 18 日
編集済み: Jan 2018 年 5 月 18 日
The message "Ply file parsing error: Unable to read 'ply' from header" is not useful. Can you attach the input file?
Bin Qi
Bin Qi 2021 年 1 月 26 日
I have the same issue. Have you figured out the fix?

サインインしてコメントする。

回答 (1 件)

guojia guo
guojia guo 2021 年 4 月 14 日
Well,it seems because of the low version of MATLAB,change it to 2018,pcread() can read both .pcd file and ply file.Another solution is using this function in MATLAB COMMUNITY,read .pcd file then using pointCloud() to make it .
pt=loadpcd('1.pcd');
ptCloud=pointCloud(pt');
pcwrite(ptCloud,'1.ply');%格式的转换

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by