PyCharm:为SIFT,SURF等操作安装非免费的OpenCV模块 [英] PyCharm: Installation of non-free OpenCV modules for operations like SIFT, SURF

查看:370
本文介绍了PyCharm:为SIFT,SURF等操作安装非免费的OpenCV模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用SIFT,SURF等功能.我在具有OpenCV 3.4.1的虚拟机上使用Ubuntu 16.04,并使用PyCharm作为IDE.

I want to use functions like SIFT, SURF,etc. I am using Ubuntu 16.04 on a virtual machine with OpenCV 3.4.1 and using PyCharm as the IDE.

我可以打开Pycharm,创建项目,转到文件-设置-项目解释器并下载所需的模块.我已经下载了opencv-python和opencv-contrib-python.

I can open Pycharm, create a project, go to file - settings - Project interpreter and download the modules I need.I have downloaded opencv-python and opencv-contrib-python.

但是我仍然无法使用上述功能.

But I still am not able to use the above mentioned fucntions.

请帮助.谢谢.

推荐答案

在OpenCV 3中,非免费模块(即 SIFT和SURF )已获得专利他们各自的创建者已移出默认的OpenCV安装,并移至 opencv_contrib 包中. opencv_contrib 中的实现默认情况下未安装,并且在编译和安装OpenCV以获得对它们的访问权限时,您需要显式启用它们.

With OpenCV 3, the non-free modules, namely SIFT and SURF, which are patented by their respective creators, were moved out of the default OpenCV install and into the opencv_contrib package. The implementations in opencv_contrib are not installed by default and you need to explicitly enable them when compiling and installing OpenCV to obtain access to them.

要访问在OpenCV 2.4.X中找到的原始SIFT和SURF实现(默认情况下安装了这些实现的版本),您将需要同时两者下拉 opencv_contrib 来自GitHub的存储库,然后从源代码编译并安装OpenCV3.

To get access to the original SIFT and SURF implementations found in OpenCV 2.4.X (versions with these implementations installed by default), you will need to pull down both the opencv and the opencv_contrib repositories from GitHub and then compile and install OpenCV3 from source.

我想为您提供执行此操作的步骤,但我想归功于在线上可用的一个教程来代替执行此操作.因此,请遵循 ORB ,它的速度更快,是SIFT和SURF的免费替代品,但不确定是否能满足您的目的.

As much as I would like to provide you with the steps to do this, I want to give credit to one tutorial available online to do this instead. So, follow this sweet tutorial - Install OpenCV 3.0 and Python 3.4+ on Ubuntu and you should be able to work with these implementations. Additionally, I would suggest looking at ORB which is a faster, free alternative to SIFT and SURF, but not sure if it will serve your purpose.

如果您真的不想使用终端,请打开一个新项目,转到->

If you really don't want to work with the terminal, open a new project, Go to ->

设置->项目->项目解释器-> +

Settings -> Project -> Project Interpreter -> +

通过搜索添加所需的模块,您应该可以使用它们.

Add the modules that you want by searching for them and you should be able to use them.

这篇关于PyCharm:为SIFT,SURF等操作安装非免费的OpenCV模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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