[英]Unable to find functionality to add specific colour to PPTK pointcloud
I have a segmented point cloud, with labels corresponding to each set of coordinates.我有一个分段点云,标签对应于每组坐标。 I would like to visualize the point cloud in pptk such that the points correspond to certain colours associated with their labels.
我想在 pptk 中可视化点云,以便点对应于与其标签关联的某些颜色。 I couldn't find any efficient way to make this happen - the best I found was this https://heremaps.github.io/pptk/tutorials/viewer/semantic3d.html but it doesn't quite cut it because it seems like a different type of file format would have to be made.
我找不到任何有效的方法来实现这一点 - 我发现的最好的是这个https://hermaps.github.io/pptk/tutorials/viewer/semantic3d.html但它并没有完全削减它,因为它看起来像必须制作不同类型的文件格式。 I would appreciate any help.
我将不胜感激任何帮助。
if I understand you correctly you want to colour a point cloud according to each points class.如果我理解正确,您想根据每个点类为点云着色。 In case of 100 points and 5 classes this should do the trick:
在 100 分和 5 个班级的情况下,这应该可以解决问题:
xyz = np.random.rand(100, 3) # points [N,3]
xyz_class = np.random.randint(0, 5, 100) # per point class [N]
rgb = np.random.rand(5, 3) # 5 colours
xyz_rgb = rgb[xyz_class, :]
pptk.viewer(xyz, xyz_rgb)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.