PointCloudLibrary / PointCloudLibrary/pcl
Reading PLY file produces wrong encoding
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
Dear all,
I've been trying to load the Stanford Bunny PLY, and I get errors with my own simple app —
#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/io/ply_io.h>
#include <pcl/point_types.h>
using namespace std;
int
main (int argc, char** argv)
{
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZRGB>);
if (pcl::io::loadPLYFile ("bun000.ply", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file bun000.ply \n");
system("pause");
}
cout<<"point size: "<<cloud->points.size ()<<endl;
cout<<"width: "<<cloud->width<<endl;
cout<<"height: "<<cloud->height<<endl;
for (uint i = 0; i < cloud->size(); ++i)
cout << cloud->points[i].x << ' ' << cloud->points[i].y << " " << cloud->points[i].z << endl;
system("pause");
return (0);
}
and its output:
point size: 204800
width: 512
height: 400
1.#QNAN 1.#QNAN 1.#QNAN
I use the lateset vresion of PCL,and run it on VS2010 64 bit.
test file: http://graphics.stanford.edu/data/3Dscanrep/
bun000.ply in "bunny.tar.gz".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the sample program's call to pcl::io::loadPLYFile in pcl/io/ply_io.h and reproduce it with bun000.ply from bunny.tar.gz under VS2010 64-bit. Inspect why the loaded PointXYZRGB coordinates print as 1.#QNAN. Done means the file loads without NaN coordinates while preserving the reported cloud dimensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100