Components

Marker Camera

class j5_zoloto.component.MarkerCamera(identifier, backend)[source]

Camera that can identify fiducial markers.

Additionally, it will do pose estimation, along with some calibration in order to determine the spatial positon and orientation of the markers that it has detected.

__init__(identifier, backend)[source]
capture()[source]

Get the raw image data from the camera.

Return type

ndarray

Returns

Camera pixel data

close()[source]

Close the camera.

The camera will no longer work after this method is called.

Return type

None

property identifier: int

An integer to identify the component on a board.

Return type

int

static interface_class()[source]

Get the interface class that is required to use this component.

Return type

Type[MarkerCameraInterface]

save(path, *, frame=None)[source]

Save an annotated image to a path.

Return type

None

see(*, eager=True, frame=None)[source]

Capture an image and identify fiducial markers.

Parameters

eager (bool) – Process the pose estimations of markers immediately.

Return type

List[BaseMarker]

Returns

list of markers that the camera could see.

see_ids(*, frame=None)[source]

Capture an image and identify fiducial markers.

This method does not perform pose estimation, so is faster than see.

Return type

List[int]

Returns

A list of IDs for the markers that were visible.

Marker Camera Interface

class j5_zoloto.component.MarkerCameraInterface[source]

An interface containing the methods required for a marker camera.

abstract capture_frame()[source]

Get the raw image data from the camera.

Return type

ndarray

Returns

Camera pixel data

abstract close_camera(identifier)[source]

Close the camera object.

Return type

None

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

Get a list of visible marker IDs.

Parameters

identifier (int) – Camera identifier, ignored.

Return type

List[int]

Returns

List of marker IDs that were visible.

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

Get markers that the camera can see.

Parameters

identifier (int) – Camera identifier, ignored.

Return type

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

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

Get markers that the camera can see.

Parameters

identifier (int) – Camera identifier, ignored.

Return type

Generator[EagerMarker, None, None]

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

Save an annotated image to a file.

Return type

None