Skip to content

Kernel density estimation algorithm on GPU for point cloud visualization.

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

 

History

75 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PointCloud-Visualization-Tool

Image 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).

Projects built based on this repo

MeTACAST

Features

  • pointcloud reader in .bin (single-precision floating-point in binary format) and .ply format
  • Kernal Density Estimation (KDE) of the point cloud density on GPU
  • Iso-surface construction with Marching-Cube algrithm
  • Color-coded based on point cloud density
  • Halo Visualization for pointcloud data

Install the project and Play the demos

Install the project

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 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 your generation functions, please refer to Data section in the following.

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

How to integrate into your project

  1. Place the folder Asset/PointCloud-Visualization-Tool in this repo to your Unity project Asset folder
  2. Drag the DataObject prefab Assets\PointCloud-Visualization-Tool\Prefab\DataObject.prefab into your scene.

Data

  • The repo supports to read .bin and .ply data files. Refer to (TODO) 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.
  • To add data files, you just need to place it to Assets\PointCloud-Visualization-Tool\data\data and project identifies and updates the file automatically in runtime.
  • Write your own function to generate the dataset with an output of Vector3[] in Assets\PointCloud-Visualization-Tool\script\dataprocessing\DataGenerator.cs. Your new function will appear in inspector automatically. Be sure to enable Use_Function_Defined_Yourself checkbox to select your function in runtime.

Thanks

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