kaolin.render.camera.ExtrinsicsRep¶
API¶
- class kaolin.render.camera.ExtrinsicsRep(params: Tensor, dtype: Optional[dtype] = None, device: Optional[Union[device, str]] = None, requires_grad: bool = 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.
- abstract classmethod convert_from_mat(mat: Tensor) Tensor ¶
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() Tensor ¶
Converts the underlying representation to view-matrix form of shape (C, 4, 4)
- classmethod from_mat(mat: Tensor, dtype: Optional[dtype] = None, device: Optional[Union[device, str]] = None, requires_grad: bool = False)¶
Constructs backend from given (C, 4, 4) view matrix.
- abstract classmethod param_idx(param: ExtrinsicsParamsDefEnum)¶
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.
- to(*args, **kwargs)¶
Cast to a different device / dtype