1 Reply Latest reply on Aug 28, 2018 12:34 AM by MartyG

    i have a problem in pointscloud_visualization

    guantong

      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?