Given that I have:
* 3D object mesh (*.obj file)
* camera intrinsics
* camera/object pose
What I need is someway (in python) to get, for each pixel the corresponding 3D coordinates (if available) of the object model. Similarly to a depth map (https://en.wikipedia.org/wiki/Depth_map).
One could do this by looking for intersections between all triangles in the mesh and the line produced by each pixel and the projection matrices. And then get the intersections that are closer to the camera. But there must be faster and more elegant way. I've been looking at ray casting and the PyOpenGL framework but I am still not sure how to do it. Can anyone help?