


Set_difference(indices_fullset.begin(), indices_fullset.end(), Std::sort(inliers.begin(), inliers.end()) Std::vector indices_fullset(xyz->size()) įor (int p_it = 0 p_it (indices_fullset.size()) ++p_it) PointIndices::Ptr everything_but_the_plane(new PointIndices) Remove the plane indices from the data Instead of returning the planar model as a set of inliers, return the outliers, but perform a cluster segmentation first Print_value("%g %g %g %g", coefficients, coefficients, coefficients, coefficients) print_info("]\n") SampleConsensusModelPlanePtr model(new SampleConsensusModelPlane(xyz)) Using SampleConsensusModelPlanePtr = SampleConsensusModelPlane::Ptr Pcl::PCLPointCloud2::Ptr cloud(new pcl::PCLPointCloud2) pcd file in the cloud_viewer.cpp file, build it again and run it in debug mode.īoost::shared_ptr viewer(new pcl::visualization::PCLVisualizer("3D Viewer"))

Open Visual Studio project and set to project to cloud_viewer.In my case I had some warning messages but it worked: Compile will create project file in build directory. Īlso do not forget to add code from the tutorial website () else the code wont build. If the cpp file is named main.cpp it wont work because it must be cloud_viewer.cpp. In CMake ( ) reference the folder where those two files are and reference empty build file.Īdd text from this website into CMakeLists.txt and then add cloud_viewer.cpp with the code inside. cpp file following the online tutorial instructions. Create Folder in whatever place (I used C:/lib/PCLTest drive) and add CMakeLists.txt and.

C:\Program Files\PCL 1.11.1\3rdParty\VTK\bin
