Skip to content

Kernel density estimation algorithm on GPU for point cloud visualization. ply/pcd/txt/bin are supported to import/export.

License

Notifications You must be signed in to change notification settings

LixiangZhao98/PointCloud-Visualization-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

PointCloud-Visualization-Tool

Kernel density estimation algorithm for point cloud visualization in Unity3D.
Any pull requests and issues are welcome. If you have any questions about the project or the data, please feel free to email me (Lixiang.Zhao17@student.xjtlu.edu.cn).

Features

  • Import/export and visualize the point cloud data in bin/ply/pcd/txt format
  • Define your point cloud data with mathematical equation easily
  • Kernal Density Estimation (KDE) of the point cloud density on GPU
  • Iso-surface construction with Marching-Cube algorithm
  • Color-coded based on point cloud density
  • Halo Visualization for point cloud data

Requirement

Unity version >=2019

Version Update Info

  • 2025/1/12: Fix bug of KDE computation with shared group memory (the program will be broke on some machine)
  • 2025/1/16: Enable import/export pcd/ply/txt files

How to use

Install the project

  • Clone the repo using command following, or download the archive directly
git clone git@github.com:LixiangZhao98/PointCloud-Visualization-Tool.git
  • Open the project using Unity (versions >= 2019). If you are new to Unity, refer to sec.1-4 in tutorial for Unity setup and sec.6 to open a project.
  • Drag the DataObject prefab Assets\PointCloud-Visualization-Tool\Prefab\DataObject.prefab into your scene.

Demo1: Read and visualize data

  • Run the demo in Assets/PointCloud-Visualization-Tool/Scenes/PointCloudVisualization.unity
  • To switch the dataset, click the DataObject in hierarchy and change variable datasets in project in the inspector window.
  • Enable Use_Function_Defined_Yourself to use the function defined by yourself to generate the data.
  • To add new data files or write mathematical equations of data, please refer to the Data section in the following. Image

Demo2: Kernel Density Estimation

  • Run the demo in Assets/PointCloud-Visualization-Tool/Scenes/KernelDensityEstimation.unity
  • The density estimation results are shown by iso-surface reconstruction (MarchingCube) and color encoding from blue (low density) to red (high density).
  • To change MarchingCube threshold, unfold the DataObject in hierarchy, click MarchingCube and adjust the variable MC Threshold in the inspector window. Image

Demo3: Halo visualization

  • Run the demo in Assets/PointCloud-Visualization-Tool/Scenes/Halo.unity
  • This is a replication of halo visualization (10.1109/TVCG.2009.138) in Unity
Image 1 Image 2

Data

  • The repo supports to read bin/ply/pcd/txt data files. To add data files, you just need to place it to Assets\PointCloud-Visualization-Tool\data\data, and the project identifies the file automatically.
  • To write your own mathematical equation of data, you need (1) go to Assets\PointCloud-Visualization-Tool\script\dataprocessing\DataGenerator.cs, (2) add a new function with an output type of Vector3[] (for instance, static public CubicArea(){}), (3) enable Use_Function_Defined_Yourself and then you can find CubicArea in Drop-down box Customized Dataset.
  • Refer to Pointcloud Dataset for more data.
  • If you want to use the .bin data outside this project, first you need to convert them to single-precision floating-point format. Three single-precision floats consist a 3D coordinate of one point.

Projects built based on this repo

MeTACAST

Thanks

Many thanks to the authors of open-source repository: unity-marching-cubes-gpu

About

Kernel density estimation algorithm on GPU for point cloud visualization. ply/pcd/txt/bin are supported to import/export.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published