Ask Your Question

OpenCV 3.1.0 Face module built , can't import in Python

asked 2016-01-25 02:02:22 -0500

Dogacan gravatar image

I cmaked OpenCV 3.1.0 with success and then cmaked extras:

cmake -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..
sudo make
sudo make install
sudo ldconfig

I think Face module is OK also:

$~/opencv/build/lib$ ls*

/usr/local/lib$ ls libopencv_face*

However, I can't import Face module in Python:

>>> import cv2
>>> cv2.face
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'face'

Thanks in advance.

edit retag flag offensive close merge delete


can you try a quick cv2.__version__ or cv2.getBuildInformation() ?

maybe you had an older version around, and are still using that

berak gravatar imageberak ( 2016-01-25 02:06:59 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-25 04:52:12 -0500

Dogacan gravatar image

OK, problem solved.:) I deleted everything and make a clean build by cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..

I can import face module now, but didn't try the functionality:) I have OpenCV3.1 by the way.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-01-25 02:02:22 -0500

Seen: 702 times

Last updated: Jan 25 '16