opencv / opencv_contrib

Repository for OpenCV's extra modules
Apache License 2.0
9.28k stars 5.74k forks source link

compile error error: template argument 1 is invalid Ptr<FarnebackOpticalFlow> cv::cuda::FarnebackOpticalFlow::create #3768

Open nwpuclydewang opened 1 month ago

nwpuclydewang commented 1 month ago
System information (version)
Detailed description

compile error

/home/sharedata/opencv_contrib-4.8.0/modules/cudaoptflow/src/farneback.cpp:50:25: error: template argument 1 is invalid 50 | Ptr cv::cuda::FarnebackOpticalFlow::create(int, double, bool, int, int, int, double, int) { throw_no_cuda(); return Ptr(); } | ^ /home/sharedata/opencv_contrib-4.8.0/modules/cudaoptflow/src/farneback.cpp:50:27: error: no declaration matches 'int cv::cuda::FarnebackOpticalFlow::create(int, double, bool, int, int, int, double, int)' 50 | Ptr cv::cuda::FarnebackOpticalFlow::create(int, double, bool, int, int, int, double, int) { throw_no_cuda(); return Ptr(); }

cudawarped commented 1 month ago
  • OpenCV => 4.8

Update to the latest version of OpenCV and try again. If you still have issues post your CMake arguments and configuration output.