Thanks Jaka, what python version would you recommend?
Sseandevlin
- Nov 20, 2023
- Joined Nov 13, 2023
- 0 best answers
Reflashed device back to original state, still can't get create UVC on this OV9782 camera though.
depthai-python git:(v2.23.0.0) ✗ python3 ./examples/ColorCamera/rgb_uvc.py Traceback (most recent call last): File "/Users/sean.devlin/play/depthai-python/./examples/ColorCamera/rgb_uvc.py", line 88, in <module> with dai.Device(getPipeline()) as device: File "/Users/sean.devlin/play/depthai-python/./examples/ColorCamera/rgb_uvc.py", line 38, in getPipeline uvc = pipeline.createUVC() AttributeError: 'depthai.Pipeline' object has no attribute 'createUVC' ➜ depthai-python git:(v2.23.0.0) ✗➜ depthai git:(develop) ✗ python3 ./apps/uvc/main3.py -fb Flashing bootloader... Flashing progress: 0.0% Flashing progress: 6.2% Flashing progress: 12.5% Flashing progress: 18.8% Flashing progress: 25.0% Traceback (most recent call last): File "/Users/sean.devlin/Luxonis/depthai/./apps/uvc/main3.py", line 72, in <module> if args.flash_bootloader: flash() File "/Users/sean.devlin/Luxonis/depthai/./apps/uvc/main3.py", line 63, in flash bootloader.flashBootloader(progress) depthai.XLinkReadError: Couldn't read data from stream: '__bootloader' (X_LINK_ERROR) ➜ depthai git:(develop) ✗ python3 ./apps/uvc/main3.py -f Traceback (most recent call last): File "/Users/sean.devlin/Luxonis/depthai/./apps/uvc/main3.py", line 73, in <module> if args.flash_app: flash(getPipeline()) File "/Users/sean.devlin/Luxonis/depthai/./apps/uvc/main3.py", line 38, in getPipeline uvc = pipeline.createUVC() AttributeError: 'depthai.Pipeline' object has no attribute 'createUVC' ➜ depthai git:(develop) ✗ python3 ./apps/uvc/main3.py -l Traceback (most recent call last): File "/Users/sean.devlin/Luxonis/depthai/./apps/uvc/main3.py", line 78, in <module> device = dai.Device(getPipeline()) File "/Users/sean.devlin/Luxonis/depthai/./apps/uvc/main3.py", line 38, in getPipeline uvc = pipeline.createUVC() AttributeError: 'depthai.Pipeline' object has no attribute 'createUVC'
- Edited
Here is the UVC app modified only at line 30.
`
#!/usr/bin/env python3
import platform
import depthai as dai
import time
import sys
import signal
import threading
from depthai_sdk.managers import arg_managerargs = arg_manager.parseArgs()
if platform.machine() == 'aarch64':
print("This app is temporarily disabled on AARCH64 systems due to an issue with stream preview. We are working on resolving this issue", file=sys.stderr)
raise SystemExit(1)enable_4k = False # Will downscale 4K -> 1080p
Start defining a pipeline
pipeline = dai.Pipeline()
Define a source - color camera
cam_rgb = pipeline.createColorCamera()
cam_rgb.setBoardSocket(dai.CameraBoardSocket.RGB)
cam_rgb.setInterleaved(True)if enable_4k:
cam_rgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_4_K)
cam_rgb.setIspScale(1, 2)
else:
cam_rgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_720_P)Create an UVC (USB Video Class) output node. It needs 1920x1080, NV12 input
uvc = pipeline.createUVC()
cam_rgb.video.link(uvc.input)Terminate app handler
quitEvent = threading.Event()
signal.signal(signal.SIGTERM, lambda *_args: quitEvent.set())Pipeline defined, now the device is connected to
with dai.Device(pipeline, usb2Mode=False) as device:
if device.getDeviceInfo().protocol == dai.XLinkProtocol.X_LINK_USB_VSC and device.getUsbSpeed() not in (dai.UsbSpeed.SUPER, dai.UsbSpeed.SUPER_PLUS):
print("This app is temporarily disabled with USB2 connection speed due to known issue. We're working on resolving it. In the meantime, please try again with a USB3 cable/port for the device connection", file=sys.stderr)
raise SystemExit(1)
print("\nDevice started, please keep this process running")
print("and open an UVC viewer. Example on Linux:")
print(" guvcview -d /dev/video0")
print("\nTo close: Ctrl+C")# Doing nothing here, just keeping the host feeding the watchdog while not quitEvent.is_set(): try: time.sleep(0.1) except KeyboardInterrupt: break
`