Segmentation camera using warp
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
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.
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?