-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added align_frame to packets, added aligned_to to tof packet (dispari…
…tyDepth). Created tof align with color example
- Loading branch information
Showing
7 changed files
with
50 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from depthai_sdk import OakCamera | ||
from depthai_sdk.classes.packets import DisparityDepthPacket | ||
import cv2 | ||
from depthai_sdk.visualize.visualizer import Visualizer | ||
|
||
with OakCamera() as oak: | ||
cam_c = oak.create_camera('CAM_C') | ||
tof = oak.create_tof("CAM_A", align_to=cam_c) | ||
depth_q = oak.queue(tof.out.depth).queue | ||
|
||
vis = Visualizer() # Only for depth colorization | ||
oak.start() | ||
while oak.running(): | ||
depth: DisparityDepthPacket = depth_q.get() | ||
colored_depth = depth.get_colorized_frame(vis) | ||
cv2.imshow("depth", colored_depth) | ||
cv2.imshow('Weighted', cv2.addWeighted(depth.aligned_frame.getCvFrame(), 0.5, colored_depth, 0.5, 0)) | ||
if cv2.waitKey(1) == ord('q'): | ||
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters