Skip to content

opencv_cudaoptflow 4.1.1 has a strong dependency to nvcuda.dll #2210

@chacha21

Description

@chacha21

Starting from OpenCV 4.1.1, the NVidia Optflow sdk is taken into account in cudaoptflow.
However, because of the use of
cuCtxGetCurrent(), cuCtxPopCurrent(), cuCtxPushCurrent(), cuCtxSynchronize(),
then opencv_cudaoptflow411.dll fails to load, and prevents a program from running if nvcuda.dll is not available on the host machine.

A solution under windows+Visual Studio is to "Delay load" opencv_cudaoptflow411.dll, but it is less convenient than unders OpenCV <= 4.1.0, where checking at runtime for "cv::cuda::getCudaEnabledDeviceCount()" was enough to decide if cuda was available.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions