Opencv 3.0 - 模块对象没有属性“xfeatures2d” [英] Opencv 3.0 - module object has no attribute 'xfeatures2d'

查看:14452
本文介绍了Opencv 3.0 - 模块对象没有属性“xfeatures2d”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从OpenCV 2.4.9转移到3.0,以使用 drawMatches drawMatchesKnn 函数。我来知道它不伴随非自由算法,如SIFT,SURF。因此,我按照以下步骤从 https://github.com/Itseez/opencv_contrib 安装了 opencv_contrib : p>

I have shifted from OpenCV 2.4.9 to 3.0 to make use of drawMatches and drawMatchesKnn function. I came to know that it does not come along with non-free algorithms like SIFT , SURF. So I installed opencv_contrib from https://github.com/Itseez/opencv_contrib by following steps

cmake -DOPENCV_EXTRA_MODULES_PATH=/home/zealous/Downloads/opencv_contrib-master/modules /usr/local ..

make -j5

make install

opencv xfeatures2d 。然后当我尝试做

>>> import cv2
>>> help(cv2.xfeatures2d)

它给我以下错误

Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    help(cv2.xfeatures2d)
AttributeError: 'module' object has no attribute 'xfeatures2d'

我在这里做错了。只是FYI,我使用OpenCV 3.0测试版。对于 xfeatures2d 的OpenCV已停用python封装或我没有正确安装?

What am I doing wrong here. Just FYI that I am using OpenCV 3.0 beta version . has OpenCV deactivated python wrappers for xfeatures2d or I have not installed it correct way?

推荐答案

我想要的opencv软件包是从opencv 官方网站下载的。我刚刚从 github 下载opencv的最新代码并安装它。它现在工作正常与opencv-contrib。

The opencv package I was trying for was downloaded from opencv official website. I just downloaded latest code from github for opencv and installed it. It is working fine now with opencv-contrib.

这篇关于Opencv 3.0 - 模块对象没有属性“xfeatures2d”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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