Backends

Single Camera Backend

This backend only supports a single camera.

class j5_zoloto.backends.ZolotoHardwareBackend(camera_id)[source]

A Zoloto Hardware backend.

__init__(camera_id)[source]
board

alias of j5_zoloto.board.ZolotoCameraBoard

class property camera_class: Type[zoloto.cameras.camera.Camera]

The camera class to use.

Return type

Type[Camera]

capture_frame()[source]

Get the raw image data from the camera.

Return type

ndarray

Returns

Camera pixel data

close_camera(identifier)[source]

Close the camera object.

Return type

None

classmethod discover()[source]

Discover boards that this backend can control.

Return type

Set[Board]

property firmware_version: Optional[str]

The firmware version of the board.

Return type

Optional[str]

get_calibration_file()[source]

Get the calibration file.

Return type

Optional[Path]

get_visible_markers(identifier, *, frame=None)[source]

Get a list of visible marker IDs.

Parameters
  • identifier (int) – Camera identifier, ignored.

  • frame (Optional[ndarray]) – Optional frame to process instead of capturing one.

Return type

List[int]

Returns

List of marker IDs that were visible.

class property marker_size: int

The static size of a marker.

Return type

int

class property marker_type: zoloto.marker_type.MarkerType

The type of markers to use.

Return type

MarkerType

process_frame(identifier, *, frame=None)[source]

Get markers that the camera can see.

Parameters
  • identifier (int) – Camera identifier, ignored.

  • frame (Optional[ndarray]) – Optional frame to process instead of capturing one.

Return type

Generator[Union[UncalibratedMarker, Marker], None, None]

process_frame_eager(identifier, *, frame=None)[source]

Get markers that the camera can see.

Parameters
  • identifier (int) – Camera identifier, ignored.

  • frame (Optional[ndarray]) – Optional frame to process instead of capturing one.

Return type

Generator[EagerMarker, None, None]

save_annotated_image(identifier, file, *, frame=None)[source]

Save an annotated image to a file.

Parameters
  • identifier (int) – Camera identifier, ignored.

  • frame (Optional[ndarray]) – Optional frame to process instead of capturing one.

Return type

None