kaolin.render.camera.ExtrinsicsRep¶
API¶
- class kaolin.render.camera.ExtrinsicsRep(params, dtype=None, device=None, requires_grad=False)¶
Bases:
ABC
An abstract class for representing CameraExtrinsics representation backends. This class keeps the separation between the parameter representation space and the associated rigid transformation (usually represented as a view matrix) separate.
Different representations are tuned to varied use cases: speed, differentiability w.r.t rigid transformations space, and so forth.
- Parameters
params (torch.Tensor) –
dtype (torch.dtype) –
device (Union[torch.device, str]) –
requires_grad (bool) –
- abstract classmethod convert_from_mat(mat)¶
Converts a view-matrix to the underlying representation form of shape (C, K) where K is the number of representation parameters.
- abstract convert_to_mat()¶
Converts the underlying representation to view-matrix form of shape (C, 4, 4)
- Return type
- classmethod from_mat(mat, dtype=None, device=None, requires_grad=False)¶
Constructs backend from given (C, 4, 4) view matrix.
- abstract classmethod param_idx(param)¶
Returns the indices of elements in the ‘self.params’ field of instances of this class, which are belong under the ExtrinsicsParamsDefEnum param argument. i.e: For ExtrinsicsParamsDefEnum.R, a 4x4 matrix representation will return the 9 indices of the camera axes R component.
- Parameters
param (ExtrinsicsParamsDefEnum) –
- to(*args, **kwargs)¶
Cast to a different device / dtype