diff --git a/pyproject.toml b/pyproject.toml index e63e7b1..0e72a41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ dynamic = ["version"] requires-python = ">=3.8" dependencies = [ "pyserial >=3,<4", - "april_vision >=2.0.2,<3", + "april_visio@git+https://github.com/WillB97/april_vision#egg=save-functionality", "typing-extensions; python_version<'3.10'", ] classifiers = [ diff --git a/sbot/camera.py b/sbot/camera.py index 6b637bb..9496fe8 100644 --- a/sbot/camera.py +++ b/sbot/camera.py @@ -120,9 +120,7 @@ def see( 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) + self._cam.save(save, frame=frame, detections=markers) return [Marker.from_april_vision_marker(marker) for marker in markers] def capture(self, *, save: Union[PathLike, None] = None) -> NDArray: @@ -135,8 +133,7 @@ def capture(self, *, save: Union[PathLike, None] = None) -> NDArray: """ raw_frame = self._cam.capture() if save: - # TODO: temporary implementation to be replaced by april_vision==2.2.0 - self._cam.save(name=save, frame=raw_frame) + self._cam.save(save, frame=raw_frame, annotated=False) return raw_frame def _set_marker_sizes(