Pinhole
⚠️ This type is unstable and may change significantly in a way that the data won't be backwards compatible. Camera perspective projection (a.k.a. intrinsics).
Fields fields
Required required
image_from_camera
:PinholeProjection
Recommended recommended
resolution
:Resolution
Optional optional
camera_xyz
:ViewCoordinates
image_plane_distance
:ImagePlaneDistance
Can be shown in can-be-shown-in
API reference links api-reference-links
Examples examples
Simple pinhole camera simple-pinhole-camera
"""Log a pinhole and a random image."""
import numpy as np
import rerun as rr
rr.init("rerun_example_pinhole", spawn=True)
rng = np.random.default_rng(12345)
image = rng.uniform(0, 255, size=[3, 3, 3])
rr.log("world/image", rr.Pinhole(focal_length=3, width=3, height=3))
rr.log("world/image", rr.Image(image))
Perspective pinhole camera perspective-pinhole-camera
"""Logs a point cloud and a perspective camera looking at it."""
import rerun as rr
rr.init("rerun_example_pinhole_perspective", spawn=True)
rr.log(
"world/cam",
rr.Pinhole(fov_y=0.7853982, aspect_ratio=1.7777778, camera_xyz=rr.ViewCoordinates.RUB, image_plane_distance=0.1),
)
rr.log("world/points", rr.Points3D([(0.0, 0.0, -0.5), (0.1, 0.1, -0.5), (-0.1, -0.1, -0.5)], radii=0.025))