eg3d icon indicating copy to clipboard operation
eg3d copied to clipboard

Why multiple `1.414` in `FOV_to_intrinsic`?

Open LeoXing1996 opened this issue 1 year ago • 1 comments

The formulation of calculating focal from FOV is

focal = 1. / np.tan(0.5 * fov * np.pi/180.)

However, in FOV_to_intrinsic, 1.414 is multiplied at last.

https://github.com/NVlabs/eg3d/blob/493076071bc400be3289dd6725ef1eef0a552a9d/eg3d/camera_utils.py#L140-L149

Can anyone explain this? Thanks a lot.

LeoXing1996 avatar Nov 15 '22 11:11 LeoXing1996

I'm wondering about this as well. 1.414 is approximately sqrt(2), which is the diagonal of a unit square. Perhaps they are normalizing by the diagonal here? But their doc (https://github.com/NVlabs/eg3d/blob/main/docs/training_guide.md ) says the intrinsics are normalized by the height and the width instead of the diagonal, so this might be a bug?

RolandGao avatar Jul 17 '23 02:07 RolandGao