PointCloudLibrary / PointCloudLibrary/pcl
renderViewTesselatedSphere: single view pointcloud can‘t be transformed to the model coordinate
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
1、I obtain pointcloud of the .stl model using "pcl_mesh_sampling";
2、I obtain a single view pointcloud from the .stl model using the method renderViewTesselatedSphere;
3、I hope the two pointcloud are in the same coordinate,but they are not coincident!
below is my code:
vtkSmartPointer<vtkPolyData> polydata = vtkSmartPointer<vtkPolyData>::New();
vtkSmartPointer<vtkSTLReader> readerQuery = vtkSmartPointer<vtkSTLReader>::New();
readerQuery->SetFileName(argv[1]);
readerQuery->Update();
polydata = readerQuery->GetOutput();
polydata->GetNumberOfPoints();
float resx = 512;
float resy = resx;
std::vector<pcl::PointCloud<pcl::PointXYZ>,
Eigen::aligned_allocator<pcl::PointCloud<pcl::PointXYZ> > > views_xyz;
std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > poses;
std::vector<float> entropies;
pcl::visualization::PCLVisualizer vis;
vis.addModelFromPolyData(polydata, "mesh", 0);
vis.setRepresentationToSurfaceForAllActors();
vis.renderViewTesselatedSphere(resx, resy, views_xyz, poses, entropies, 0, 90, 1, TRUE);
pcl::PointCloud<pcl::PointXYZ> views_cloud;
pcl::transformPointCloud<pcl::PointXYZ>(views_xyz[i], *transformed_cloud, poses[i]);
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 by comparing the point cloud from pcl_mesh_sampling with views_xyz produced by renderViewTesselatedSphere, including the poses passed to transformPointCloud. Read the vtkSTLReader and PCLVisualizer setup shown in the report, then determine whether the two outputs use different coordinate frames. Done means documenting the cause and the transformation or API behavior needed for coincident point clouds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100