OpenCV xfeatures2d_SURF -213:未实现功能/功能 [英] OpenCV xfeatures2d_SURF -213:The function/feature is not implemented

查看:1230
本文介绍了OpenCV xfeatures2d_SURF -213:未实现功能/功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 10上并安装了python3,并通过pip添加了OpenCV和OpenCV-contrib.对于xfeatures_2d,它给出以下错误.

I'm on Windows 10 and installed python3 and added OpenCV and OpenCV-contrib via pip. For the xfeatures_2d it gives the following error.

我可以使用点子添加该选项吗?

Can I add that option using pip?

detector = cv.xfeatures2d_SURF.create(hessianThreshold=minHessian)

cv2.error:OpenCV(3.4.3)C:\ projects \ opencv-python \ opencv_contrib \ modules \ xfeatures2d \ src \ surf.cpp:1016:错误:(-213:未实现功能/功能)此算法已申请专利,并且在此配置中不包括在内;设置OPENCV_ENABLE_NONFREE CMake选项并在函数'cv :: xfeatures2d :: SURF :: create'中重建库

cv2.error: OpenCV(3.4.3) C:\projects\opencv-python\opencv_contrib\modules\xfeatures2d\src\surf.cpp:1016: 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::SURF::create'

推荐答案

如注释中所述,您不再可以通过pip获取非免费模块.用于错误地"包含非自由软件包(例如SIFT)的PyPI软件包opencv-python-contrib.这是最近修复"的,因此它们不再与更新版本的opencv-python-contrib一起安装.从 PyPI软件包的GitHub问题跟踪器:

As discussed in the comments, you can no longer get the non-free modules via pip. The PyPI package opencv-python-contrib used to "erroneously" contain the non-free packages such as SIFT. This was "fixed" recently, so they no longer install with newer versions of opencv-python-contrib. From the GitHub issue tracker for the PyPI package:

之前这些算法被错误地包括在内,因为它们 没有在上游受到适当的保护 OPENCV_ENABLE_NONFREE标志.

Those algorithms have been included erroneously before because they were not properly protected in the upstream by the OPENCV_ENABLE_NONFREE flag.

我不是律师.我不确定是否可以重新分配这些 算法.

I am not a lawyer. I'm not sure if I can redistribute those algorithms.

请参阅: opencv/opencv_contrib#1668

这篇关于OpenCV xfeatures2d_SURF -213:未实现功能/功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆