warp icon indicating copy to clipboard operation
warp copied to clipboard

Segmentation camera using warp

Open mihirk284 opened this issue 2 years ago • 2 comments

Thank you for this software package.

I am using this software to generate depth images of an environment using the mesh_query_ray function provided in the package.

What would be a recommended way to simulate a segmentation camera using warp? In this case the ray-casting is performed given a single mesh index but different objects (i.e., previously different meshes, that are now aggregated into a single mesh) are not separately identifiable in this representation. What would be a good way to implement a segmentation camera such that a label is also available for the mesh face intersected by a ray using this query?

Any help or guidance would be greatly appreciated.

Thanks

mihirk284 avatar Nov 21 '23 15:11 mihirk284

Hi @mihirk284,

Perhaps you could create another Warp array that stores for every face in the aggregated mesh the corresponding ID of the object meshes. That way you can retrieve the object ID given the face index returned by wp.mesh_query_ray.

eric-heiden avatar Dec 05 '23 19:12 eric-heiden

Thank you for your answer. This is what I am planning to do now. Just curious, is there a computationally and memory efficient way that you would recommend map a set of faces to individual object IDs? It would be a many-to-one mapping in this case, but does warp provide an efficient way to perform this query in the kernels where I perform the ray-casting?

mihirk284 avatar Jan 24 '24 13:01 mihirk284