Pinhole represents a pinhole, or perspective, camera model. It's used to project data from a 3D space to a 2D space, or to situate 2D content inside a 3D view. Read more about transforms that relate between spaces here.

Components and APIs

Primary component: pinhole

Python APIs: log_pinhole

Rust API: Pinhole

Simple Example

"""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_pinhole("world/image", focal_length_px=3, width=3, height=3) rr.log_image("world/image", image=image)