ransac-pcl

Plane Segmentation in a Point Cloud Using RANSAC

This is a basic segmentation of plane fitting in point cloud data using (RAN)dom (SA)mple (C)onsensus.

Setup

This setup assumes you’ve installed Anaconda already. If not, please install anaconda from here or from your package manager.

The following packages are required to run this code.

To set up a conda environment and install all dependencies, do the following.

conda create -n open3d 
conda activate open3d
conda install -c open3d-admin -c open3d
conda install -c conda-forge python-kaleido plotly numpy matplotlib

Usage

To test it on custom data, change the source code to represent the path of your data.

Run python3 ransac.py to obtain a plot of the data along with the best fit plane.

Results

The points in green are the points of the data, and the grey part is the best fit plane.

3d plane inside point cloud data