ubuntu编译dense-flow报错

1. dense-flow 安装前,需先cmake编译安装opencv, opencv_contrib, opencv 和 opencv_contrib版本号应一致。

2.  make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:250:lib/libopencv_videoio.so.4.5.2] 错误 1 make[1]: *** [CMakeFiles/Makefile2:2582:modules/videoio/CMakeFiles/opencv_videoio.dir/all] 错误 2 make: *** [Makefile:163:all] 错误 2

解决方案: 将lib.a改为lib.a.bak即可

3. 在python中使用opencv进行光流特征提取时,发现opencv4.0以下版本API接口“cv2.DualTVL1OpticalFlow_create()”,opencv4.0以上版本API接口使用“cv2.optflow.DualTVL1OpticalFlow_create()”;
reference:https://blog.csdn.net/zaf0516/article/details/103737615

因此,error: ‘DualTVL1OpticalFlow’ is not a member of ‘cv::optflow’
     cv::Ptr alg_tvl1 = cv::optflow::DualTVL1OpticalFlow::create(); 只需要修改src中代码,根据opencv版本进行修改

你可能感兴趣的:(深度学习入门,ubuntu,python,opencv)