Pointsample

What is PointSample?

  • PointSample is a small python module containing tools and algorithms for processing large pointclouds.

  • Currently, PointSample supports several subsampling algorithms: k-nearest neighbors, box-based subsampling, voxel filtering, and ground segmentation sampling.

  • Also, PointSample provides tools for reading / writing .las files, and converting .las files to .out files (a file format specific to DinoYURT).

Algorithms

  • K-nearest neighbors:

    • Description: finds the k-closest points relative to a collection of points in 3D space.

    • Runtime complexity: O(ndk), where n is the total number of points in your dataset and d is dimension of each data point.

    • Best Uses: For sampling dense, clustered data with little noise or sporadic features.

  • Voxel filtering:

    • Description: while simplified, voxel filtering basically divides your entire dataset into a series of rectangular prisms and selects a point within each prism.

    • Best Uses: For maintaining global, spare information at the expense of local, refined features.

  • Segment lowest points:

    • Description: partitions the x-y plane of your dataset into n by m rectangles and selects the lowest point in the pointcloud within each rectangle.

    • Runtime complexity: O(n), where n is the total number of points in your dataset.

    • Best Uses: For subsampling ground data at the expense of higher, global points.

  • Box Subsampling:

    • Description: Places a rectangular prism of size length x width x height in R^3 and selects every point within the prism.

    • Runtime complexity: O(n^2), where n is the total number of points in your dataset.

    • Best Uses: For subsampling small portions of a very dense pointcloud (> 10 million points).

Installation

To download pointsample, open your terminal and type:

> git clone https://github.com/Rostifar/PointSample

Next, you will need to install the following dependencies: Laspy, Python-PCL, Numpy, and Pyflann. See the github repository for more information.

Running Examples

PointSample includes several example programs, each demonstrating how to use aforementioned algorithms. To run one of the examples, find the example folder in your cloned repository. In this folder, there should be four example programs: box_subsample_example.py, k_nn_example.py, lowest_point_segmentaiton.py, voxel_filter_example.py. Before you run any of these examples, however, make sure to provide a .las file. This can be done by modifying the las_file variable within each of the programs.

Created by Ross Briden