Hi there,
I want to develop a optical flow pipeline using opencv and gpu support (RTX 2070)
I installed opencv 4.2.0 from source and also the contrib modules.
I installed the optical flow sdk.
When I run the code from:
https://devblogs.nvidia.com/opencv-optical-flow-algorithms-with-nvidia-turing-gpus/
I end up getting the error:
python3 ofgpu.py
Traceback (most recent call last):
File "ofgpu.py", line 12, in <module>
nvof = cv2.cuda_NvidiaOpticalFlow_1_0.create(frame1.shape[1], frame1.shape[0], 5, False, False, False, 1)
cv2.error: OpenCV(4.2.0) /home/user/opencv_contrib-4.2.0/modules/cudaoptflow/src/nvidiaOpticalFlow.cpp:321: error: (-5:Bad argument) Invalid GPU Ordinal in function 'NvidiaOpticalFlowImpl'
How can I solve this?
I can run the two samples from the optical flow sdk on my gpu without a problem with cuda 10.0