Traceback (most recent call last):
File “optflow.py”, line 8, in
nvof = cv2.cuda_NvidiaOpticalFlow_1_0.create(frame1.shape[1], frame1.shape[0])
cv2.error: OpenCV(4.2.0) /tmp/opencv_contrib/opencv_contrib-4.2.0/modules/cudaoptflow/src/nvidiaOpticalFlow.cpp:375: error: (-5:Bad argument) GetAPI()->nvCreateOpticalFlowCuda(m_cuContext, &m_hOF) returned error 2:NV_OF_ERR_UNSUPPORTED_DEVICE in function ‘NvidiaOpticalFlowImpl’
Environment:
GPU: TITAN X
CUDA: 10.2
OpenCV: 4.2.0