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 time | |
from pathlib import Path | |
import cv2 | |
import depthai as dai | |
import schedule | |
import time |
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
from pathlib import Path | |
import cv2 | |
import depthai as dai | |
import contextlib | |
import numpy as np | |
import time | |
import argparse | |
nnPathDefault = str((Path(__file__).parent / Path('models/mobilenet-ssd_openvino_2021.2_6shave.blob')).resolve().absolute()) | |
parser = argparse.ArgumentParser() |
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 cv2 | |
import depthai as dai | |
# Create pipeline | |
pipeline = dai.Pipeline() | |
# Define sources and outputs | |
monoLeft = pipeline.createMonoCamera() | |
monoLeft.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P) | |
monoLeft.setBoardSocket(dai.CameraBoardSocket.LEFT) |
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() | |
# Define source and output | |
camRgb = pipeline.createColorCamera() |
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 blobconverter | |
import cv2 | |
import depthai as dai | |
import face_landmarks | |
openvinoVersion = "2020.3" | |
pipeline = dai.Pipeline() | |
# Define sources and outputs | |
monoRight = pipeline.create(dai.node.MonoCamera) |
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 numpy as np | |
import depthai as dai | |
out_depth = False # Disparity by default | |
out_rectified = True # Output and display rectified streams | |
lrcheck = True # Better handling for occlusions | |
extended = False # Closer-in minimum depth, disparity range is doubled |
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 argparse | |
import cv2 | |
import depthai as dai | |
import blobconverter | |
import numpy as np | |
from libraries.depthai_replay import Replay | |
import time | |
from time import monotonic | |
import math |
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 | |
from collections import deque | |
import numpy as np | |
# Add path here! | |
cap = cv2.VideoCapture("/path/to/video.mp4") |
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
from MultiMsgSync import TwoStageHostSeqSync | |
import blobconverter | |
import cv2 | |
import depthai as dai | |
import numpy as np | |
def frame_norm(frame, bbox): | |
normVals = np.full(len(bbox), frame.shape[0]) | |
normVals[::2] = frame.shape[1] | |
return (np.clip(np.array(bbox), 0, 1) * normVals).astype(int) |
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 | |
from depthai_sdk import FPSHandler | |
# Create pipeline | |
pipeline = dai.Pipeline() | |
pipeline.setXLinkChunkSize(0) | |
# Define sources and outputs | |
monoLeft = pipeline.create(dai.node.MonoCamera) |
OlderNewer