Skip to content

Commit e46e45b

Browse files
committed
fix typos, write about pinhole
1 parent af32910 commit e46e45b

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

docs/content/concepts/transforms.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ While entity path hierarchies work well for many cases, sometimes you need more
4343
In particular for anyone familiar with ROS we recommend using explicit transform frames as it allows you to model
4444
your data much closer to how it would be defined when using ROS' [tf2](https://wiki.ros.org/tf2) library.
4545

46-
In a nutshell, by explicitely specifying transform frames, you can decouple the spatial relationships from the entity hierarchy.
46+
In a nutshell, by explicitly specifying transform frames, you can decouple the spatial relationships from the entity hierarchy.
4747

4848
Instead of relying on the path relationships of entities, each entity is first associated with a named transform frame using
4949
the [`CoordinateFrame`](https://rerun.io/docs/reference/types/archetypes/coordinate_frame) archetype.
@@ -88,7 +88,7 @@ However, currently once an entity specified the relation between two frames, thi
8888

8989
Named transform frames have a few of advantages over entity path based hierarchies:
9090
* topology may change over time
91-
* which entity is associated with which frame may change over time (it can also be [overriden via blueprint](..concepts/visualizers-and-overrides.md))
91+
* which entity is associated with which frame may change over time (it can also be [overridden via blueprint](..concepts/visualizers-and-overrides.md))
9292
* several entities may be associated with the same frame without
9393
* frees up entity paths for semantic rather than geometric organization
9494

@@ -145,9 +145,10 @@ rr.log("robot/arm/gripper",
145145

146146
### Mixing explicit and implicit transform frames
147147

148-
We generally do not recommend mixing explicit and implicit transform frames, but doing so works seemlessly
149-
and can be useful in some situations:
148+
We generally do not recommend mixing explicit and implicit transform frames since it can get confusing,
149+
but doing so works seamlessly and can be useful in some situations.
150150

151+
Example:
151152
TODO: xlanguage please.
152153
```python
153154
rr.log("robot", rr.Transform3D(translation=[1, 0, 0]))
@@ -160,7 +161,35 @@ rr.log("gripper", rr.Points3D([0, 0, 0]), rr.CoordinateFrame("arm_frame"))
160161

161162
## Pinhole projections
162163

163-
TODO: Write a chapter on how pinhole projections are also spatial relationships in Rerun
164+
In Rerun, pinhole cameras are also treated as spatial relationships that define projections from 3D spaces to 2D subspaces.
165+
This unified approach allows the same transform system to handle both traditional 3D-to-3D transforms and 3D-to-2D projections seamlessly.
166+
167+
The [`Pinhole`](https://rerun.io/docs/reference/types/archetypes/pinhole) archetype defines this projection relationship through its intrinsic matrix (`image_from_camera`) and resolution.
168+
Both implicit & named coordinate frames are supported, exactly as on [`Transform3D`](https://rerun.io/docs/reference/types/archetypes/transform3d).
169+
170+
With the right setup, pinholes allow a bunch of powerful visualizations:
171+
* the pinhole glyph itself in 3D views
172+
* 2D in 3D: all 2D content that is part of the pinhole's transform subtree
173+
* 3D in 2D: if the pinhole is at the origin of the view, 3D objects can be projected through pinhole camera into the view.
174+
* Both the [nuscenes](https://rerun.io/examples/robotics/nuscenes_dataset) and [arkit](https://rerun.io/examples/spatial-computing/arkit_scenes) examples make use of this
175+
176+
### Example: 3D scene with 2D projections
177+
178+
Here's how to set up a 3D scene with pinhole cameras that create 2D projections:
179+
180+
In this example, the 3D objects (box and points) are automatically projected into the 2D camera view,
181+
demonstrating how Rerun's transform system handles the spatial relationship between 3D world coordinates
182+
and 2D image coordinates through pinhole projections.
183+
184+
snippet: archetypes/pinhole_projections
185+
186+
<picture data-inline-viewer="snippets/archetypes/pinhole_projections">
187+
<source media="(max-width: 480px)" srcset="https://static.rerun.io/pinhole-projections/ceb1b4124e111b5d0a786dd48909a1cbb52eca4c/480w.png">
188+
<source media="(max-width: 768px)" srcset="https://static.rerun.io/pinhole-projections/ceb1b4124e111b5d0a786dd48909a1cbb52eca4c/768w.png">
189+
<source media="(max-width: 1024px)" srcset="https://static.rerun.io/pinhole-projections/ceb1b4124e111b5d0a786dd48909a1cbb52eca4c/1024w.png">
190+
<source media="(max-width: 1200px)" srcset="https://static.rerun.io/pinhole-projections/ceb1b4124e111b5d0a786dd48909a1cbb52eca4c/1200w.png">
191+
<img src="https://static.rerun.io/pinhole-projections/ceb1b4124e111b5d0a786dd48909a1cbb52eca4c/full.png">
192+
</picture>
164193

165194

166195
## View coordinates
@@ -179,7 +208,7 @@ For 2D spaces and other entities, view coordinates currently have currently no e
179208

180209
## Poses & instancing
181210

182-
TODO: briefly explain poses, how they're relative to their entity's frame, how they can be used for instancing. Use a viewer embedd of the instancing example.
211+
TODO: briefly explain poses, how they're relative to their entity's frame, how they can be used for instancing. Use a viewer embed of the instancing example.
183212

184213
## Visualizing transforms
185214

0 commit comments

Comments
 (0)