{"id":21251229,"url":"https://github.com/gvaliente/pcps","last_synced_at":"2025-07-11T01:32:03.588Z","repository":{"id":201436195,"uuid":"192617361","full_name":"GValiente/pcps","owner":"GValiente","description":"CPU and GPU point cloud plane segmentation ","archived":false,"fork":false,"pushed_at":"2019-09-18T08:29:20.000Z","size":20260,"stargazers_count":24,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-10-19T20:15:13.468Z","etag":null,"topics":["cpp","cpp11","cuda","opencl","pcl","thrust"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GValiente.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-18T21:52:15.000Z","updated_at":"2023-10-19T21:17:29.125Z","dependencies_parsed_at":null,"dependency_job_id":"fec517a1-74d4-4f4a-9c13-212cb88a883d","html_url":"https://github.com/GValiente/pcps","commit_stats":null,"previous_names":["gvaliente/pcps"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GValiente%2Fpcps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GValiente%2Fpcps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GValiente%2Fpcps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GValiente%2Fpcps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GValiente","download_url":"https://codeload.github.com/GValiente/pcps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225669674,"owners_count":17505363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp11","cuda","opencl","pcl","thrust"],"created_at":"2024-11-21T03:41:06.401Z","updated_at":"2024-11-21T03:41:06.913Z","avatar_url":"https://github.com/GValiente.png","language":"C++","readme":"pcps\n====\n\npcps is a small C++11 library which provides point cloud segmentation into planes with similar surface normals.\n\nSince pcps allows computing the segmentation into the GPU besides the CPU, it can segment an [organized point cloud](http://pointclouds.org/documentation/tutorials/basic_structures.php) of 320x320 in less than 10 milliseconds on a Nvidia Geforce GTX 1060 6GB.\n\n![pcps viewer screenshot](screenshot.png?raw=true)\n\n## Features\n\n- [Organized and disorganized point clouds](http://pointclouds.org/documentation/tutorials/basic_structures.php) are allowed as input.\n- Three implemenentation backends are provided: CPU, OpenCL and CUDA.\n- Allocated memory can be reused between different segmentations.\n- Multiple tests are present for each provided algorithm.\n- A 3D test viewer allows to see the output of each segmentation algorithm and to change their thresholds.\n- Base library without external dependencies (the viewer and the tests require [PCL](http://www.pointclouds.org) to read [PCD files](http://www.pointclouds.org/documentation/tutorials/pcd_file_format.php)).\n- Doxygen documentation provided for API reference (see doc/index.html).\n- Licensed under [MIT license](LICENSE).\n\n## Algorithms\n\nTo perform a point cloud segmentation, pcps provides the following algorithms:\n\n- Organizer: organizes the given [disorganized point cloud](http://pointclouds.org/documentation/tutorials/basic_structures.php).\n- NormalExtractor: estimates local surface normals at each point of the given organized point cloud.\n- NormalSplitter: splits a given organized normal cloud into regions with low standard deviation.\n- NormalMerger: merges the given normal regions into planes (groups) with low standard deviation.\n\n## Tested build configurations (minimum required versions may be lower)\n\n* Ubuntu 16.04 with gcc 5.4.0.\n* Ubuntu 18.04 with gcc 7.3.0.\n* macOS High Sierra with clang.\n\n## Usage\n\nThe following example shows how to load a [PCL point cloud](http://www.pointclouds.org) stored in a PCL file [PCD file](http://www.pointclouds.org/documentation/tutorials/pcd_file_format.php)) and segment it into planes:\n\n```C++\n#include \u003ciostream\u003e\n#include \u003cpcl/io/pcd_io.h\u003e\n#include \"catch.hpp\"\n#include \"pcps_pcl.h\"\n#include \"pcps_context.h\"\n#include \"pcps_plane_segmentator.h\"\n\nint main(int argc, char** argv)\n{\n    pcl::PointCloud\u003cpcl::PointXYZ\u003e pclPointCloud;\n\n    if(pcl::io::loadPCDFile(\"/path/to/pcl_cloud_file.pcd\", pclPointCloud))\n    {\n        std::cerr \u003c\u003c \"pcl::io::loadPCDFile failed\" \u003c\u003c std::endl;\n        return -1;\n    }\n\n    pcps::Cloud pointCloud;\n    pcps::fromPCL(pclPointCloud, pointCloud);\n\n    pcps::PlaneSegmentator planeSegmentator;\n    std::vector\u003cpcps::Plane\u003e planes;\n    std::unique_ptr\u003cpcps::Context\u003e context = pcps::Context::buildDefault();\n\n    if(! planeSegmentator.segmentate(pointCloud, planes, *context))\n    {\n        std::cerr \u003c\u003c \"pcl::io::loadPCDFile failed\" \u003c\u003c std::endl;\n        return -1;\n    }\n\n    return 0;\n}\n```\n\n## How to build\n\nA CMakeLists.txt is provided with this library, so in order to use it you only need to include this file in your CMake project.\n\n### How to build the library with the CPU implementation\n\nFor the CPU implementation there's no external dependencies required, so the only software requirements are a C++11-compatible compiler and CMake \u003e= 3.4:\n\n```\nsudo apt install build-essential cmake\nmkdir build\ncd build\ncmake -DPCPS_IMPLEMENTATION=CPU -DCMAKE_BUILD_TYPE=Release ..\nmake -j\u003cnumber_of_cpu_cores\u003e\n```\n\n### How to build the library with the OpenCL implementation\n\nThe OpenCL implementation can segment an [unorganized point cloud](http://pointclouds.org/documentation/tutorials/basic_structures.php) of 320x320 on a Nvidia Geforce GTX 1060 6GB more than 23 times faster than the CPU implementation:\n\n```\nsudo apt install build-essential cmake\nsudo apt install ocl-icd-libopencl1 opencl-headers clinfo ocl-icd-opencl-dev\nmkdir build\ncd build\ncmake -DPCPS_IMPLEMENTATION=OpenCL -DCMAKE_BUILD_TYPE=Release ..\nmake -j\u003cnumber_of_cpu_cores\u003e\n```\n\n### How to build the library with the CUDA implementation\n\nThe CUDA implementation can segment an [unorganized point cloud](http://pointclouds.org/documentation/tutorials/basic_structures.php) of 320x320 on a Nvidia Geforce GTX 1060 6GB more than 30 times faster than the CPU implementation:\n\n```\nsudo apt install build-essential cmake\nmkdir build\ncd build\ncmake -DPCPS_IMPLEMENTATION=CUDA -DCMAKE_BUILD_TYPE=Release ..\nmake -j\u003cnumber_of_cpu_cores\u003e\n```\n\n### How to build and run the unit tests\n\nThe unit tests require [PCL](http://www.pointclouds.org) to read [PCD files](http://www.pointclouds.org/documentation/tutorials/pcd_file_format.php).\n\nFor example, to build and run the unit tests with the OpenCL implementation:\n\n```\nsudo apt install build-essential cmake\nsudo apt install ocl-icd-libopencl1 opencl-headers clinfo ocl-icd-opencl-dev\nsudo apt install libproj-dev libpcl-dev\nmkdir build\ncd build\ncmake -DPCPS_BUILD_TESTS=ON -DPCPS_IMPLEMENTATION=OpenCL -DCMAKE_BUILD_TYPE=Release ..\nmake -j\u003cnumber_of_cpu_cores\u003e\n./tests/pcps-tests\n```\n\n### How to build and run the viewer\n\nThe provided 3D test viewer allows to see the output of each segmentation algorithm and to change their thresholds.\n\nThe viewer requires [PCL](http://www.pointclouds.org) to read [PCD files](http://www.pointclouds.org/documentation/tutorials/pcd_file_format.php).\n\nFor example, to build and run the viewer with the OpenCL implementation:\n\n```\nsudo apt install build-essential cmake\nsudo apt install ocl-icd-libopencl1 opencl-headers clinfo ocl-icd-opencl-dev\nsudo apt install libproj-dev libpcl-dev\nmkdir build\ncd build\ncmake -DPCPS_BUILD_VIEWER=ON -DPCPS_IMPLEMENTATION=OpenCL -DCMAKE_BUILD_TYPE=Release ..\nmake -j\u003cnumber_of_cpu_cores\u003e\n./tests/pcps-viewer\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvaliente%2Fpcps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgvaliente%2Fpcps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvaliente%2Fpcps/lists"}