CSF: Ground Filtering based on Cloth Simulation
Project description
CSF
Airborne LiDAR filtering method based on Cloth Simulation. This is the code for the article:
W. Zhang, J. Qi*, P. Wan, H. Wang, D. Xie, X. Wang, and G. Yan, “An Easy-to-Use Airborne LiDAR Data Filtering Method Based on Cloth Simulation,” Remote Sens., vol. 8, no. 6, p. 501, 2016. (http://www.mdpi.com/2072-4292/8/6/501/htm)
New feature has been implemented:
Now, We has wrapped a Python interface for CSF with swig. It is simpler to use now. This new feature can make CSF easier to be embeded into a large project. For example, it can work with Laspy (https://github.com/laspy/laspy). What you do is just read a point cloud into a python 2D list, and pass it to CSF. The following example shows how to use it with laspy.
# coding: utf-8
import laspy
import CSF
import numpy as np
inFile = laspy.read(r"in.las") # read a las file
points = inFile.points
xyz = np.vstack((inFile.x, inFile.y, inFile.z)).transpose() # extract x, y, z and put into a list
csf = CSF.CSF()
# prameter settings
csf.params.bSloopSmooth = False
csf.params.cloth_resolution = 0.5
# more details about parameter: http://ramm.bnu.edu.cn/projects/CSF/download/
csf.setPointCloud(xyz)
ground = CSF.VecInt() # a list to indicate the index of ground points after calculation
non_ground = CSF.VecInt() # a list to indicate the index of non-ground points after calculation
csf.do_filtering(ground, non_ground) # do actual filtering.
outFile = laspy.LasData(inFile.header)
outFile.points = points[np.array(ground)] # extract ground points, and save it to a las file.
out_file.write(r"out.las")
Reading data from txt file:
If the lidar data is stored in txt file (x y z for each line), it can also be imported directly.
import CSF
csf = CSF.CSF()
csf.readPointsFromFile('samp52.txt')
csf.params.bSloopSmooth = False
csf.params.cloth_resolution = 0.5
ground = CSF.VecInt() # a list to indicate the index of ground points after calculation
non_ground = CSF.VecInt() # a list to indicate the index of non-ground points after calculation
csf.do_filtering(ground, non_ground) # do actual filtering.
csf.savePoints(ground,"ground.txt")
How to use CSF in Python
Thanks to @rjanvier's contribution. Now we can install CSF from pip as:
pip install cloth-simulation-filter
How to use CSF in Matlab
see more details from file demo_mex.m
under matlab folder.
How to use CSF in R
Thanks to the nice work of @Jean-Romain, through the collaboration, the CSF has been made as a R package, the details can be found in the RCSF repository. This package can be used easily with the lidR package:
library(lidR)
las <- readLAS("file.las")
las <- lasground(las, csf())
How to use CSF in C++
Now, CSF is built by CMake, it produces a static library, which can be used by other c++ programs.
linux
To build the library, run:
mkdir build #or other name
cd build
cmake ..
make
sudo make install
or if you want to build the library and the demo executable csfdemo
mkdir build #or other name
cd build
cmake -DBUILD_DEMO=ON ..
make
sudo make install
Windows
You can use CMake GUI to generate visual studio solution file.
Binary Version
For binary release version, it can be downloaded at: http://ramm.bnu.edu.cn/projects/CSF/download/
Note: This code has been changed a lot since the publication of the corresponding paper. A lot of optimizations have been made. We are still working on it, and wish it could be better.
Cloudcompare Pulgin
At last, if you are interested in Cloudcompare, there is a good news. our method has been implemented as a Cloudcompare plugin, you can refer to : https://github.com/cloudcompare/trunk
Related project
A tool named CSFTools
has been recently released, it is based on CSF, and provides dem/chm generation, normalization. Please refer to: https://github.com/jianboqi/CSFTools
License
CSF is maintained and developed by Jianbo QI. It is now released under Apache 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for cloth_simulation_filter-1.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db7a13e6d1bd5b446e05307a7870602f14ca6d3442b08cdcd165b6ba1f77913 |
|
MD5 | c712e6088609579f4ad3a31e9d2c16c2 |
|
BLAKE2b-256 | f4577bdd8a76af4a4045d29ee8503e7da96e492cb2cbc7eb3e3950fff401c606 |
Hashes for cloth_simulation_filter-1.1.5-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdbd03c198bc6b0dec605eaad9c9bf56348c3b08065f48de515d9534691279f2 |
|
MD5 | 7fdc396c6a9d790d4d91c58be91eb641 |
|
BLAKE2b-256 | b8001f0f18b3990e593d4a4550083e0d8738762a86a24f28225ffb2f7442b9e6 |
Hashes for cloth_simulation_filter-1.1.5-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 320f071735d2bc95a6754a8d06f74e0b6411e5fe500e60a94d713e117079c00f |
|
MD5 | c5892077fd5a7aed606031257f359ee1 |
|
BLAKE2b-256 | 6bce18348f04cd2d7b84c892fd08debd25cb67de48d00e895443eabbe37d0f5e |
Hashes for cloth_simulation_filter-1.1.5-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa3d31bb72b0f0a5d5dd9eae79d1a7e184ddc4186c2c9867cd06df244e9c980f |
|
MD5 | 46e26d0059af70d047e0c03f000d1c0d |
|
BLAKE2b-256 | 50254b6cb64b46c9c8f4371e6e27366313fa26f823eca2a6eba965036f643454 |
Hashes for cloth_simulation_filter-1.1.5-cp312-cp312-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4c5211c1bad6652e33e8bc1a2be2b654503f95decffc75513d77324d792835b |
|
MD5 | d9583a247316c3211ce9f1382e5346a9 |
|
BLAKE2b-256 | ccd2c8d22768a3b03a93311746f1c050c9497f8fe15ea75415d4cedeb4c8f3b6 |
Hashes for cloth_simulation_filter-1.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dea3c0fd3625dc678dd4e98cb1a905887a7f3dc7ff59985940aa0ce9dd1b764a |
|
MD5 | 0cab8b17cf24b0e71ad21076279174cb |
|
BLAKE2b-256 | e40a693918499d1cb07225ec7694cdbbbf3b4ba03fffd5b2f1ff8d37dd803da6 |
Hashes for cloth_simulation_filter-1.1.5-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bab5a001c7f1cc44c3a1a4fc619ecf44f64b99789a3d443c23042fef57bc7f18 |
|
MD5 | 4287ad3ef5de8c85b13f2db261a990da |
|
BLAKE2b-256 | 051bea67a4c781f757fdc73306d0bc3d030cf55b446acd77454ad0cabac95b1c |
Hashes for cloth_simulation_filter-1.1.5-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52a7940678ccf94bbca0a29991648c5fd159f95711787edbb6700648d442ea26 |
|
MD5 | 2afc7fa7225387b82825508df52f368f |
|
BLAKE2b-256 | 336cfd94f98e8c74043a58888a12a593be66f79868ada0bff141fb6f2cc9f546 |
Hashes for cloth_simulation_filter-1.1.5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0d4e59104dafa0054edaea87d86fd8c08c5a9dc510f8188238d0b2845fb28f8 |
|
MD5 | ef7c90ced656d8bde11f37892414fec3 |
|
BLAKE2b-256 | 0b48b2247cf074c000c6ef53aa1ab0769b86ce742e3df1e2bda9c081572d9874 |
Hashes for cloth_simulation_filter-1.1.5-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e78e03edb0aaab49e4687c79f0298a92e0f0a3096b5b6e4fb9022d26de03c804 |
|
MD5 | 46439a024b18e78ddcfdfdc33450aa07 |
|
BLAKE2b-256 | 2dcff9f2948bae6bbfe42247075141eb9caf215cc09e2bb6eb7017fcdc6a56b9 |
Hashes for cloth_simulation_filter-1.1.5-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3a9f672a1e5e0dfe881a558f576721f3e00b553c41fe78031f338e2897ea06c |
|
MD5 | cac3909f4093293ed69224d94fa9868d |
|
BLAKE2b-256 | e3d7547e30bfe400105818f7cf7ab3bca08ea64cd1305f7a4d10722aaf489da7 |
Hashes for cloth_simulation_filter-1.1.5-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4339ab2fd86965763e00e0fb51950a38851973f2b48d0702125f9b9b9e9e783 |
|
MD5 | 177d7a3115974bb5fc554bcfe78ca997 |
|
BLAKE2b-256 | 4576e855310e8dc7f9a975db95a89763b2bb9b261070d99888eff41811569207 |
Hashes for cloth_simulation_filter-1.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eab5a51c317500cc1d43813c24669064714197dcf120f3cf7881b6f1d074161c |
|
MD5 | 03b6c2f0f2cda5affad344a1b95221f4 |
|
BLAKE2b-256 | 6c9ec705a206f2aa09d13c17c272a426d22a563066f6c05268ba2b1f31f31a79 |
Hashes for cloth_simulation_filter-1.1.5-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06a1527ef4942dd9ebc52a248c536ad9fe8f40255c90e08d218cec412cb1e3fc |
|
MD5 | ba5ec4a041f26230300c34e14688e481 |
|
BLAKE2b-256 | a7c80d17d2681c0aa6d69796df20f9c12f1346706147ebdbcbc1a4994bca9c7a |
Hashes for cloth_simulation_filter-1.1.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c64a20bbdab5d5acfa3548ad3206a542ccb8ce1807daf7ba2951c4f2297831 |
|
MD5 | b709b452ddd8e062da9deca08b989e43 |
|
BLAKE2b-256 | febad09190b1f4dcb018f500cef84b650e4ba1ecc1b97f254cbcadf2be1395ab |
Hashes for cloth_simulation_filter-1.1.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9a76673bfe397ea2e9be9534c35f4959bd794abb2264799fd3bacb602d657bd |
|
MD5 | e9d44149f085aebfb6ab99124a041087 |
|
BLAKE2b-256 | b71b5c61e3bda79685b46fe3f3639e1ffaffbe2104b417fe5f54a7860dfda183 |
Hashes for cloth_simulation_filter-1.1.5-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aab6a308100ed24b0404a9b14799ef0da28754c19f76da96ed522660bd2393cc |
|
MD5 | f2ae45963adf407d73f936d2c35ffe2e |
|
BLAKE2b-256 | 0a430b76278375f3586cc55cb5b9a338f8f4fef4c6cc4aad4f3dc1ac6a6bfb25 |
Hashes for cloth_simulation_filter-1.1.5-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a931c6db6e54d728564cb3423223ad25b4177457d3f4fef63b572a55cc9bd5e |
|
MD5 | b79c08c17f523a70355bad65bc05ccae |
|
BLAKE2b-256 | 44d1a9ef19fda2c8ca7f0120279ba49588ec343f80b38cffc38b962a43883b8d |
Hashes for cloth_simulation_filter-1.1.5-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 563f4180e6baaeba0415a030c11de1c71c53000dcc719b12c47de8a9c365b8b8 |
|
MD5 | a8fbfa1b2a944c3ab4a70892aad4d158 |
|
BLAKE2b-256 | 0d85ed1bacbf0c4a8d31f6943c5a25b6b158e113585bc60ec2b436b2bc18953e |
Hashes for cloth_simulation_filter-1.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd9ebd2c28d47ce02b6d83528f33c2be171f084044c65b48c725d2fc71f2d9ee |
|
MD5 | ce9b514aae0c7d8f4dba41832f0001ec |
|
BLAKE2b-256 | f3b0da4ff7224fcf04e7d0bdc912f0c86160cf201507da87faa8d067ccfa33f5 |
Hashes for cloth_simulation_filter-1.1.5-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55d5997b9cfb55acc7b8e3d9e1c624a2f695b88c4c3b6709fa622c004cd42df9 |
|
MD5 | 285b00068b162338e4244df069fb8f5a |
|
BLAKE2b-256 | a77b4a51c838aecba862852452a51af80ffa33c28154bcea09e77e7b01c3b991 |
Hashes for cloth_simulation_filter-1.1.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71c4f667b99d15b9eab54b8dea6957184274c1c77dcf245d4c6bebc3bc75b14f |
|
MD5 | fb7c7501f39d47be820161a96ae4427e |
|
BLAKE2b-256 | 16d2313b1fe1e39218f33e40c1525dbec6b95e7612a919b6ea618adf2b169fb1 |
Hashes for cloth_simulation_filter-1.1.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c75c254e90dd0c881148fafa62f6198471659b21cad78c26447786158df47478 |
|
MD5 | 0a2f5b27555124b1de7947fa82268c71 |
|
BLAKE2b-256 | 0275b752eb6ac8d7eddf8ded99294ad5abd24ac7c5b98278fd438190a63c348b |
Hashes for cloth_simulation_filter-1.1.5-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a97d55021baf0e529c498fc0cd6780735741696cd7156ea1ccfeadf77e5835de |
|
MD5 | 1601b49be9fffcffc0a829f14c54c7d7 |
|
BLAKE2b-256 | 12e50fa2ede2825896b7b803cc2385fb0e4b0652693690d62be1ab5d11ff2313 |
Hashes for cloth_simulation_filter-1.1.5-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e57642baa0a18df260d0503275c1be90f7d11bcb412a3c54181aefb087cb4a9 |
|
MD5 | 9b9fea400db5e542878b3283d5518c2a |
|
BLAKE2b-256 | fa460522da53da7ff2e6da304bce115c08c07d1b8dc42e3902baa9466a0f2f22 |
Hashes for cloth_simulation_filter-1.1.5-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9530999e0eb98071b6b1c874fb5f06543c5098c99d5307cd509e9db043780243 |
|
MD5 | 128a6ed0abf8ad11c00622b6a9ead175 |
|
BLAKE2b-256 | c6e0eaa59577923e682a544f0196b01a0f162b6425ee3ca38cd8c39e9e44d048 |
Hashes for cloth_simulation_filter-1.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17dda83cd1d42ea826500eed2373f78c6204327dd793c8daf28fbb4b5a31050b |
|
MD5 | e3aa4985f89c06129c33612a43d299a3 |
|
BLAKE2b-256 | ae250adae53c6db1912a6c667044bd48dad8df024ac02e4f89bed923286408fe |
Hashes for cloth_simulation_filter-1.1.5-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbfca7cb2389c17cba1e3b020c241f29c0adb63ad8c7f0707a896518371c4eaf |
|
MD5 | 71cd7824a21d3855f488941927f5056b |
|
BLAKE2b-256 | 3c5708e265f85b719d6415681f38fba7e0e4ad1632da1065709a97291ea0765c |
Hashes for cloth_simulation_filter-1.1.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b69b5d35ba9befd72bd2187ac4c6198cef07393cf62fbcb41001e014ecef391 |
|
MD5 | 27733bd3370645b01ba033788998f6be |
|
BLAKE2b-256 | 0f8ec7efee7a9ee18c2c5c88d19f101cbddb21fe7f27bad0983e8e5fa31a690b |
Hashes for cloth_simulation_filter-1.1.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a2f09412a0f685678ba64eacdbc8756ecee69fc263103fc9b5d8b20006dc927 |
|
MD5 | ee87fc79f4cc204649961dd08a09f636 |
|
BLAKE2b-256 | 247be91dedfdccfc4c6fa36c71e0344fb71711091895d217df65f4000a709b5d |
Hashes for cloth_simulation_filter-1.1.5-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e22b07d0a258951a76204c44e55e78da81bec3612add43fc987ef30ee1b9564 |
|
MD5 | ecde27e20d913a9057bf3c73d834952d |
|
BLAKE2b-256 | da8608b0ee6dad82eeacab45837c53625a7c0fbb0dc3b6162d5099e8ace45ed3 |
Hashes for cloth_simulation_filter-1.1.5-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2e96d0bdc6bb655a05e05b5712b0e3e3555e295d23793adb96917ebe9491158 |
|
MD5 | 1a40494dba8fb6444d350664e629d186 |
|
BLAKE2b-256 | 901edd4b47c4c6a389fc73c3cb78a869ba09e333fd57a08395e5c5d8c7fbacb6 |
Hashes for cloth_simulation_filter-1.1.5-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dde1c51a0d77e11c7af8925b1e73bbf4b67ff5e5b1de386d9c9c0f63c9eb840e |
|
MD5 | 8c86ce4a1e0ec86abfccce8a5d60bc37 |
|
BLAKE2b-256 | 31094fea15e44fce9d0d853a5eeede599e1ffe5beb742881ef44385976e43309 |
Hashes for cloth_simulation_filter-1.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22acaa5d4e62762d9fa669432a9d35ae5357d24d1c9da6bc9231e91e7b530e40 |
|
MD5 | bd9d79501d48668313c9bfcda15b95b7 |
|
BLAKE2b-256 | 2e33f58002b50a934bffe0128d2eee517ba17ac0350b54330108dfd87b01c926 |
Hashes for cloth_simulation_filter-1.1.5-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d5aab60e6a48c964e06f3064b87f41a1cf2f2ec2b8fbb029dba36204aa0150a |
|
MD5 | 0bfa021da05b9aab364847b2bc4d3393 |
|
BLAKE2b-256 | af92926dc42d0fd3ad11dd800558a6eb36179cf0bc8a6c71a0e130befbbcd39d |
Hashes for cloth_simulation_filter-1.1.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5783990f3eade6b67aedd97f6a51d25ec175f4bdd1e639f2b406f747a5c274a3 |
|
MD5 | 2bac940cc6bd94be6434cde734ff5328 |
|
BLAKE2b-256 | a39a156a834f6a5cab9876050042f9a0bf4439ed38092c5dd13b5e3f4dc37b0e |