Comments (2)
@Szy-Young , Thanks a lot, I'll try it.
from ogc.
Hi @amiltonwong
You can use the following code for a quick visualization with Open3D:
# pc: (N, 3) numpy array
# segm: (N,) numpy array
import open3d as o3d
from utils.visual_util import build_pointcloud
pcds = [build_pointcloud(pc, segm)]
o3d.visualization.draw_geometries(pcds)
For the visualization effects in our paper and video demo, you can first use the following code to convert point clouds into meshes of spheres:
# pc: (N, 3) numpy array
# segm: (N,) numpy array
import open3d as o3d
def pc_segm_to_sphere(pc, segm=None, radius = 0.01, resolution=10, with_background=False, default_color=COLORGRAY2):
"""
Visualize point cloud as mesh balls. The color denotes hard segmentation.
:param pc: (N, 3)
:param segm: (N,)
"""
assert pc.shape[1] == 3 and len(pc.shape) == 2, f"Point cloud is of size {pc.shape} and cannot be displayed!"
n_point = pc.shape[0]
if with_background:
colors = np.concatenate((COLOR20[-1:], COLOR20[:-1]), axis=0)
else:
colors = COLOR20
meshes = []
for pid in range(n_point):
mesh = o3d.geometry.TriangleMesh.create_sphere(radius=radius, resolution=resolution)
if segm is not None:
mesh.paint_uniform_color(colors[segm[pid] % colors.shape[0]] / 255.)
else:
mesh.paint_uniform_color(default_color / 255.)
mesh.translate(pc[pid])
meshes.append(mesh)
# Merge
mesh = meshes[0]
for i in range(1, len(meshes)):
mesh += meshes[i]
return mesh
mesh = pc_segm_to_sphere(pc, segm)
save_file = ...
o3d.io.write_triangle_mesh(save_file, mesh)
Then you can render the mesh models with softwares like KeyShot (our choice), Blender, etc.
from ogc.
Related Issues (10)
- KITTI SF: Downsample missing files HOT 2
- Question about the ground removal on SemanticKITTI and KITTIdet. HOT 2
- How long will this model take to finish one task? HOT 1
- Questions about correct order and paths when running the full pipeline HOT 5
- 您好这个代码能对大场景的点云适用吗,比如说S3DIS,多伦多3D HOT 2
- geometric constraints HOT 2
- On SemanticKITTI object segmentation HOT 2
- request for checkpoints on SemanticKITTI
- SemanticKITTI Training HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ogc.