Ask Your Question
0

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

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

Dogacan gravatar image

I cmaked OpenCV 3.1.0 with success and then cmaked extras:

cmake -D CMAKE_BUILD_TYPE=RELEASE   -D CMAKE_INSTALL_PREFIX=/usr/local -D     BUILD_PYTHON_SUPPORT=ON ..
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 libopencv_face.so*
libopencv_face.so  libopencv_face.so.3.1  libopencv_face.so.3.1.0

/usr/local/lib$ ls libopencv_face*
libopencv_face.so  libopencv_face.so.3.1  libopencv_face.so.3.1.0

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

Comments

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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

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

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

Question Tools

1 follower

Stats

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

Seen: 808 times

Last updated: Jan 25 '16