Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
653 views
in Technique[技术] by (71.8m points)

opencv 3.0.0-dev python bindings not working properly

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: 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'

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

import cv2
cv2.__version__

it returned the following '3.0.0-dev'

what could be wrong with it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

please use cv2.CASCADE_SCALE_IMAGE instead

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...