linefit ground segmentation algorithm Python bindings
Project description
linefit
linefit is a ground segmentation algorithm for 3D point clouds. This repo we setup a python binding for the original C++ code and push to pypi for easy installation through pip install linefit
.
Author: C++ code from Lorenz Wellhausen, nanobind by Qingwen Zhang.
Running on macOS, Windows and Linux, with Python Version >= 3.8.
0. Setup
Choose one of the following options to install the package (recommended to use Option A pip install linefit
):
Option A: Install from pypi pip install linefit
Option B: Clone this repo and run following to build:
cmake -B build && cmake --build build
pip install .
python3 -c 'import linefit; print("success")'
1. Run the example
After installation, you can run the example by, it will directly show a default effect of demo data.
python example.py
A window will pop up and show the ground segmentation result.
Parameter description
TL;DR: tune the sensor_height
to offset the ground point z to 0
. Others are optional for better performance. If you are interested in the details, please read the following.
Parameters are set in assets/config.toml
This algorithm works on the assumption that you known the height of the sensor above ground.
Therefore, you have to adjust the sensor_height
to your robot specifications, otherwise, it will not work.
The default parameters should work on the KITTI dataset.
Ground Condition
- sensor_height Sensor height above ground.
- max_dist_to_line maximum vertical distance of point to line to be considered ground.
- max_slope Maximum slope of a line.
- min_slope Minimum slope of a line.
- max_fit_error Maximum error a point is allowed to have in a line fit.
- max_start_height Maximum height difference between new point and estimated ground height to start a new line.
- long_threshold Distance after which the max_height condition is applied.
- max_height Maximum height difference between line points when they are farther apart than long_threshold.
- line_search_angle How far to search in angular direction to find a line. A higher angle helps fill "holes" in the ground segmentation.
Segmentation
- r_min Distance at which segmentation starts.
- r_max Distance at which segmentation ends.
- n_bins Number of radial bins.
- n_segments Number of angular segments.
Other
- n_threads Number of threads to use.
Acknowledgement & Citation
The original C++ code is from the repo we forked: lorenwel/linefit_ground_segmentation.
The original methods are described in the following paper:
@inproceedings{himmelsbach2010fast,
title={Fast segmentation of 3d point clouds for ground vehicles},
author={Himmelsbach, Michael and Hundelshausen, Felix V and Wuensche, H-J},
booktitle={Intelligent Vehicles Symposium (IV), 2010 IEEE},
pages={560--565},
year={2010},
organization={IEEE}
}
More python binding examples can be found in our other project:
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 Distributions
Built Distributions
Hashes for linefit-0.2.4-pp310-pypy310_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1131e6a32c8f22e4bfdea3d55277bd073f4d51855242ec0794de7bfdc81b5372 |
|
MD5 | 99c1618d256573627d3020d98a6135ab |
|
BLAKE2b-256 | 1649c982a9be03cdc023bedff89e4cc131e3dc0dba09adb8afe192abe99689f5 |
Hashes for linefit-0.2.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f84c0c27caa7ef1b22f8eb18480969c48869db1479088333ed6e4586179f8403 |
|
MD5 | f9430df57a92e8a2b866a7ece56ab5cb |
|
BLAKE2b-256 | af8fbe4c2bc5cdcbb4e63123fff57309de79f4494fcd29f8b87ddc3479727adb |
Hashes for linefit-0.2.4-pp310-pypy310_pp73-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 597d517e2d74797ab21909854078a83742e23529c435e6a9672170d6e5ba9821 |
|
MD5 | 77d5bdd2df4050f03eda682defca8a82 |
|
BLAKE2b-256 | 0fa7d98c9658d2ae3ab2f771ef77f9f087a54b17ddf19e65a27205646cc8ae2e |
Hashes for linefit-0.2.4-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99359350c817561fe3355c79871dd966b4a6ad1d3c54271596efb4420b128ad3 |
|
MD5 | 6769ff70f8b75c21683720af2b6f6f52 |
|
BLAKE2b-256 | 7b93570a86b5029467e03cf698c50dbdee3a191456d619375ac6c5e004429bf3 |
Hashes for linefit-0.2.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e2dbe792b3d841f97e5ae059f1ad116a5fb69ae18b68082c601caa5a41a9303 |
|
MD5 | daaf2a704c17a31684eaaccd7b318b8e |
|
BLAKE2b-256 | 9d7abc8e46677093f7370938f616472a644cca1cb7cdb0445d31d4cd3d5260cf |
Hashes for linefit-0.2.4-pp39-pypy39_pp73-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efaf775a2bf9f29314b133e7940bfd22c7682df334b5710a50c034a62f63cc75 |
|
MD5 | 98a7507ed1a178f53b4eb003680c5177 |
|
BLAKE2b-256 | 4a982f1ddb64dbcf3a865d66a464a21a123dc4bcdb2be594fbb0860429225d2c |
Hashes for linefit-0.2.4-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1c6d339aac625913b0a237dfe99b247aeb5216821b60614850efeec3d2ea83b |
|
MD5 | 1aad5d1c140463deabf9d132c0320fee |
|
BLAKE2b-256 | 12a6b8807f0e8454fdc8982d59b794377fde8a40cd8024168132456b78128f42 |
Hashes for linefit-0.2.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 653dedf225fd0cd814cb245963019d534a1e4cc71bd578b40e59381d595f65c8 |
|
MD5 | e8883b00ff8b1e73341c1d10d3bb89df |
|
BLAKE2b-256 | 46393318ef381d98cc7cc7922de50d9a6787fb6c8a86232456132065a2ca7c15 |
Hashes for linefit-0.2.4-pp38-pypy38_pp73-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13b1a0f00577fa3eef386fab30d9177eef14848bb45a393a1fe095a811b6e5ca |
|
MD5 | 09ed75445497adb4a447c7c02d822c10 |
|
BLAKE2b-256 | 9645913e9d9c1e9a42424d3ee9c408fb0bbd3f7504948331e111a12ff5f35472 |
Hashes for linefit-0.2.4-cp312-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83e910aba64da0235b93205fac51d7a929122f1d0407bf6be2a02d8ee9955d19 |
|
MD5 | a14438fdfb3c5d1e8dc6cf80394913f5 |
|
BLAKE2b-256 | dd491b3333f2019d95153fdf0da0502eeb26258a0c036f53e81901a6ac06ba9c |
Hashes for linefit-0.2.4-cp312-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6127a4bcf78489b4cac9eabf2c2d80bc1401e59101315eb9f5a35ae681185a42 |
|
MD5 | c1f8c0a91828590d6ed365857aeb0eaa |
|
BLAKE2b-256 | d556f0ab62eb26df474b952d4fef3cfc4a2f034a700559da05ea9792178dfc81 |
Hashes for linefit-0.2.4-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0d6d6f9f1a7f04803f0cc9a4e5486afb24fd251afab414b5096220feca992ce |
|
MD5 | a8d66c3f3fd111eda2e2da4d21290d3c |
|
BLAKE2b-256 | 05e007e13c21ae68e2203b6393a2d1caf31a37b69ca66fa870b1e3516c94374d |
Hashes for linefit-0.2.4-cp312-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7030ce86641706d8937b77f7b7c59bacdb1fe112bf3fdb21698b502ab8760b0 |
|
MD5 | 2104be3dc8e65f1ad4bc808ef1932881 |
|
BLAKE2b-256 | 3230464e86d59969ffdaec86edd3cb202dcd8fc70f469f3ab430a4899022654a |
Hashes for linefit-0.2.4-cp312-abi3-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f42b32012d338d4faa06936c971891b5c7c295a3fc97cd80ad7bb0ae1a98d86 |
|
MD5 | 0667a234f7026415c8f499ada90b54e5 |
|
BLAKE2b-256 | 4153997bed39b5a3077b8870d88b70e9d2d89420635d906d844134b30c0f7509 |
Hashes for linefit-0.2.4-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e864b292309ba5af4ce71064fd067949d877f5044d3356469ace73446814ccf |
|
MD5 | 0a08bc1a520c5c669fbd13cdff6188a6 |
|
BLAKE2b-256 | aca0e2e2ca717dec8f64b803281f402a25b56da4f404872081e7413deddfbe8a |
Hashes for linefit-0.2.4-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 689d13588218fa38a13520af5ca2c7721c6fc6d9a545b6bc7a8786c100dac9a0 |
|
MD5 | 9f6ddba51347a7a7921958f567a33d40 |
|
BLAKE2b-256 | d662ab0e188117ba7a372d89b4e9c3ac1d879b5e8c4de0797caaee2a20e9d47b |
Hashes for linefit-0.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e98e1b61881cd641f9ba4f06614975bf9fc387833846f2f481b44cf8cabcaa62 |
|
MD5 | e8ce8e7c04583fe8ea65a3f0924c00f1 |
|
BLAKE2b-256 | 7e243ef6f2a13de50c05e807023275ffbf2134f895dd5e3f155ade04b747ad64 |
Hashes for linefit-0.2.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41c7cb184aefb6289b55371a4443ca2184446eb999ee13388f14e2c9d8fc0123 |
|
MD5 | 8013a9b008cd751f286ba6039c59013c |
|
BLAKE2b-256 | 3a2047df98d05cca219c61d5082f6f5e5e98aee5ac318000cf9673e0987de6e3 |
Hashes for linefit-0.2.4-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8e31e59e2bd5898683e1e0e37c3298ac6e5dfa3f3a51c85836f92f490440d80 |
|
MD5 | 6b015678957f63cfea554e26af68d4ce |
|
BLAKE2b-256 | cd31e0bc6b93b0585be46493fb0d4b991fe5c2513b5d5328060312ecaf44bb93 |
Hashes for linefit-0.2.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d9f2ceff25c20184e8df8785f1a56e6e04b5525f24cbb2249d47e6b7a669537 |
|
MD5 | 7ac0c78bad566a8778246805f7377e88 |
|
BLAKE2b-256 | eadb742f54997c0ecfb6230764790f15b8a68ed3a99f9ba201451e6c6978ff4a |
Hashes for linefit-0.2.4-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d36d909ba6f65d0a0ba640a1384091964d8480e29d50e9aa68217d3ecf6b13fc |
|
MD5 | 0f498cd47b39466e0dc7da5fed15c689 |
|
BLAKE2b-256 | edad90df16a5594354913dae901455496009454a71ee1db60236f226bcc06860 |
Hashes for linefit-0.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d3e46070c15eb622d18fbf6c5bab470e6365bc0e2f8a6d419e9d2a2e803b696 |
|
MD5 | b716e39be78eea74dad812b116629757 |
|
BLAKE2b-256 | 1c5568dd25c5e991a325601b091f5377ed91aa9375cc928ca1e419a55eff49a0 |
Hashes for linefit-0.2.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 003b9658a5af9fcd2a6f006a0d72788a806f4a45ce2d29b275baf445024eb3de |
|
MD5 | 5491f5bdcb4746ec981e2fbeb68b8adf |
|
BLAKE2b-256 | 6831826fceb0846672abfad59913263f1f905920c830fba92f262cfb8365c85d |
Hashes for linefit-0.2.4-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a928dbc658b8da3d09d77a25b7be18d2a45a6a845cea66cb37a7629ce992da6 |
|
MD5 | 79b9eeac886a477527aa3ff097d6f965 |
|
BLAKE2b-256 | 94962e9ed23c1ee1d9f7668ec23fa2d19cba76a9b2c5ddbcf27ef88c664798ca |
Hashes for linefit-0.2.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54d24ae8b64e279a0c4821abed966c73d9f775bdb489c2820a6de0c26bb7748b |
|
MD5 | 31ca9347e59c09cf5146e6673ebfa160 |
|
BLAKE2b-256 | 4e7b86bc769da2fc0659481724cc0dac04c4909528049ab3484b35bc41fc6aff |
Hashes for linefit-0.2.4-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72730f8952fdda7a445f652abb25cc4b7e18236db857aa3ad7fb37fd07fad759 |
|
MD5 | 35c6b336b57e04f614ffd145a1de2ffc |
|
BLAKE2b-256 | 8f581ca52cbf4bac70c1339ba9e1ce9a26550d7da37fc07e1fbdd365a1f82a01 |
Hashes for linefit-0.2.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e444b0354307ee08c06545cddf838efa5351701431c04e159b7d6f00197bb5f |
|
MD5 | eda45186baa7fd4aded859f4ed1a31fe |
|
BLAKE2b-256 | 4f54f8f1e8e9d477ff465f3596daa08c7ccde2c2677a0702c96672ca4934fb76 |
Hashes for linefit-0.2.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecfda7109178ebcce2a8f2fb9d0d14a51aeb2f82622d8adb58ae8f408a92322e |
|
MD5 | 0baedde468c349dd96b191a5ae974da1 |
|
BLAKE2b-256 | 6a5bd79d9116f9c165d147025147be585d5dd312700871e30141da28f26ab875 |
Hashes for linefit-0.2.4-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8e305e3a6a687df93e3bdc3359daf98dcdd6991793de93ddfbffefded5ff830 |
|
MD5 | 1af0bfa6e9fedbc89e91e522149f277e |
|
BLAKE2b-256 | bf60ceb4ea030b47136fc1c33c902d4ba3a5434ee6b83ac09a8e5db75c3ee281 |
Hashes for linefit-0.2.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d077b3b94890261749a3ffde57168bd65032d5f8172e718dcf9b19d9bb776cad |
|
MD5 | 63aeb510f92ec6745831971a069d9c2b |
|
BLAKE2b-256 | 28a24cf1a8c62058b10de2eb6bac33cc2dd0aaffea32499f88d7c50c8f10a6e2 |
Hashes for linefit-0.2.4-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1822bcccc11a0b7aeb60246f3f7f5fd78f88a36acdabc8231440848d0c9e4a9 |
|
MD5 | 5cc26b01b5f890ee4675da23e2bdf1d6 |
|
BLAKE2b-256 | 2230f81a2abcd6824860fc873c518c39db18f0af4721018ed711cad788b7a3d9 |
Hashes for linefit-0.2.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b3af7769cd3472bf03c3787edd92e3a8f48c62b27a5d4aa1a6e29b5a63e694f |
|
MD5 | 8c266510e86638130b2779caa8b0f72b |
|
BLAKE2b-256 | 3345c4d0f7d9576c4f3ae8029344be667d3b633d2fd3c0c777d10f3771af3130 |
Hashes for linefit-0.2.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fadac8a6723609d1a3eb2e000fbfbb4f8d841eb958f18d935b34a321cb71b3f0 |
|
MD5 | 0c4c37f5fcecef048e0bbc4c71a6408d |
|
BLAKE2b-256 | 6b219391a23c96fd90f899654d2d5cb7ddddbe85b8bcc7d65713ca3a32073dfb |
Hashes for linefit-0.2.4-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acc7ee2a342c6b9c9a6ba304319a912613b98ce9b91cf07c02a135fc8b7c27a7 |
|
MD5 | 64420423b117de7559ed4bfabee6ebcf |
|
BLAKE2b-256 | d207049b61bfeb7a0db00d6980ee0577e19de63fece3333c5de01dae0448de5a |