v3d.PinholeCamera#
- class visu3d.PinholeCamera(**kwargs)[source]#
Bases:
visu3d.dc_arrays.camera_spec.CameraSpec
Simple camera model.
Camera conventions: In camera/pixel coordinates:
u == x == j == w (orientation: →)
v == y == i == h (orientation: ↓)
In camera frame coordinates:
(0, 0, 1) is at the center of the image
x: →
y: ↓
z is pointing forward
- resolution#
(h, w) resolution
- K: FloatArray['*shape 3 3']#
- classmethod from_focal(*, resolution: tuple[int, int], focal_in_px: float, xnp: Any | None = None) visu3d.dc_arrays.camera_spec.PinholeCamera [source]#
Camera factory.
- Parameters:
resolution – (h, w) resolution in pixel
focal_in_px – Focal length in pixel
xnp – numpy, jax.numpy or tf.experimental.numpy. Numpy module to use. Default to numpy.
- Returns:
A
PinholeCamera
instance with provided intrinsics.