Copyright (C) 2011-2018 HERE Europe B.V.
The Point Processing Toolkit (pptk) is a Python package for visualizing and processing 2-d/3-d point clouds.
At present, pptk consists of the following features.
- A 3-d point cloud viewer that
- accepts any 3-column numpy array as input,
- renders tens of millions of points interactively using an octree-based level of detail mechanism,
- supports point selection for inspecting and annotating point data.
- A fully parallelized point k-d tree that supports k-nearest neighbor queries and r-near range queries (both build and queries have been parallelized).
- A normal estimation routine based on principal component analysis of point cloud neighborhoods.
The screenshots above show various point datasets visualized using pptk.
The bildstein1 Lidar point cloud from Semantic3D (left),
Beijing GPS trajectories from Geolife (middle left),
DistrictofColumbia.geojson 2-d polygons from US building footprints (middle right),
and a Mobius strip (right).
For details, see the tutorials.
Unless otherwise noted in LICENSE files for specific files or directories,
the LICENSE in the root applies to all content in this repository.
One can either install pptk directly from PyPI
>> pip install pptk
or from the .whl file that results from building pptk from source.
>> pip install <.whl file>
or from the .whl file at release page
- linux
>> wget https://github.com/ChadLin9596/pptk/releases/download/v0.1.1/pptk-0.1.1-cp39-none-manylinux_2_35_x86_64.whl
>> pip install pptk-0.1.1-cp39-none-manylinux_2_35_x86_64.whl
>> pip install "numpy<2.0.0"
- mac
>> wget https://github.com/ChadLin9596/pptk/releases/download/v0.1.1/pptk-0.1.1-cp39-none-macosx_15_0_x86_64.whl
>> pip intall pptk-0.1.1-cp39-none-macosx_15_0_x86_64.whl
In Python, generate 100 random 3-d points.
>> import numpy as np
>> x = np.random.rand(100, 3)
Visualize.
>> import pptk
>> v = pptk.viewer(x)
Set point size to 0.01.
>> v.set(point_size=0.01)
For more advanced examples, see tutorials.
We provide CMake scripts for automating most of the build process, but ask the user to manually prepare dependencies and record their paths in the following CMake cache variables.
Numpy_INCLUDE_DIRPYTHON_INCLUDE_DIRPYTHON_LIBRARYEigen_INCLUDE_DIRTBB_INCLUDE_DIRTBB_tbb_LIBRARYTBB_tbb_RUNTIMETBB_tbbmalloc_LIBRARYTBB_tbbmalloc_RUNTIMEQt5_DIR
To set these variables, either use one of CMake's GUIs (ccmake or cmake-gui), or provide an initial CMakeCache.txt in the target build folder (for examples of initial cache files, see the CMakeCache..txt files)
Listed are versions of libraries used to develop pptk, though earlier versions of these libraries may also work.
- Create an empty build folder
>> mkdir <build_folder>
-
Create an initial CMakeCache.txt under <build_folder> and use it to provide values for the CMake cache variables listed above. (e.g. see CMakeCache.win.txt)
-
Type the following...
>> cd <build_folder>
>> cmake -G "NMake Makefiles" <source_folder>
>> nmake
>> python setup.py bdist_wheel
>> pip install dist\<.whl file>
- Create a python environment through Anaconda
>> conda create --name pptk python=3.9 -y
>> conda activate pptk
>> pip install "numpy<2.0.0"
>> pip install packaging
- Download
- pre-built tbb v2020.3 from github
>> cd <wherever you like>
>> wget https://github.com/uxlfoundation/oneTBB/releases/download/v2020.3/tbb-2020.3-lin.tgz
>> tar -xvzf tbb-2020.3-lin.tgz
- QT 5.6.1
>> cd <wherever you like>
>> wget https://download.qt.io/new_archive/qt/5.6/5.6.1/qt-opensource-linux-x64-5.6.1.run
>> chmod +x qt-opensource-linux-x64-5.6.1.run
>> ./qt-opensource-linux-x64-5.6.1.run
- Eigen 3.2.9
>> cd <wherever you like>
>> wget https://gitlab.com/libeigen/eigen/-/archive/3.2.9/eigen-3.2.9.zip
>> unzip eigen-3.2.9.zip
- patchelf 0.18.0
>> cd <wherever you like>
>> mkdir patchelf-0.18.0-x86_64
>> wget https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-x86_64.tar.gz
>> tar -xvzf patchelf-0.18.0-x86_64.tar.gz -C patchelf-0.18.0-x86_64
- Create an empty build folder
>> mkdir <build_folder>
-
Create an initial CMakeCache.txt under <build_folder> and use it to provide values for the CMake cache variables listed above. (e.g. see CMakeCache.linux.txt)
-
Type the following...
>> cd <build_folder>
>> cmake -G "Unix Makefiles" <source_folder>
>> make
>> python setup.py bdist_wheel
>> pip install dist\<.whl file>
testing on Apple M2
- Create a python environment through Anaconda
>> CONDA_SUBDIR=osx-64 conda create --name pptk.x86_64 python=3.9 -y
>> conda activate pptk.x86_64
>> pip install "numpy<2.0.0"
>> pip install packaging
- Download & Install
>> brew install qt@5
>> brew install gcc@11
>> brew install binutils
- pre-built tbb v2020.3 from github
>> cd <wherever you like>
>> wget https://github.com/uxlfoundation/oneTBB/releases/download/v2020.3/tbb-2020.3-mac.tgz
>> tar -xvzf tbb-2020.3-mac.tgz
- Eigen 3.2.9
>> cd <wherever you like>
>> wget https://gitlab.com/libeigen/eigen/-/archive/3.2.9/eigen-3.2.9.zip
>> unzip eigen-3.2.9.zip
- Create an empty build folder
>> mkdir <build_folder>
-
Create an initial CMakeCache.txt under <build_folder> and use it to provide values for the CMake cache variables listed above. (e.g. see CMakeCache.mac.txt)
-
Type the following...
>> cd <build_folder>
>> cmake -G "Unix Makefiles" <source_folder>
>> make
>> python setup.py bdist_wheel
>> pip install dist\<.whl file>
- v0.1.1
- merge 3dsman pull request
- support pptk.viewer.set(window_size=[width, height])
- support pptk.viewer.set(vFOV=float)
- fix flickerring issue with animation capture
- merge 3dsman pull request
