Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nandite/pcl-optics
C++ Implementation of the OPTICS algorithm compatible with the Point Cloud Library.
https://github.com/nandite/pcl-optics
c-plus-plus clustering clustering-algorithm cpp density-classification optics pcl pcl-library point-cloud
Last synced: 2 months ago
JSON representation
C++ Implementation of the OPTICS algorithm compatible with the Point Cloud Library.
- Host: GitHub
- URL: https://github.com/nandite/pcl-optics
- Owner: Nandite
- License: other
- Created: 2020-03-07T10:13:52.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T22:28:25.000Z (about 2 years ago)
- Last Synced: 2024-01-14T14:35:34.996Z (about 1 year ago)
- Topics: c-plus-plus, clustering, clustering-algorithm, cpp, density-classification, optics, pcl, pcl-library, point-cloud
- Language: C++
- Homepage:
- Size: 4.31 MB
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Pcl-Optics
===============[![][license-image]][license]
![][platform-image][license-image]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
[license]: https://github.com/Nandite/PclWalkerViewer/blob/master/LICENSE[platform-image]: https://img.shields.io/badge/platorms-linux64%20%7C%20osx%20%7C%20windows-lightgrey?style=flat-square
OPTICS is an algorithm for finding density-based clusters in spatial data. It was presented by Mihael Ankerst,
Markus M. Breunig, Hans-Peter Kriegel and Jörg Sander in 1999.The goal of this repository is to provide a C++ implementation of the algorithm compatible with the
cloud and points of the Point Cloud Library ([PCL](http://www.pointclouds.org/)) project, without any further
dependencies than those required by the PCL. The metric used by the algorithm to estimate density is the euclidean
distance in a 3D space. This work is derived from the implementation made by
[Ingo Proff](https://github.com/CrikeeIP/OPTICS-Clustering).## Usage
```cpp
#include "Optics.hpp"pcl::PointCloud::Ptr cloud(new pcl::PointCloud);
//
// Adding data to the cloud of points ...
//std::vector clusters;
Optics::optics(cloud, neighborhoodMinPts, reachabilityThreshold, clusters);for (const auto& cluster : clusters) {
if (cluster->indices.size() < minPtsPerCluster) continue;
// Do something with the cluster
}
```You can compile and execute the example program provided:
```sh
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
./Pcl_Optics ../table_scene_lms400.pcd
```You should get the following output into the pcl visualizer:
![libjson-rpc-cpp logo](resources/clusters-example.png)
Each color represents a different density cluster.
## Dependencies
The only dependencies required is the [Point Cloud Libary](http://www.pointclouds.org/).
Tests have been performed with [pcl-1.8.1](https://github.com/PointCloudLibrary/pcl/releases/tag/pcl-1.8.1),
[pcl-1.9.0](https://github.com/PointCloudLibrary/pcl/releases/tag/pcl-1.9.0)
and [pcl-1.9.1](https://github.com/PointCloudLibrary/pcl/releases/tag/pcl-1.9.1) and using C++11, C++14 and C++17.## Installation
The implementation resides in a single header file making it easy to integrate into a c++ project.
Just clone the repository
```sh
git clone https://github.com/Nandite/Pcl-Optics
```
Then copy the [Optics](include/Optics.hpp) header file located into the include directory in your project.## Documentation
You will find into the [resources](resources) directory a publication from [Mihael Ankerst, Markus M. Breunig,
Hans-Peter Kriegel and Jörg Sander](resources/OPTICS.pdf) succinctly explaining the OPTICS algorithm.There is also an excellent paper from [Izabela Anna Wowczko](https://www.academia.edu/8142139/Density_Based_Clustering_with_DBSCAN_and_OPTICS_-_Literature_Review)
of the Institute of Technology Blanchardstown explaining the principle of the algorithm.## Feedback
Don't hesitate if you have any suggestions for improving this project, or if you find any error. I will be glad to
hear from you. Contributions are welcomed :)## License
Distributed under the MIT Software License (X11 license).
See accompanying file LICENSE.