cameras
cameras
#
Camera geometry over Pose: the frame every splat shares, and pixels as rays.
- World. Every pose lives in ARKit's right-handed, metric, y-up world, the one every session relocalized into a scene's world map shares.
- Pose. A
Poseis a camera-to-world transform in the OpenGL convention nerfstudio reads: the camera looks down its own-zwithyup, which is ARKit's camera transform as captured, socamera_to_worldis the quaternion's matrix beside the position. - Pixels. A pose's intrinsics are expressed at its reference size;
at_sizere-expresses them for a resized photograph,raysturns pixel centres into world-space directions, andto_worldplaces camera-space points.
at_size(pose, width, height)
#
pose with its intrinsics expressed at width×height.
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in capturegraph-lib/capturegraph/recipes/splats/cameras.py
camera_to_world(pose)
#
The 4×4 OpenGL camera-to-world matrix of pose.
Source code in capturegraph-lib/capturegraph/recipes/splats/cameras.py
intrinsics(pose)
#
The pinhole intrinsics pose carries, or None when the device delivered none.
Source code in capturegraph-lib/capturegraph/recipes/splats/cameras.py
position(pose)
#
The camera centre of pose in world coordinates.
quaternion_matrix(quaternion_w, quaternion_x, quaternion_y, quaternion_z)
#
The rotation matrix of a (possibly unnormalized) quaternion.
Source code in capturegraph-lib/capturegraph/recipes/splats/cameras.py
rays(pose, columns, rows)
#
Unit world-space directions through the pixel centres (columns, rows) of pose.
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in capturegraph-lib/capturegraph/recipes/splats/cameras.py
to_world(pose, camera_points)
#
OpenCV camera-space points (x right, y down, z forward) in the world.