- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
from pyntcloud import PyntCloud
mesh= PyntCloud.from_file("points.ply")# 加载点云网格
mesh.plot(mesh=True, backend="threejs")# 可视化点云网格
# 随机采样将网格转换为点云
cloud = mesh.get_sample("mesh_random", n=100000, rgb=True, normals=True, as_PyntCloud=True)
# 请注意,我们传递了normals = True参数,所以现在我们的点云具有每个点的正常值。
# 引入pandas,因为PyntCloud.points是一个pandas.DataFrame,我们可以利用pandas的内置可视化选项
cloud.points[['nx','ny','nz']].plot(kind="hist", subplots=True)
# 将采样后得点云可视化
cloud.plot()
KeyError: "['nx' 'ny' 'nz'] not in index"
How to correct it?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Someone else who had a 'KeyError ... not in index' error in Pyntcloud used a "DataFrame" to define the points that the KeyError had problems with.
https://github.com/daavoo/pyntcloud/issues/155 Add colour to point? · Issue # 155 · daavoo/pyntcloud · GitHub
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Someone else who had a 'KeyError ... not in index' error in Pyntcloud used a "DataFrame" to define the points that the KeyError had problems with.
https://github.com/daavoo/pyntcloud/issues/155 Add colour to point? · Issue # 155 · daavoo/pyntcloud · GitHub
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page