Incorrect reconstruction when moving a pointcloud using pcl::Poisson

28 views Asked by At

I'm having a problem with pcl::Poisson. As I had to register the side-face pointcloud to the front face, I used pcl::transformPointCloud to transform it. However, when I translated the point cloud in the X direction by controlling the transformation matrix, the point cloud had a reconstruction error in the subsequent pcl::Poisson, and some areas were flipped. I tried other direction and didn't find any issue.

the results of using Poisson triangulation on point clouds at three different locations.

    test <<
        0.712103806, -0.0198134936, -0.701794553, 500,// 500 is a test value that caused the error to occur
        0.00191580805, 0.999652815, -0.0262788596, 0.190653507,
        0.702071577, 0.0173687723, 0.711894534, 169.211749,
        0, 0, 0, 1;
    pcl::PointCloud<pcl::PointXYZRGB>::Ptr transformed_cloud(new pcl::PointCloud<pcl::PointXYZRGB>);
    pcl::transformPointCloud(*src, *transformed_cloud, test);

If the 500 above becomes 0, the point cloud x range is -305.713 to -269.977. And then my usage of Poisson:

    pcl::search::KdTree<pcl::PointXYZRGBNormal>::Ptr tree2(new pcl::search::KdTree<pcl::PointXYZRGBNormal>);
    tree2->setInputCloud(cloud_with_normals);

    pcl::Poisson<pcl::PointXYZRGBNormal> pn;
    pn.setConfidence(false); 
    pn.setManifold(false); 
    pn.setOutputPolygons(false);
    pn.setDegree(2); 
    pn.setIsoDivide(8); 
    pn.setSamplesPerNode(12.0);
    pn.setScale(1.25); 
    pn.setDepth(9);
    pn.setSolverDivide(8); 
    
    pn.setSearchMethod(tree2);
    pn.setInputCloud(cloud_with_normals);

    pcl::PolygonMesh::Ptr mesh(new pcl::PolygonMesh);
    pn.performReconstruction(*mesh);

I want to know why this happens. Is it because I adjusted the parameters of pcl::Poisson incorrectly? How should I solve it?

0

There are 0 answers