【问题标题】:Configure Iterative Closest Point PCL配置迭代最近点 PCL
【发布时间】:2016-07-16 20:50:36
【问题描述】:

我在 PCL 1.6(我使用 Android)中配置 ICP 时遇到问题,我认为这是转换矩阵不正确的原因。到目前为止我尝试过的是这个; 使用以下代码对我在 ICP 中使用的点云进行下采样:

    pcl::VoxelGrid <pcl::PointXYZ> grid; 

    grid.setLeafSize(6, 6, 6); 
    grid.setInputCloud(output); 
    grid.filter(*tgt); 

    grid.setInputCloud(cloud_src); 
    grid.filter(*src); 

尝试使用以下代码对齐两个点云:

pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ> icp; 
icp.setInputCloud(tgt); 
icp.setInputTarget(src); 
pcl::PointCloud<pcl::PointXYZ> Final; 
pcl::PointCloud<pcl::PointXYZ> transformedCloud; 
icp.setMaxCorrespondenceDistance(0.08); 
icp.setMaximumIterations(500); 
//icp.setTransformationEpsilon (0.000000000000000000001); 
icp.setTransformationEpsilon(1e-12); 
icp.setEuclideanFitnessEpsilon(1e-12); 
icp.setRANSACIterations(2000); 
icp.setRANSACOutlierRejectionThreshold(0.6); 

我尝试了ICP选项中的各种值,但没有成功。

我用来创建点云的代码:

        int density = 1; 
        for (int y = 0; y < depthFrame.getHeight(); y = y + density) { 
            for (int x = 0; x < depthFrame.getWidth(); x = x + density) { 
                short z = pDepthRow[y * depthVideoMode.getResolutionX() + x]; 
                if (z > 0 && z < depthStream.getMaxPixelValue()) { 
                        cloud_src->points[counter].x = x; 
                        cloud_src->points[counter].y = y; 
                        cloud_src->points[counter].z = z; 
                } 
            } 
        } 

有人可以帮我配置 ICP 吗?

【问题讨论】:

    标签: android-ndk point-cloud-library


    【解决方案1】:

    据我所知,PCL 使用米作为计量单位。那么,是否打算下采样的叶子大小为 6*6*6 !?我觉得很大!! 尝试一些较低的值,如果它也不起作用,请尝试使用最简单配置的 ICP,如下所示:

     pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ> icp; 
     icp.setInputCloud(tgt); 
     icp.setInputTarget(src); 
     pcl::PointCloud<pcl::PointXYZ> Final; 
     icp.align(Final);
    

    一旦你得到了这个工作(它应该是),然后开始调整其他参数,它应该不难做到。

    希望有帮助,干杯!

    【讨论】:

    • 我知道我对叶子使用了一个相当大的值,但是当我使用低于 1 的值时,云不会被向下采样。我还尝试删除所有不必要的代码,只使用您建议的必需品,但不幸的是,这并没有帮助。任何其他建议都非常受欢迎! :)
    猜你喜欢
    • 2016-10-17
    • 1970-01-01
    • 2019-05-11
    • 2013-06-21
    • 2023-04-09
    • 1970-01-01
    • 1970-01-01
    • 2015-09-26
    • 1970-01-01
    相关资源
    最近更新 更多