Skip to content

Commit e45c50d

Browse files
Merge pull request #930 from luxonis/fix/frame_shape
Hotfix (1.9.3.1)
2 parents 62eda88 + 26be21e commit e45c50d

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

depthai_sdk/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name='depthai-sdk',
12-
version='1.9.3',
12+
version='1.9.3.1',
1313
description='This package provides an abstraction of the DepthAI API library.',
1414
long_description=io.open("README.md", encoding="utf-8").read(),
1515
long_description_content_type="text/markdown",

depthai_sdk/src/depthai_sdk/oak_outputs/xout/xout_nn.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,15 @@ def setup_visualize(self,
7676

7777
def on_callback(self, packet: Union[DetectionPacket, TrackerPacket]):
7878
if self._visualizer and self._visualizer.frame_shape is None:
79-
shape = packet.imgFrame.getFrame().shape
79+
try:
80+
shape = packet.imgFrame.getCvFrame().shape[:2]
81+
except RuntimeError as e:
82+
raise RuntimeError(f'Error getting frame shape - {e}')
8083
if len(shape) == 1:
8184
self._visualizer.frame_shape = self._frame_shape
8285
else:
83-
self._visualizer.frame_shape = shape[1:]
84-
self._frame_shape = shape[1:]
86+
self._visualizer.frame_shape = shape
87+
self._frame_shape = shape
8588

8689
# Add detections to packet
8790
if isinstance(packet.img_detections, dai.ImgDetections) \

depthai_sdk/src/depthai_sdk/visualize/visualizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def stereo(self,
286286
def detections(self,
287287
thickness: int = None,
288288
fill_transparency: float = None,
289-
box_roundness: float = None,
289+
bbox_roundness: float = None,
290290
color: Tuple[int, int, int] = None,
291291
bbox_style: BboxStyle = None,
292292
line_width: float = None,
@@ -299,7 +299,7 @@ def detections(self,
299299
Args:
300300
thickness: Thickness of the bounding box.
301301
fill_transparency: Transparency of the bounding box.
302-
box_roundness: Roundness of the bounding box.
302+
bbox_roundness: Roundness of the bounding box.
303303
color: Color of the bounding box.
304304
bbox_style: Style of the bounding box.
305305
line_width: Width of the bbox horizontal lines CORNERS or ROUNDED_CORNERS style is used.

0 commit comments

Comments
 (0)