OpenCV4.3.0 编译踩坑填坑

2020-06-18  本文已影响0人  XBruce

1)如果要用到opencv_contrib, CMake不要漏了勾选OPENCV_NONEFREE

  1. error: sift' has not been declared return sift::create();
    当初git clone的主分支,导致缺少文件导致,后来下载同版本4.3.0解决此问题
    3)error: 'std::_hypot' has not been declared
    此问题是由于pyconfig.h和cmath 冲突所致,解决方法:
    cv2.cpp 在 #include <pyconfig.h>之前添加#include <math.h>
  2. python37.dll: file not recognized:
    由于电脑装了Anaconda,所以在cmake进行configure之后检测到python路径,因此取消cmake所有python的选项解决
上一篇 下一篇

猜你喜欢

热点阅读