cv::cuda::NvidiaOpticalFlow_2_0::create takes about 30 seconds

To use the official example script (linked below) I built OpenCV from source following the instructions from the Nvidia Optical Flow SDK (with slightly modified build flags to enable JPEG, OPENEXR, and Eigen). The OpenCV version is 4.5.2. I can post the CMake options on request.

This line from the example script takes about 30 seconds. Is this normal or could there be an issue with my setup?

Other details:

  • I’m on Ubuntu 20.04
  • To compile the example script I use CMake with: cmake_minimum_required(VERSION 3.16) and set(CMAKE_CXX_STANDARD 20).

Answer can be found here

1 Like