ShichenLiu / SoftRas

Project page of paper "Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning"
MIT License
1.22k stars 156 forks source link

Explanation regarding camera parameters #110

Open Homagn opened 9 months ago

Homagn commented 9 months ago

I was trying out the deform demo, and my goal is to load custom silhouettes and transformation matrices of an object exported from perhaps a software like colmap and learn mesh from it. I got stuck trying to understand the 4 lines following this line in the code https://github.com/ShichenLiu/SoftRas/blob/b3150cf5ebaf0ee96276dbb18125add69b8f5cd1/examples/demo_deform.py#L87

Can someone please explain what are these variables with respect to the standard K[R|T] matrix (intrinsic [ extrinsic rotation | extrinsic translation] ) camera_distances = torch.from_numpy(cameras[:, 0]) elevations = torch.from_numpy(cameras[:, 1]) viewpoints = torch.from_numpy(cameras[:, 2])

Any help would be greatly appreciated ! Thanks