4 Replies Latest reply on Oct 15, 2018 4:09 PM by MartyG

    Question about the point cloud acquired from the 'pc.calculate' in pyrealsense2


      I used the the code from the python wrapper to get point cloud:

      depth = frames.get_depth_frame()
      color = frames.get_color_frame()
      if not depth or not color:
      points = pc.calculate(depth)

      Then I transform the vertex to ndarray:

      vtx = np.asarray(points.get_vertices())
      vtx=np.array(vtx_list, 'float')

      And I try to plot the vertex as scatter points:

      fig = pyplot.figure()
      ax = Axes3D(fig)
      ax.scatter(vtx[:,0], vtx[:,1], vtx[:,2])

      I get following result:

      The graph does not look like it is supposed to be (It should not be just a few straight lines). Anyone knows what I am missing? Thanks MartyG