OpenCV的3.0.0-dev的Python绑定不能正常工作 [英] opencv 3.0.0-dev python bindings not working properly

查看:2006
本文介绍了OpenCV的3.0.0-dev的Python绑定不能正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu的02年4月14日,我有蟒蛇,用Cython与numpy的安装和更新。
我拉开品种的最新消息透露,从 http://github.com/itseez/opencv ,根据文档编制.. 。
尝试运行的Python源我从 https://github.com/shantnu/FaceDetect/ 时拉
它给我以下错误:

I am on ubuntu 14.04.02, i have python, cython and numpy installed and updated. i pulled the latest sources of open cv from http://github.com/itseez/opencv, compiled according to the documentation... when trying to run the python source i pulled from https://github.com/shantnu/FaceDetect/ it's giving me the following error :

modprobe的:FATAL:模块NVIDIA没有找到。
  回溯(最近通话最后一个):
   文件face_detect.py,第21行,在
     标志= cv2.cv.CV_HAAR_SCALE_IMAGE
  AttributeError的:'模块'对象有没有属性'简历'

modprobe: FATAL: Module nvidia not found. Traceback (most recent call last): File "face_detect.py", line 21, in flags = cv2.cv.CV_HAAR_SCALE_IMAGE AttributeError: 'module' object has no attribute 'cv'

,以确保我有python绑定我输入端子如下:
蟒蛇

to make sure i have the python bindings i typed the following in the terminal: python

import cv2
cv2.__version__

它返回以下
'3.0.0-dev的

it returned the following '3.0.0-dev'

这可能是错呢?

推荐答案

在cv2.cv子模块opencv3.0得到去除,也有一些常数改变。

the cv2.cv submodule got removed in opencv3.0, also some constants were changed.

请使用cv2.CASCADE_SCALE_IMAGE代替

please use cv2.CASCADE_SCALE_IMAGE instead

(做了帮助(CV2)来查看更新的常量)

(do a help(cv2) to see the updated constants)

这篇关于OpenCV的3.0.0-dev的Python绑定不能正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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