简体   繁体   English

在简单的pptk示例中未显示的点

[英]Points not showing in simple pptk example

I have just started using pptk the open source point cloud viewer. 我刚刚开始使用pptk开源点云查看器。 It worked perfectly when I used the example of displaying the bildstein_station1_xyz_intensity_rgb.txt as per the tutorial so I do not think there can be much wrong but when I try to display 100 random points the viewer opens and says it is displaying the points but I can see nothing. 当我使用按照教程显示bildstein_station1_xyz_intensity_rgb.txt的示例时,它工作得很好,所以我认为不会有什么大错,但是当我尝试显示100个随机点时,查看器打开并说它正在显示点,但是我可以什么也看不见。 The code is that given in the tutorial. 该代码是本教程中给出的代码。

import pptk
import numpy as np

xyz = pptk.rand(10, 3)

v = pptk.viewer(xyz)
v.set(point_size=0.5)

I have tried changing the point_size parameter without success. 我尝试更改point_size参数没有成功。 Has anybody used this library and have any idea what I am doing wrong 有没有人使用过这个库并且知道我在做什么错

Finally got it to work. 终于让它工作了。 You need to provide the colour attributes of the points in an attributes statement. 您需要在属性声明中提供点的颜色属性。 As the rgb colours seem to be specified as numbers in range 0 to 1 if you pass the same xyz points array ( or use a numpy array) to the attributes you get a cube of different coloured dots ie there no longer seems to be a default colour value that is displayed 因为如果将相同的xyz点数组(或使用numpy数组)传递给属性,则rgb颜色似乎被指定为0到1范围内的数字,因此您会得到不同色点的多维数据集,即似乎不再是默认值显示的颜色值

import pptk
import numpy as np

 xyz = pptk.rand(10, 3)

 v = pptk.viewer(xyz)
 v.attributes(xyz)
 v.set(point_size=0.01)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM