Skip to content Skip to sidebar Skip to footer

How To Create A Open3d.visualization.selectionpolygonvolume Object Without Loading A Json Filel

I am trying to crop a Open3d pointcloud using a SelectionPolygonVolume object. On Open3d's github tutorial, the SelectionPolygonVolume is created by calling vol = o3d.visualizatio

Solution 1:

This isn't very clear from the docs, but you need to convert the numpy array to type Vector3dVector first.

bounding_polygon = np.array([ 
            [ 2.6509309513852526, 0.0, 1.6834473132326844 ],
                                ...
            [ 2.6579576128816544, 0.0, 1.6819127849749496 ]]).astype("float64")

vol = o3d.visualization.SelectionPolygonVolume()

vol.bounding_polygon = o3d.utility.Vector3dVector(bounding_polygon)

Post a Comment for "How To Create A Open3d.visualization.selectionpolygonvolume Object Without Loading A Json Filel"