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 29, 2024
1 parent 03b7e9d commit 9ac5f39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sbot/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ def see(self, *, frame: NDArray | None = None, save: PathLike | None = None) ->
markers = self._cam.see(frame=frame)

if save:
# 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)
raise NotImplementedError
return [Marker.from_april_vision_marker(marker) for marker in markers]

Expand All @@ -128,7 +131,8 @@ def capture(self, *, save: 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 save(self, path: Union[Path, str], *, frame: Optional[NDArray] = None) -> None:
Expand Down

0 comments on commit 9ac5f39

Please sign in to comment.