Skip to content

spaceteams.SC_Compute_Server.camera

Camera-related functions

CapturedImage

CapturedImage()

"Base class for a captured image. Use .as_*() functions to get access to the pixels."

properties instance-attribute

properties: CaptureImageProperties

as_RGB16

as_RGB16() -> CapturedImage_RGB16

as_RGB8

as_RGB8() -> CapturedImage_RGB8

as_f32

as_f32() -> CapturedImage_f32

get_timestamp

get_timestamp() -> spaceteams.SC_Compute_Server.timestamp

CapturedImage_RGB16

CapturedImage_RGB16()

Bases: CapturedImage

A captured image with 16-bit channels for Red, Green, and Blue.

PixelsB property writable

PixelsB: list[int]

PixelsG property writable

PixelsG: list[int]

PixelsR property writable

PixelsR: list[int]

CapturedImage_RGB8

CapturedImage_RGB8()

Bases: CapturedImage

A captured image with 8-bit channels for Red, Green, and Blue.

PixelsB property writable

PixelsB: list[int]

PixelsG property writable

PixelsG: list[int]

PixelsR property writable

PixelsR: list[int]

CapturedImage_f32

CapturedImage_f32()

Bases: CapturedImage

A captured single-channel image with 32 bits per pixel.

Pixels property writable

Pixels: list[float]

CaptureImage

CaptureImage(camera_en: Entity, properties: CaptureImageProperties) -> int

(DEPRECATED) Capture an image from the given camera entity with the given properties. Use OnImageReceived() with the returned capture_id to react to the image.

CaptureImageBlocking

CaptureImageBlocking(camera_en: Entity, properties: CaptureImageProperties, timeout: timedelta = ...) -> spaceteams.SC_Compute_Server.camera.CapturedImage | None

Capture an image from the given camera entity with the given properties. Blocking wait for capture to complete and the request to be responded to. Returns the response CapturedImage, or a python None object. If there was no response within the timeout, the return will be None.

OnImageReceived

OnImageReceived(capture_id: SupportsInt, reaction: Callable[[CapturedImage], None]) -> None

(DEPRECATED) React to an image received with the given capture_id. Reaction must be a function that takes a CapturedImage.