Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Deprecated DepthAI Code #476

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def build_pipeline(self):
if self.publish_rgb_video or self.publish_rgb_preview or self.save_rgb_video or self.save_rgb_preview:
camRgb = self.pipeline.create(dai.node.ColorCamera)
camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
camRgb.setBoardSocket(dai.CameraBoardSocket.RGB)
camRgb.setBoardSocket(dai.CameraBoardSocket.CAM_A)

if self.publish_rgb_video or self.save_rgb_video:
camRgb.setVideoSize(self.rgb_video_resolution)
Expand Down Expand Up @@ -174,7 +174,7 @@ def build_pipeline(self):
if self.publish_left or self.publish_disparity or self.publish_depth or self.save_left or self.save_disparity:
camLeft = self.pipeline.create(dai.node.MonoCamera)
camLeft.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P) # Resolution: 640 x 400
camLeft.setBoardSocket(dai.CameraBoardSocket.LEFT)
camLeft.setBoardSocket(dai.CameraBoardSocket.CAM_B)
camLeft.setFps(self.framerate)

if self.save_left:
Expand All @@ -187,7 +187,7 @@ def build_pipeline(self):
if self.publish_right or self.publish_disparity or self.publish_depth or self.save_right or self.save_disparity:
camRight = self.pipeline.create(dai.node.MonoCamera)
camRight.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P) # Resolution: 640 x 400
camRight.setBoardSocket(dai.CameraBoardSocket.RIGHT)
camRight.setBoardSocket(dai.CameraBoardSocket.CAM_C)
camRight.setFps(self.framerate)

if self.save_right:
Expand Down
6 changes: 3 additions & 3 deletions onboard/catkin_ws/src/cv/scripts/depthai_spatial_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ def build_pipeline(self, nn_blob_path, sync_nn):
cam_rgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.BGR)

mono_left.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
mono_left.setBoardSocket(dai.CameraBoardSocket.LEFT)
mono_left.setBoardSocket(dai.CameraBoardSocket.CAM_B)
mono_right.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
mono_right.setBoardSocket(dai.CameraBoardSocket.RIGHT)
mono_right.setBoardSocket(dai.CameraBoardSocket.CAM_C)

# setting node configs
stereo.setDefaultProfilePreset(dai.node.StereoDepth.PresetMode.HIGH_DENSITY)
stereo.setDepthAlign(dai.CameraBoardSocket.RGB)
stereo.setDepthAlign(dai.CameraBoardSocket.CAM_A)

spatial_detection_network.setBlobPath(nn_blob_path)
spatial_detection_network.setConfidenceThreshold(model['confidence_threshold'])
Expand Down