Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e6efda1

Browse files
committed
fmt
1 parent a16aa66 commit e6efda1

File tree

1 file changed

+66
-66
lines changed

1 file changed

+66
-66
lines changed

rerun_py/rerun_sdk/rerun/archetypes/pinhole_ext.py

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import math
44
from typing import TYPE_CHECKING, Any, cast
55

6-
from ..datatypes import Mat3x3Like, Vec2D, Vec2DLike, ViewCoordinatesLike, Rgba32Like, Float32Like
6+
from ..datatypes import Float32Like, Mat3x3Like, Rgba32Like, Vec2D, Vec2DLike, ViewCoordinatesLike
77
from ..error_utils import _send_warning_or_raise, catch_and_log_exceptions
88

99
if TYPE_CHECKING:
@@ -30,71 +30,71 @@ def __init__(
3030
line_width: Float32Like | None = None,
3131
) -> None:
3232
"""
33-
Create a new instance of the Pinhole archetype.
34-
35-
Parameters
36-
----------
37-
image_from_camera:
38-
Row-major intrinsics matrix for projecting from camera space to image space.
39-
The first two axes are X=Right and Y=Down, respectively.
40-
Projection is done along the positive third (Z=Forward) axis.
41-
This can be specified _instead_ of `focal_length` and `principal_point`.
42-
resolution:
43-
Pixel resolution (usually integers) of child image space. Width and height.
44-
`image_from_camera` projects onto the space spanned by `(0,0)` and `resolution - 1`.
45-
camera_xyz:
46-
Sets the view coordinates for the camera.
47-
48-
All common values are available as constants on the `components.ViewCoordinates` class.
49-
50-
The default is `ViewCoordinates.RDF`, i.e. X=Right, Y=Down, Z=Forward, and this is also the recommended setting.
51-
This means that the camera frustum will point along the positive Z axis of the parent space,
52-
and the cameras "up" direction will be along the negative Y axis of the parent space.
53-
54-
The camera frustum will point whichever axis is set to `F` (or the opposite of `B`).
55-
When logging a depth image under this entity, this is the direction the point cloud will be projected.
56-
With `RDF`, the default forward is +Z.
57-
58-
The frustum's "up" direction will be whichever axis is set to `U` (or the opposite of `D`).
59-
This will match the negative Y direction of pixel space (all images are assumed to have xyz=RDF).
60-
With `RDF`, the default is up is -Y.
61-
62-
The frustum's "right" direction will be whichever axis is set to `R` (or the opposite of `L`).
63-
This will match the positive X direction of pixel space (all images are assumed to have xyz=RDF).
64-
With `RDF`, the default right is +x.
65-
66-
Other common formats are `RUB` (X=Right, Y=Up, Z=Back) and `FLU` (X=Forward, Y=Left, Z=Up).
67-
68-
NOTE: setting this to something else than `RDF` (the default) will change the orientation of the camera frustum,
69-
and make the pinhole matrix not match up with the coordinate system of the pinhole entity.
70-
71-
The pinhole matrix (the `image_from_camera` argument) always project along the third (Z) axis,
72-
but will be re-oriented to project along the forward axis of the `camera_xyz` argument.
73-
focal_length:
74-
The focal length of the camera in pixels.
75-
This is the diagonal of the projection matrix.
76-
Set one value for symmetric cameras, or two values (X=Right, Y=Down) for anamorphic cameras.
77-
principal_point:
78-
The center of the camera in pixels.
79-
The default is half the width and height.
80-
This is the last column of the projection matrix.
81-
Expects two values along the dimensions Right and Down
82-
width:
83-
Width of the image in pixels.
84-
height:
85-
Height of the image in pixels.
86-
fov_y:
87-
Vertical field of view in radians.
88-
aspect_ratio
89-
Aspect ratio (width/height).
90-
image_plane_distance:
91-
The distance from the camera origin to the image plane when the projection is shown in a 3D viewer.
92-
This is only used for visualization purposes, and does not affect the projection itself.
93-
color:
94-
Color of the camera frustum lines in the 3D viewer.
95-
line_width:
96-
Width of the camera frustum lines in the 3D viewer.
97-
Ū
33+
Create a new instance of the Pinhole archetype.
34+
35+
Parameters
36+
----------
37+
image_from_camera:
38+
Row-major intrinsics matrix for projecting from camera space to image space.
39+
The first two axes are X=Right and Y=Down, respectively.
40+
Projection is done along the positive third (Z=Forward) axis.
41+
This can be specified _instead_ of `focal_length` and `principal_point`.
42+
resolution:
43+
Pixel resolution (usually integers) of child image space. Width and height.
44+
`image_from_camera` projects onto the space spanned by `(0,0)` and `resolution - 1`.
45+
camera_xyz:
46+
Sets the view coordinates for the camera.
47+
48+
All common values are available as constants on the `components.ViewCoordinates` class.
49+
50+
The default is `ViewCoordinates.RDF`, i.e. X=Right, Y=Down, Z=Forward, and this is also the recommended setting.
51+
This means that the camera frustum will point along the positive Z axis of the parent space,
52+
and the cameras "up" direction will be along the negative Y axis of the parent space.
53+
54+
The camera frustum will point whichever axis is set to `F` (or the opposite of `B`).
55+
When logging a depth image under this entity, this is the direction the point cloud will be projected.
56+
With `RDF`, the default forward is +Z.
57+
58+
The frustum's "up" direction will be whichever axis is set to `U` (or the opposite of `D`).
59+
This will match the negative Y direction of pixel space (all images are assumed to have xyz=RDF).
60+
With `RDF`, the default is up is -Y.
61+
62+
The frustum's "right" direction will be whichever axis is set to `R` (or the opposite of `L`).
63+
This will match the positive X direction of pixel space (all images are assumed to have xyz=RDF).
64+
With `RDF`, the default right is +x.
65+
66+
Other common formats are `RUB` (X=Right, Y=Up, Z=Back) and `FLU` (X=Forward, Y=Left, Z=Up).
67+
68+
NOTE: setting this to something else than `RDF` (the default) will change the orientation of the camera frustum,
69+
and make the pinhole matrix not match up with the coordinate system of the pinhole entity.
70+
71+
The pinhole matrix (the `image_from_camera` argument) always project along the third (Z) axis,
72+
but will be re-oriented to project along the forward axis of the `camera_xyz` argument.
73+
focal_length:
74+
The focal length of the camera in pixels.
75+
This is the diagonal of the projection matrix.
76+
Set one value for symmetric cameras, or two values (X=Right, Y=Down) for anamorphic cameras.
77+
principal_point:
78+
The center of the camera in pixels.
79+
The default is half the width and height.
80+
This is the last column of the projection matrix.
81+
Expects two values along the dimensions Right and Down
82+
width:
83+
Width of the image in pixels.
84+
height:
85+
Height of the image in pixels.
86+
fov_y:
87+
Vertical field of view in radians.
88+
aspect_ratio
89+
Aspect ratio (width/height).
90+
image_plane_distance:
91+
The distance from the camera origin to the image plane when the projection is shown in a 3D viewer.
92+
This is only used for visualization purposes, and does not affect the projection itself.
93+
color:
94+
Color of the camera frustum lines in the 3D viewer.
95+
line_width:
96+
Width of the camera frustum lines in the 3D viewer.
97+
9898
"""
9999

100100
with catch_and_log_exceptions(context=self.__class__.__name__):

0 commit comments

Comments
 (0)