How to combine ply of multiple views into a single object of 360 degree view

113 Views Asked by At

I have 8 ply files for a single object but each of different views. I need to integrate all those scenes and form 360 degree mesh. Is there a technique in pcl to intergrate all those scenes. Can icp be used in integrating scenes. If so it will be useful if anyone provide sample code that integrate it.

I need to integrate different views of a single scene.I tried icp but i was not able to integrate it. I am not sure how source and target is fixed and how it will be aligned. Can icp used for integrating scenes?

2

There are 2 best solutions below

3
IBitMyBytes On

What you want to do is called registration. The PCL tutorials may be a good starting point for you: https://pcl.readthedocs.io/projects/tutorials/en/master/#registration Yes, ICP is one possible method for this. Whether it will succeed depends on the parameters you choose, the object itself, and how good the starting guess is you give to ICP.

0
Nikitha On

This is the sample code. BUt it does not integrate two different views.

pcl::IterativeClosestPoint<pcl::PointXYZRGB, pcl::PointXYZRGB> icp;
icp.setMaximumIterations(500);
icp.setInputSource(mls_points_with_normals);
icp.setInputTarget(mls_points_with_normals2);
// icp.setMaxCorrespondenceDistance (0.05);
icp.setEuclideanFitnessEpsilon(1);
icp.setTransformationEpsilon(1);
pcl::PointCloud<pcl::PointXYZRGB>::Ptr aligned_cloud(new pcl::PointCloud<pcl::PointXYZRGB>);
icp.align(*aligned_cloud);

Eigen::Matrix4f transformation_matrix = icp.getFinalTransformation();
pcl::PointCloud<pcl::PointXYZRGB>::Ptr transformed_cloud(new pcl::PointCloud<pcl::PointXYZRGB>);
pcl::transformPointCloud(*mls_points_with_normals, *transformed_cloud, transformation_matrix);
pcl::PointCloud<pcl::PointXYZRGB>::Ptr integrated_cloud(new pcl::PointCloud<pcl::PointXYZRGB>);
*integrated_cloud = *transformed_cloud + *mls_points_with_normals2;