• DepthAI-v2
  • Video preview window fails to appear on macOS

We have two reports of an issue where running examples fail to display the video stream, however all console output looks normal. Both cases are on macOS "Big Sur" with one on a MacBook Pro 16 and the other on a 17. We tested both the Gen 1 demo and Gen 2 01_rgb_preview.py.

A Python process appears in the system tray, however the window itself is not rendered. Hovering over the icon in the tray reveals that the "application is not responding".

We were able to reproduce the problem independently of DepthAI as follows:

>>> import cv2
>>> img = cv2.imread("image.jpg", cv2.IMREAD_GRAYSCALE)
>>> cv2.imshow("image", img)

One of our developers came across this problem with another customer and suggested running the following:

python3 -m pip install opencv-python-headless

OK, we got further on this:

python3 -m pip install opencv-python --force-reinstall --no-cache-dir

From our Discord, this seems to have success:

Discord: https://discord.gg/EPsZHkg9Nx

After running the pip install command, be sure to completely shutdown MacOS Terminal and restart it.

We just merged an update to the documentation that should fix this install issue as well. So fingers crossed, these fixes won't be needed anymore.