我成功地使用了OpenCV 3.1.0,然后加入了额外的内容:
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
我认为Face模块也可以:
$~/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
但是,我无法在Python中导入Face模块:
>>> import cv2
>>> cv2.face
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'face'
到底是什么?任何帮助表示赞赏。