|
Rerun C++ SDK
|
Archetype: Camera perspective projection (a.k.a. More...
#include <rerun/archetypes/pinhole.hpp>
Public Member Functions | |
| Pinhole | with_resolution (float width, float height) && |
| Pixel resolution (usually integers) of child image space. | |
| Pinhole | with_resolution (int width, int height) && |
| Pixel resolution (usually integers) of child image space. | |
| Pinhole (Pinhole &&other)=default | |
| Pinhole (const Pinhole &other)=default | |
| Pinhole & | operator= (const Pinhole &other)=default |
| Pinhole & | operator= (Pinhole &&other)=default |
| Pinhole (rerun::components::PinholeProjection _image_from_camera) | |
| Pinhole | with_image_from_camera (const rerun::components::PinholeProjection &_image_from_camera) && |
| Camera projection, from image coordinates to view coordinates. | |
| Pinhole | with_many_image_from_camera (const Collection< rerun::components::PinholeProjection > &_image_from_camera) && |
This method makes it possible to pack multiple image_from_camera in a single component batch. | |
| Pinhole | with_resolution (const rerun::components::Resolution &_resolution) && |
| Pixel resolution (usually integers) of child image space. | |
| Pinhole | with_many_resolution (const Collection< rerun::components::Resolution > &_resolution) && |
This method makes it possible to pack multiple resolution in a single component batch. | |
| Pinhole | with_camera_xyz (const rerun::components::ViewCoordinates &_camera_xyz) && |
| Sets the camera orientation convention. | |
| Pinhole | with_many_camera_xyz (const Collection< rerun::components::ViewCoordinates > &_camera_xyz) && |
This method makes it possible to pack multiple camera_xyz in a single component batch. | |
| Pinhole | with_child_frame (const rerun::components::TransformFrameId &_child_frame) && |
| The child frame this transform transforms from. | |
| Pinhole | with_many_child_frame (const Collection< rerun::components::TransformFrameId > &_child_frame) && |
This method makes it possible to pack multiple child_frame in a single component batch. | |
| Pinhole | with_parent_frame (const rerun::components::TransformFrameId &_parent_frame) && |
| The parent frame this transform transforms into. | |
| Pinhole | with_many_parent_frame (const Collection< rerun::components::TransformFrameId > &_parent_frame) && |
This method makes it possible to pack multiple parent_frame in a single component batch. | |
| Pinhole | with_image_plane_distance (const rerun::components::ImagePlaneDistance &_image_plane_distance) && |
| The distance from the camera origin to the image plane when the projection is shown in a 3D viewer. | |
| Pinhole | with_many_image_plane_distance (const Collection< rerun::components::ImagePlaneDistance > &_image_plane_distance) && |
This method makes it possible to pack multiple image_plane_distance in a single component batch. | |
| Pinhole | with_color (const rerun::components::Color &_color) && |
| Color of the camera wireframe. | |
| Pinhole | with_many_color (const Collection< rerun::components::Color > &_color) && |
This method makes it possible to pack multiple color in a single component batch. | |
| Pinhole | with_line_width (const rerun::components::Radius &_line_width) && |
| Width of the camera wireframe lines. | |
| Pinhole | with_many_line_width (const Collection< rerun::components::Radius > &_line_width) && |
This method makes it possible to pack multiple line_width in a single component batch. | |
| Collection< ComponentColumn > | columns (const Collection< uint32_t > &lengths_) |
| Partitions the component data into multiple sub-batches. | |
| Collection< ComponentColumn > | columns () |
| Partitions the component data into unit-length sub-batches. | |
Static Public Member Functions | |
| static Pinhole | from_focal_length_and_resolution (const datatypes::Vec2D &focal_length, const datatypes::Vec2D &resolution) |
| Creates a pinhole from the camera focal length and resolution, both specified in pixels. | |
| static Pinhole | from_focal_length_and_resolution (float focal_length, const datatypes::Vec2D &resolution) |
| Creates a symmetric pinhole from the camera focal length and resolution, both specified in pixels. | |
| static Pinhole | from_fov_and_aspect_ratio (float fov_y, float aspect_ratio) |
| Creates a pinhole from the camera vertical field of view (in radians) and aspect ratio (width/height). | |
| static Pinhole | update_fields () |
Update only some specific fields of a Pinhole. | |
| static Pinhole | clear_fields () |
Clear all the fields of a Pinhole. | |
Public Attributes | |
| std::optional< ComponentBatch > | image_from_camera |
| Camera projection, from image coordinates to view coordinates. | |
| std::optional< ComponentBatch > | resolution |
| Pixel resolution (usually integers) of child image space. | |
| std::optional< ComponentBatch > | camera_xyz |
| Sets the camera orientation convention. | |
| std::optional< ComponentBatch > | child_frame |
| The child frame this transform transforms from. | |
| std::optional< ComponentBatch > | parent_frame |
| The parent frame this transform transforms into. | |
| std::optional< ComponentBatch > | image_plane_distance |
| The distance from the camera origin to the image plane when the projection is shown in a 3D viewer. | |
| std::optional< ComponentBatch > | color |
| Color of the camera wireframe. | |
| std::optional< ComponentBatch > | line_width |
| Width of the camera wireframe lines. | |
Static Public Attributes | |
| static constexpr const char | ArchetypeName [] = "rerun.archetypes.Pinhole" |
The name of the archetype as used in ComponentDescriptors. | |
| static constexpr auto | Descriptor_image_from_camera |
ComponentDescriptor for the image_from_camera field. | |
| static constexpr auto | Descriptor_resolution |
ComponentDescriptor for the resolution field. | |
| static constexpr auto | Descriptor_camera_xyz |
ComponentDescriptor for the camera_xyz field. | |
| static constexpr auto | Descriptor_child_frame |
ComponentDescriptor for the child_frame field. | |
| static constexpr auto | Descriptor_parent_frame |
ComponentDescriptor for the parent_frame field. | |
| static constexpr auto | Descriptor_image_plane_distance |
ComponentDescriptor for the image_plane_distance field. | |
| static constexpr auto | Descriptor_color |
ComponentDescriptor for the color field. | |
| static constexpr auto | Descriptor_line_width |
ComponentDescriptor for the line_width field. | |
Archetype: Camera perspective projection (a.k.a.
intrinsics).
If archetypes::Transform3D is logged for the same child/parent relationship (e.g. for the camera extrinsics), it takes precedence over archetypes::Pinhole.
If you use named transform frames via the child_frame and parent_frame fields, you don't have to use archetypes::CoordinateFrame as it is the case with other visualizations: for any entity with an archetypes::Pinhole the viewer will always visualize it directly without needing a archetypes::CoordinateFrame to refer to the pinhole's child/parent frame.


|
static |
Creates a pinhole from the camera focal length and resolution, both specified in pixels.
The focal length is the diagonal of the projection matrix. Set the same value for x & y value for symmetric cameras, or two values for anamorphic cameras.
Assumes the principal point to be in the middle of the sensor.
|
inlinestatic |
Creates a symmetric pinhole from the camera focal length and resolution, both specified in pixels.
The focal length is the diagonal of the projection matrix.
Assumes the principal point to be in the middle of the sensor.
|
inlinestatic |
Creates a pinhole from the camera vertical field of view (in radians) and aspect ratio (width/height).
Assumes the principal point to be in the middle of the sensor.
|
inline |
Pixel resolution (usually integers) of child image space.
Width and height.
image_from_camera project onto the space spanned by (0,0) and resolution - 1.
|
inline |
Pixel resolution (usually integers) of child image space.
Width and height.
image_from_camera project onto the space spanned by (0,0) and resolution - 1.
|
inline |
Camera projection, from image coordinates to view coordinates.
Any update to this field will reset all other transform properties that aren't changed in the same log call or send_columns row.
|
inline |
This method makes it possible to pack multiple image_from_camera in a single component batch.
This only makes sense when used in conjunction with columns. with_image_from_camera should be used when logging a single row's worth of data.
|
inline |
Pixel resolution (usually integers) of child image space.
Width and height.
Example:
image_from_camera project onto the space spanned by (0,0) and resolution - 1.
Any update to this field will reset all other transform properties that aren't changed in the same log call or send_columns row.
|
inline |
This method makes it possible to pack multiple resolution in a single component batch.
This only makes sense when used in conjunction with columns. with_resolution should be used when logging a single row's worth of data.
|
inline |
Sets the camera orientation convention.
All common values are available as constants on the components::ViewCoordinates class.
The default is ViewCoordinates::RDF: +X is right, +Y is down, and +Z is forward. This makes the camera frustum point along +Z in the parent space, with its up direction along -Y.
The camera frustum points along the axis set to F, or opposite the axis set to B. When logging a depth image under this entity, this is the direction in which the point cloud is projected.
The frustum's up direction is the axis set to U, or opposite the axis set to D. This matches the -Y direction of pixel space, where all images use RDF coordinates.
The frustum's right direction is the axis set to R, or opposite the axis set to L. This matches the +X direction of pixel space.
Other common formats are RUB (X=Right, Y=Up, Z=Back) and FLU (X=Forward, Y=Left, Z=Up).
image_from_camera is always defined to project along +Z in camera coordinates. camera_xyz reorients that projection to the forward axis of the pinhole entity.
|
inline |
This method makes it possible to pack multiple camera_xyz in a single component batch.
This only makes sense when used in conjunction with columns. with_camera_xyz should be used when logging a single row's worth of data.
|
inline |
The child frame this transform transforms from.
The entity at which the transform relationship of any given child frame is specified mustn't change over time, but is allowed to be different for static time. E.g. if you specified the child frame "robot_arm" on an entity named "my_transforms", you may not log transforms with the child frame "robot_arm" on any other entity than "my_transforms" unless one of them was logged with static time.
If not specified, this is set to the implicit transform frame of the current entity path. This means that if a archetypes::Transform3D is set on an entity called /my/entity/path then this will default to tf#/my/entity/path.
To set the frame an entity is part of see archetypes::CoordinateFrame.
Any update to this field will reset all other transform properties that aren't changed in the same log call or send_columns row.
|
inline |
This method makes it possible to pack multiple child_frame in a single component batch.
This only makes sense when used in conjunction with columns. with_child_frame should be used when logging a single row's worth of data.
|
inline |
The parent frame this transform transforms into.
If not specified, this is set to the implicit transform frame of the current entity path's parent. This means that if a archetypes::Transform3D is set on an entity called /my/entity/path then this will default to tf#/my/entity.
To set the frame an entity is part of see archetypes::CoordinateFrame.
Any update to this field will reset all other transform properties that aren't changed in the same log call or send_columns row.
|
inline |
This method makes it possible to pack multiple parent_frame in a single component batch.
This only makes sense when used in conjunction with columns. with_parent_frame should be used when logging a single row's worth of data.
|
inline |
The distance from the camera origin to the image plane when the projection is shown in a 3D viewer.
This is only used for visualization purposes, and does not affect the projection itself.
|
inline |
This method makes it possible to pack multiple image_plane_distance in a single component batch.
This only makes sense when used in conjunction with columns. with_image_plane_distance should be used when logging a single row's worth of data.
|
inline |
This method makes it possible to pack multiple color in a single component batch.
This only makes sense when used in conjunction with columns. with_color should be used when logging a single row's worth of data.
|
inline |
This method makes it possible to pack multiple line_width in a single component batch.
This only makes sense when used in conjunction with columns. with_line_width should be used when logging a single row's worth of data.
| Collection< ComponentColumn > rerun::archetypes::Pinhole::columns | ( | const Collection< uint32_t > & | lengths_ | ) |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch data into ComponentColumns instead, via ComponentBatch::partitioned.
This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.
The specified lengths must sum to the total length of the component batch.
| Collection< ComponentColumn > rerun::archetypes::Pinhole::columns | ( | ) |
Partitions the component data into unit-length sub-batches.
This is semantically similar to calling columns with std::vector<uint32_t>(n, 1), where n is automatically guessed.
| std::optional<ComponentBatch> rerun::archetypes::Pinhole::image_from_camera |
Camera projection, from image coordinates to view coordinates.
Any update to this field will reset all other transform properties that aren't changed in the same log call or send_columns row.
| std::optional<ComponentBatch> rerun::archetypes::Pinhole::resolution |
Pixel resolution (usually integers) of child image space.
Width and height.
Example:
image_from_camera project onto the space spanned by (0,0) and resolution - 1.
Any update to this field will reset all other transform properties that aren't changed in the same log call or send_columns row.
| std::optional<ComponentBatch> rerun::archetypes::Pinhole::camera_xyz |
Sets the camera orientation convention.
All common values are available as constants on the components::ViewCoordinates class.
The default is ViewCoordinates::RDF: +X is right, +Y is down, and +Z is forward. This makes the camera frustum point along +Z in the parent space, with its up direction along -Y.
The camera frustum points along the axis set to F, or opposite the axis set to B. When logging a depth image under this entity, this is the direction in which the point cloud is projected.
The frustum's up direction is the axis set to U, or opposite the axis set to D. This matches the -Y direction of pixel space, where all images use RDF coordinates.
The frustum's right direction is the axis set to R, or opposite the axis set to L. This matches the +X direction of pixel space.
Other common formats are RUB (X=Right, Y=Up, Z=Back) and FLU (X=Forward, Y=Left, Z=Up).
image_from_camera is always defined to project along +Z in camera coordinates. camera_xyz reorients that projection to the forward axis of the pinhole entity.
| std::optional<ComponentBatch> rerun::archetypes::Pinhole::child_frame |
The child frame this transform transforms from.
The entity at which the transform relationship of any given child frame is specified mustn't change over time, but is allowed to be different for static time. E.g. if you specified the child frame "robot_arm" on an entity named "my_transforms", you may not log transforms with the child frame "robot_arm" on any other entity than "my_transforms" unless one of them was logged with static time.
If not specified, this is set to the implicit transform frame of the current entity path. This means that if a archetypes::Transform3D is set on an entity called /my/entity/path then this will default to tf#/my/entity/path.
To set the frame an entity is part of see archetypes::CoordinateFrame.
Any update to this field will reset all other transform properties that aren't changed in the same log call or send_columns row.
| std::optional<ComponentBatch> rerun::archetypes::Pinhole::parent_frame |
The parent frame this transform transforms into.
If not specified, this is set to the implicit transform frame of the current entity path's parent. This means that if a archetypes::Transform3D is set on an entity called /my/entity/path then this will default to tf#/my/entity.
To set the frame an entity is part of see archetypes::CoordinateFrame.
Any update to this field will reset all other transform properties that aren't changed in the same log call or send_columns row.
| std::optional<ComponentBatch> rerun::archetypes::Pinhole::image_plane_distance |
The distance from the camera origin to the image plane when the projection is shown in a 3D viewer.
This is only used for visualization purposes, and does not affect the projection itself.
|
staticconstexpr |
ComponentDescriptor for the image_from_camera field.
|
staticconstexpr |
ComponentDescriptor for the resolution field.
|
staticconstexpr |
ComponentDescriptor for the camera_xyz field.
|
staticconstexpr |
ComponentDescriptor for the child_frame field.
|
staticconstexpr |
ComponentDescriptor for the parent_frame field.
|
staticconstexpr |
ComponentDescriptor for the image_plane_distance field.
|
staticconstexpr |
ComponentDescriptor for the color field.
|
staticconstexpr |
ComponentDescriptor for the line_width field.