Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3.8 opencv_SIFT无法使用 #71

Closed
dongguoziqi opened this issue Apr 23, 2020 · 1 comment
Closed

python3.8 opencv_SIFT无法使用 #71

dongguoziqi opened this issue Apr 23, 2020 · 1 comment

Comments

@dongguoziqi
Copy link

win10, python3.8
安装module正常,运行时,无法识别图片

LOG: find_img_knn执行失败
maxLoc = match_img_knn(img_template, img_src, thread)

sift = cv2.xfeatures2d.SIFT_create() # 创建sift检测器

cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv_contrib\modules\xfeatures2d\src\sift.cpp:1207: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'cv::xfeatures2d::SIFT::create'

经查发现pip install 的opencv-python都是最新版本, 4.1及以上,而SIFT功能已经不能在opencv 3.4.2以上版本使用
链接:DynaSlum/satsense#13

尝试用pip install opencv-python==3.4.2.16
报无法在库中找到,(from versions: 3.4.8.29, 3.4.9.31, 3.4.9.33, 4.1.2.30, 4.2.0.32, 4.2.0.34)

解决办法有人提到用 conda 安装旧版本opencv, 未验证

python的识图部分可能需要修改,所幸win版本可以正常使用

@dongguoziqi
Copy link
Author

dongguoziqi commented Apr 24, 2020

手动安装opencv-python 3.4.2.17,提示不匹配当前平台。进入pip官网发现3.4的版本只匹配python3.7

将python由3.8回退到3.7,然后手动安装opencv旧版本之后,python版本可以正常运行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant