Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLY header conflict (vertex_indices) #968

Closed
VictorLamoine opened this issue Oct 21, 2014 · 4 comments
Closed

PLY header conflict (vertex_indices) #968

VictorLamoine opened this issue Oct 21, 2014 · 4 comments

Comments

@VictorLamoine
Copy link
Contributor

rdcelis reported an issue with the PLY parser, the header is filled with vertex_indices instead of vertex_index

See the PCL discussion for more information.

@taketwo
Copy link
Member

taketwo commented Oct 22, 2014

See #579.

@RDCH106
Copy link

RDCH106 commented Oct 28, 2014

The problem not solved.
I use PCL 1.7.2 with the changes implemented in #579, but the headers with the property:

-property list uchar int vertex_indices

Crash when you load a ply file with loadPLYFile.

@VictorLamoine
Copy link
Contributor Author

There is also #675

@VictorLamoine
Copy link
Contributor Author

PCL trunk, it looks like this issue if fixed.

1.ply

ply
format ascii 1.0
comment VCGLIB generated
element vertex 2
property float x
property float y
property float z
element face 0
property list uchar int vertex_indices
end_header
0 1.61803 1 
0 1.61803 -1 

2.ply

ply
format ascii 1.0
comment VCGLIB generated
element vertex 2
property float x
property float y
property float z
element face 0
property list uchar int vertex_index
end_header
0 1.61803 1 
0 1.61803 -1 

Test code

#include <pcl/point_cloud.h>
#include <pcl/io/ply_io.h>
#include <pcl/common/common.h>
#include <pcl/visualization/pcl_visualizer.h>

typedef pcl::PointXYZ PointT;
typedef pcl::PointCloud<PointT> PointCloudT;

int main(int argc, char* argv[])
{
  PointCloudT::Ptr pc_1 (new PointCloudT),
                   pc_2 (new PointCloudT);
  pcl::io::loadPLYFile("/home/victor/1.ply", *pc_1);
  pcl::io::savePLYFile("/home/victor/1_saved.ply", *pc_1);
  pcl::io::loadPLYFile("/home/victor/1_saved.ply", *pc_2);

  pcl::visualization::PCLVisualizer viewer;
  viewer.addPointCloud(pc_2);
  viewer.spin();
  return (0);
}

Test code with 1.ply

[pcl::PLYReader] /home/victor/1.ply:9: property 'list uint8 int32 vertex_indices' of element 'face' is not handled
[pcl::PLYReader] /home/victor/1_saved.ply:21: property 'float32 focal' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/1_saved.ply:22: property 'float32 scalex' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/1_saved.ply:23: property 'float32 scaley' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/1_saved.ply:24: property 'float32 centerx' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/1_saved.ply:25: property 'float32 centery' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/1_saved.ply:28: property 'float32 k1' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/1_saved.ply:29: property 'float32 k2' of element 'camera' is not handled

Test code with 2.ply

[pcl::PLYReader] /home/victor/2.ply:9: property 'list uint8 int32 vertex_index' of element 'face' is not handled
[pcl::PLYReader] /home/victor/2_saved.ply:21: property 'float32 focal' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/2_saved.ply:22: property 'float32 scalex' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/2_saved.ply:23: property 'float32 scaley' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/2_saved.ply:24: property 'float32 centerx' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/2_saved.ply:25: property 'float32 centery' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/2_saved.ply:28: property 'float32 k1' of element 'camera' is not handled
[pcl::PLYReader] /home/victor/2_saved.ply:29: property 'float32 k2' of element 'camera' is not handled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants