天天看點

【pcl】根據點雲的某一次元的數值進行可視化

根據DON特征進行可視化

//可視化show the differences of curvature with both large and small scale
    if (VISUAL = 1)
    {
        cout << "click q key to quit the visualizer and continue!!" << endl;
        boost::shared_ptr<pcl::visualization::PCLVisualizer> MView(new pcl::visualization::PCLVisualizer("Showing the difference of curvature of two scale"));
        pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointNormal> handler_k(doncloud, "curvature");//PointCloudColorHandlerGenericField方法是将點雲按深度值(“x”、“y”、"z"均可)的差異着以不同的顔色。
        MView->setBackgroundColor(1, 1, 1);
        MView->addPointCloud(doncloud, handler_k);
        MView->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 3);
        MView->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_OPACITY, 0.5);
        MView->spin();
    }
           

其根據曲率進行可視化

繼續閱讀