2016-03-29 51 views
0

PCL 1.6(私はAndroidを使用しています)でICPを設定する際に問題があり、これが不正な変換マトリックスの原因であると思います。これまで私が試したことはこれです。 は、私は、次のコードとICPで使用するポイントクラウドのダウンサンプリング:私はオプションの値のすべての種類を試みたIterative Closest Point PCLを設定する

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); 

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

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

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

次のコードを持つ2つの点群を位置合わせしてみてください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を設定する私を助けることができますか?

答えて

0

私が知っていることから、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); 

はかつて、あなたはこの作業を得た(そしてそれがあるべき)、その後、他のチューニングを開始それを行うのは難しいことではありません。

希望は、乾杯!

+0

私は葉にはかなり大きな値を使用していますが、私が1未満の値を使用すると、雲はダウンサンプリングされません。私はまた、不要なコードをすべて削除して、あなたの提案のような本質を使用しようとしましたが、残念ながらそれは助けになりませんでした。他の提案は歓迎以上のものです! :) – Ronald

関連する問題