irtk.transform.perspective¶
- irtk.transform.perspective(fov: float, aspect_ratio: float, near: float = 1e-06, far: float = 10000000.0) torch.Tensor ¶
Compute a perspective projection matrix.
- Parameters:
fov (float) – The field of view in degrees.
aspect_ratio (float) – The aspect ratio of the viewport.
near (float, optional) – The distance to the near clipping plane. Defaults to 1e-6.
far (float, optional) – The distance to the far clipping plane. Defaults to 1e7.
- Returns:
A 4x4 perspective projection matrix.
- Return type:
torch.Tensor