Source code

The source code is available on Github: https://github.com/jianboqi/CSF

DLL and Lib version

CSF can be easily embeded into other applications. It provides a header-and-DLL version, which can be downloaded here:

Version: 2.0

Visual Studio 2013:

Visual Studio 2013 32bit: DLL: Download Static lib: Download

Visual Studio 2013 64bit: DLL: Download Static lib: Download

Visual Studio 2010:

Visual Studio 2010 32bit: DLL: Download Static lib: Download

Visual Studio 2010 64bit: DLL: Download Static lib: Download

It is also very simple to use:

#include "CSF.h" 
#pragma comment(lib, "CSF.lib")

//step 1 read point cloud
CSF csf;
csf.setPointCloud(pc);// or csf.readPointsFromFile(pointClouds_filepath); 
//pc can be vector< csf::Point > or PointCloud defined in point_cloud.h

//step 2 parameter settings
//Among these paramters:  
//time_step  interations class_threshold can remain as defualt in most cases.
csf.params.bSloopSmooth = false;
csf.params.cloth_resolution = 0.5;
csf.params.rigidness = 3;

csf.params.time_step = 0.65;
csf.params.class_threshold = 0.5;
csf.params.interations = 500;

//step 3 do filtering
//result stores the index of ground points or non-ground points in the original point cloud
std::vector<int> groundIndexes, offGroundIndexes;
csf.do_filtering(groundIndexes, offGroundIndexes);
//csf.do_filtering(groundIndexes, offGroundIndexes,true); //if the third parameter is set as true, then a file named "cloth_nodes.txt" will be created, it respresents the cloth nodes.By default, it is set as false

Executable version

For convenience, we provided an excutable file (Download: CSFDemo, which is simply based on the static lib version. Hoever, we added a config file to manage the parameters. When you download this zip file, you will found three files:

when finished, you will be given a file named terr_ground.txt, which is ground points extracted from the Lidar point cloud.

Cloudcompare plugin

Besides the stand-alone version, we also implemented CSF as a cloudcompare plugin, refer to http://www.cloudcompare.org/ for more information. It is included in the CloudCompare 2.8 beta version.

Matlab Version

A mex version for programming in Matlab is at File Exchange of Mathworks website http://www.mathworks.com/matlabcentral/fileexchange/58139-csf--ground-filtering-of-point-cloud-based-on-cloth-simulation