View my account

pyglet_pointcloud_viewer.py example an filtering

Comments

1 comment

  • Gappdietmar

    ok, I tried the following:

    I think this is the tight place to do the filtering:

     verts = np.asarray(points.get_vertices(2)).reshape(h, w, 3)
     texcoords = np.asarray(points.get_texture_coordinates(2))
     
    here's my problem, the pointcloud is a 2 dimensionale array, with a xyz array, how can I address this?
     
     mask_x_1 = verts[:,2,0] > -0.5
     mask_x_2 = verts[:,2,0] < 0.5

     # Y Axis
     mask_y_1 = verts[:,2,1] > 0
     mask_y_2 = verts[:,2,1] < 1
     
     
        mask_x = np.logical_and(mask_x_1, mask_x_2) 
        mask_y = np.logical_and(mask_y_1, mask_y_2) 
        #mask_z = np.logical_and(mask_z_1, mask_z_2) 
        #mask = np.logical_and(mask_x, mask_y, mask_z)
     
        mask = np.logical_and(mask_x, mask_y)
        inbox = verts[mask]
    0
    Comment actions Permalink

Please sign in to leave a comment.