OpenNI and OpenCV: cv2.imshow() crashes with error: (-215:Assertion failed) dst.data == (uchar*)dst_ptr in function 'cvShowImage'
I am trying to receive a depth image from an Orbbec Astra Pro camera connected to a Windows 10 machine. I have therfor installed opencv-python 4.0.0.21 and primesense 2.2.0.30.post5 which seems to be latest stable python packages available. This is the code snippet I am experimenting with: import numpy as np import cv2 from primesense import openni2 from primesense import _openni2 as c_api openni2.initialize("./OpenNI-Windows-x64-2.3/Redist") if openni2.is_initialized(): print('openni2 ready') else: print('openni2 not ready') dev = openni2.Device.open_any() depth_stream = dev.create_depth