Unable to open read LiDAR data in .ply format #70
-
Hello! I am trying to read some LiDAR data that has been saved as a .ply using plyfile, but I run into several errors when trying to use the plyfile read command. Attached is the code and the error. When I tried the example tet.ply file, the code worked, but I can't find where my .ply file is formatted incorrectly. Unfortunately, I cannot attach the .ply file. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
My best guess is that your PLY file header states vertex properties that don't exist in the data, but that really is a guess. Unfortunately I can't do much better than that without a little bit more information. At least you seem to have a text-format file, so it should be pretty easy to debug. Since I'm not sure how familiar you are with the file format, I'll drop this link to the specification: https://web.archive.org/web/20161221115231/http://www.cs.virginia.edu/~gfx/Courses/2001/Advanced.spring.01/plylib/Ply.txt It is a very simple format. If you want more help here, I would suggest providing some more information about the file. Given the error you posted, it should be enough to upload just the header block and the very first line of actual data. That alone would be enough to confirm whether my guess in the first sentence is correct or not. |
Beta Was this translation helpful? Give feedback.
-
The As far as I know, there can't be line breaks in the middle of the data of a vertex, so each vertex's data has to be on one line. The specification is admittedly a little bit vague about this, but I would say this condition is pretty strongly implied by the examples. I just checked the C reference implementation and I think it also works this way, if I read it correctly. (Found here: http://www.paulbourke.net/dataformats/ply/) In the example you posted, it looks like each vertex's data is split over three lines. I would consider that an invalid file, and |
Beta Was this translation helpful? Give feedback.
The
float32
type actually is supported, so that shouldn't be the issue.As far as I know, there can't be line breaks in the middle of the data of a vertex, so each vertex's data has to be on one line. The specification is admittedly a little bit vague about this, but I would say this condition is pretty strongly implied by the examples. I just checked the C reference implementation and I think it also works this way, if I read it correctly. (Found here: http://www.paulbourke.net/dataformats/ply/)
In the example you posted, it looks like each vertex's data is split over three lines. I would consider that an invalid file, and
plyfile
does not support it.