This file contains hidden or 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
#!/usr/bin/env python3 | |
import depthai as dai | |
import cv2 | |
# Start defining a pipeline | |
pipeline = dai.Pipeline() | |
cfg = dai.BoardConfig() | |
cfg.emmc = True | |
cfg.logPath = '/media/mmcsd-0-0/depthai_log_file.txt' | |
config = dai.Device.Config() |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import cv2 | |
import depthai as dai | |
import math | |
class BoundingBox: | |
xmin: float | |
ymin: float | |
xmax: float |
This file contains hidden or 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
import depthai as dai | |
from depthai_sdk import FPSHandler as FPS | |
# Create pipeline | |
pipeline = dai.Pipeline() | |
pipeline.setXLinkChunkSize(0) | |
# Define source and output | |
camRgb = pipeline.create(dai.node.ColorCamera) | |
camRgb.setFps(30) |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import cv2 | |
import depthai as dai | |
import time | |
# Create pipeline | |
pipeline = dai.Pipeline() | |
# Define source and output |
This file contains hidden or 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
#!/usr/bin/env python | |
import cv2 | |
import numpy as np | |
from enum import IntEnum | |
class Position(IntEnum): | |
""" | |
Where on frame do we want to print text. | |
""" |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import depthai as dai | |
# Create pipeline | |
pipeline = dai.Pipeline() | |
cfg = dai.BoardConfig() | |
cfg.emmc = True | |
cfg.logPath = '/media/mmcsd-0-0/depthai_log_file.txt' |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import cv2 | |
import depthai as dai | |
# Create pipeline | |
pipeline = dai.Pipeline() | |
cfg = dai.BoardConfig() | |
cfg.emmc = True |
This file contains hidden or 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
import depthai as dai | |
import threading | |
import contextlib | |
import cv2 | |
import time | |
from queue import Queue | |
run = True | |
# This can be customized to pass multiple parameters | |
def getPipeline(stereo): |
This file contains hidden or 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
""" | |
With latest depthai, you should just use Camera node, which does undistortion by itself. | |
Demo here: https://github.com/luxonis/depthai-python/blob/main/examples/StereoDepth/rgb_depth_aligned.py | |
""" | |
#!/usr/bin/env python3 | |
import cv2 | |
import numpy as np | |
import depthai as dai |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import depthai as dai | |
import cv2 | |
import time | |
pipeline = dai.Pipeline() | |
# Define sources and outputs | |
camRgb = pipeline.create(dai.node.ColorCamera) |