Skip to content

Commit

Permalink
Add change
Browse files Browse the repository at this point in the history
  • Loading branch information
hexbabe committed Jul 16, 2024
1 parent 50440cf commit 080871a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions depthai_sdk/src/depthai_sdk/components/camera_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,13 @@ def config_camera(self,
if resize_mode != ResizeMode.CROP:
raise ValueError("Currently only ResizeMode.CROP is supported mode for specifying size!")
else:
# TODO: Use ImageManip to set mono frame size
raise NotImplementedError("Not yet implemented")
crop_manip = self._pipeline.create(dai.node.ImageManip)
crop_manip.initialConfig.setResize(*size_tuple)
crop_manip.initialConfig.setKeepAspectRatio(True)
self.node.out.link(crop_manip.inputImage)
self.node = crop_manip
self.stream = crop_manip.out
self.stream_size = size_tuple

def _config_camera_args(self, args: Dict):
if not isinstance(args, Dict):
Expand Down

0 comments on commit 080871a

Please sign in to comment.