简体   繁体   English

OpenCV xfeatures2d_SURF -213:未实现功能/特性

[英]OpenCV xfeatures2d_SURF -213:The function/feature is not implemented

I'm on Windows 10 and installed python3 and added OpenCV and OpenCV-contrib via pip.我在 Windows 10 上安装了 python3 并通过 pip 添加了 OpenCV 和 OpenCV-contrib。 For the xfeatures_2d it gives the following error.对于 xfeatures_2d,它给出了以下错误。

Can I add that option using pip?我可以使用 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: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; 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 implementation) 这个算法是已获得专利并被排除在此配置中; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'cv::xfeatures2d::SURF::create'设置 OPENCV_ENABLE_NONFREE CMake 选项并在函数 'cv::xfeatures2d::SURF::create' 中重建库

As discussed in the comments, you can no longer get the non-free modules via pip .正如评论中所讨论的,您无法再通过pip获得非免费模块。 The PyPI package opencv-python-contrib used to "erroneously" contain the non-free packages such as SIFT. PyPI 包opencv-python-contrib用于“错误地”包含非自由包,例如 SIFT。 This was "fixed" recently, so they no longer install with newer versions of opencv-python-contrib .这最近已“修复”,因此它们不再安装较新版本的opencv-python-contrib From the GitHub issue tracker for the PyPI package :来自PyPI 包GitHub 问题跟踪器

Those algorithms have been included erroneously before because they were not properly protected in the upstream by the OPENCV_ENABLE_NONFREE flag.这些算法之前被错误地包括在内,因为它们在上游没有被 OPENCV_ENABLE_NONFREE 标志正确保护。

I am not a lawyer.我不是律师。 I'm not sure if I can redistribute those algorithms.我不确定我是否可以重新分发这些算法。

Edit: See: opencv/opencv_contrib#1668编辑:见: opencv/opencv_contrib#1668

This solution worked for me!这个解决方案对我有用!

pip install -i http://pypi.douban.com/simple --trusted-host pypi.douban.com opencv-contrib-python==3.4.2.17

source : [https://www.programmersought.com/article/36184723625/]来源: [https://www.programmersought.com/article/36184723625/]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google合作实验室opencv xfeatures2d_SURF - google Colaboratory opencv xfeatures2d_SURF 运行 opencv 示例时出现“功能/特性未实现”错误 - "The function/feature is not implemented" error when running opencv example 模块“cv2.cv2”没有属性“xfeatures2d”(Opencv 3.4.2.17) - module 'cv2.cv2' has no attribute 'xfeatures2d'(Opencv 3.4.2.17) 如何将一维数组转换为二维数组以使plot_surf()函数在python3中正常工作? - How to convert 1D arrays into 2D arrays for the plot_surf() function to work correctly in python3? 模块“cv2.cv2”没有属性“xfeatures2d”,模块“cv2.cv2”没有属性“SIFT” - module 'cv2.cv2' has no attribute 'xfeatures2d' and module 'cv2.cv2' has no attribute 'SIFT' PyCharm:为SIFT,SURF等操作安装非免费的OpenCV模块 - PyCharm: Installation of non-free OpenCV modules for operations like SIFT, SURF cv2.imshow未实现Mac python3 opencv3 - cv2.imshow not implemented Mac python3 opencv3 OpenCV中实现的立体BM和SGBM算法中的斑点是什么 - What is speckle in stereo BM and SGBM algorithm implemented in OpenCV md5(str.encode(var1)).hexdigest() 将十六进制值设为 382fbe213f159eecf85facb256f265d0 - 如何知道 var1? - md5(str.encode(var1)).hexdigest() giving hex value as 382fbe213f159eecf85facb256f265d0 - how to know the var1? 如何在没有递归的情况下实现此功能? - How could this function be implemented without recursion?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM