When running the python wrapper for OpenCV's NvidiaOpticalFlow_2_0 create function,
nvof2 = cv.cuda_NvidiaOpticalFlow_2_0.create((sz,sz), outputGridSize = OFres, perfPreset = nvperf, enableExternalHints = True)
I get the error,
error: (-5:Bad argument) GetAPI()->nvOFInit(GetHandle(), &m_initParams) returned error 5:NV_OF_ERR_INVALID_PARAM in function 'NvidiaOpticalFlowImpl_2'
Running the SDK 1.0 version with hints turned on,
nvof = cv.cuda_NvidiaOpticalFlow_1_0.create((sz,sz), nvperf, False, True, False)
works just fine and I can see the effect of my hints on the flow field the calc() function produces. I can also avoid the error in the 2.0 SDK by turning off external hints, but of course that is not what I want,
nvof2 = cv.cuda_NvidiaOpticalFlow_2_0.create((sz,sz), outputGridSize = OFres, perfPreset = nvperf, enableExternalHints = False)
Can anyone confirm if cv.cuda_NvidiaOpticalFlow_2_0.create is able to handle external hints as of OpenCV 4.7.0? It seems strange if not because it works with the 1.0 SDK but I don't see what else could be causing this error.