open3d.visualization.rendering.Camera

class open3d.visualization.rendering.Camera

Camera object

class FovType

Enum class for Camera field of view types.

Members:

Vertical

Horizontal

Horizontal = <FovType.Horizontal: 1>
Vertical = <FovType.Vertical: 0>
property name
property value
class Projection

Enum class for Camera projection types.

Members:

Perspective

Ortho

Ortho = <Projection.Ortho: 1>
Perspective = <Projection.Perspective: 0>
property name
property value
__init__(*args, **kwargs)
copy_from(self: open3d.visualization.rendering.Camera, camera: open3d.visualization.rendering.Camera) None

Copies the settings from the camera passed as the argument into this camera

get_far(self: open3d.visualization.rendering.Camera) float

Returns the distance from the camera to the far plane

get_field_of_view(self: open3d.visualization.rendering.Camera) float

Returns the field of view of camera, in degrees. Only valid if it was passed to set_projection().

get_field_of_view_type(self: open3d.visualization.rendering.Camera) open3d.visualization.rendering.Camera.FovType

Returns the field of view type. Only valid if it was passed to set_projection().

get_model_matrix(self: open3d.visualization.rendering.Camera) Annotated[numpy.typing.NDArray[numpy.float32], '[4, 4]']

Returns the model matrix of the camera

get_near(self: open3d.visualization.rendering.Camera) float

Returns the distance from the camera to the near plane

get_projection_matrix(self: open3d.visualization.rendering.Camera) Annotated[numpy.typing.NDArray[numpy.float32], '[4, 4]']

Returns the projection matrix of the camera

get_view_matrix(self: open3d.visualization.rendering.Camera) Annotated[numpy.typing.NDArray[numpy.float32], '[4, 4]']

Returns the view matrix of the camera

look_at(self: open3d.visualization.rendering.Camera, center: Annotated[numpy.typing.ArrayLike, numpy.float32, '[3, 1]'], eye: Annotated[numpy.typing.ArrayLike, numpy.float32, '[3, 1]'], up: Annotated[numpy.typing.ArrayLike, numpy.float32, '[3, 1]']) None

Sets the position and orientation of the camera:

set_projection(*args, **kwargs)

Overloaded function.

  1. set_projection(self: open3d.visualization.rendering.Camera, field_of_view: typing.SupportsFloat, aspect_ratio: typing.SupportsFloat, near_plane: typing.SupportsFloat, far_plane: typing.SupportsFloat, field_of_view_type: open3d.visualization.rendering.Camera.FovType) -> None

Sets a perspective projection.

  1. set_projection(self: open3d.visualization.rendering.Camera, projection_type: open3d.visualization.rendering.Camera.Projection, left: typing.SupportsFloat, right: typing.SupportsFloat, bottom: typing.SupportsFloat, top: typing.SupportsFloat, near: typing.SupportsFloat, far: typing.SupportsFloat) -> None

Sets the camera projection via a viewing frustum.

  1. set_projection(self: open3d.visualization.rendering.Camera, intrinsics: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, “[3, 3]”], near_plane: typing.SupportsFloat, far_plane: typing.SupportsFloat, image_width: typing.SupportsFloat, image_height: typing.SupportsFloat) -> None

Sets the camera projection via intrinsics matrix.

unproject(self: open3d.visualization.rendering.Camera, x: SupportsFloat, y: SupportsFloat, z: SupportsFloat, view_width: SupportsFloat, view_height: SupportsFloat) Annotated[numpy.typing.NDArray[numpy.float32], '[3, 1]']

Takes the (x, y, z) location in the view, where x, y are the number of pixels from the upper left of the view, and z is the depth value. Returns the world coordinate (x’, y’, z’).

Horizontal = <FovType.Horizontal: 1>
Ortho = <Projection.Ortho: 1>
Perspective = <Projection.Perspective: 0>
Vertical = <FovType.Vertical: 0>