Borrar filtros
Borrar filtros

Unable to read pcd files using pcdread in matlab 2016a

12 visualizaciones (últimos 30 días)
shome
shome el 17 de Mayo de 2018
Respondida: guojia guo el 14 de Abr. de 2021
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 comentarios
Jan
Jan el 18 de Mayo de 2018
Editada: Jan el 18 de Mayo de 2018
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 el 26 de En. de 2021
I have the same issue. Have you figured out the fix?

Iniciar sesión para comentar.

Respuestas (1)

guojia guo
guojia guo el 14 de Abr. de 2021
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');%格式的转换

Categorías

Más información sobre Point Cloud Processing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by