Skip to content

Commit

Permalink
A temporary implementation for saving
Browse files Browse the repository at this point in the history
Not compatible with the sim branch
To be replaced by april_vision==2.2.0
  • Loading branch information
WillB97 committed Jun 30, 2024
1 parent 9d6d9be commit 86d6d7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sbot/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ def see(
markers = self._cam.see(frame=frame)

if save:
raise NotImplementedError
# TODO: temporary implementation to be replaced by april_vision==2.2.0
april_frame = Frame.from_colour_frame(frame)
self._cam._save(frame=april_frame, name=save)
return [Marker.from_april_vision_marker(marker) for marker in markers]

def capture(self, *, save: Union[PathLike, None] = None) -> NDArray:
Expand All @@ -133,7 +135,8 @@ def capture(self, *, save: Union[PathLike, None] = None) -> NDArray:
"""
raw_frame = self._cam.capture()
if save:
raise NotImplementedError
# TODO: temporary implementation to be replaced by april_vision==2.2.0
self._cam.save(name=save, frame=raw_frame)
return raw_frame

def _set_marker_sizes(
Expand Down

0 comments on commit 86d6d7b

Please sign in to comment.