# init runtime environment
print('--> Init runtime environment')
ret = rknn.init_runtime()
# ret = rknn.init_runtime('rk1808', device_id='1808')
if ret != 0:
print('Init runtime environment failed')
exit(ret)
print('done')
# VideoCapture inputs
capture = cv2.VideoCapture(10)
ref, frame = capture.read()
height, width = frame.shape[:2]
print(f"Image resolution: {width} x {height}")
if not ref:
raise ValueError("Could not open the camera!Please check it to ensure work correctly.")