I'm playing with openCV in python. I'd like to use the eigenface algorithm to guess who's in a picture. I tried with
recognizer = cv2.createEigenFaceRecognizer()
and it complains that
'module' object has no attribute 'createEigenFaceRecognizer'
I read around in the internet and found that the submodule 'face' should be used starting form openCV 3, but as I run
recognizer = cv2.face.createEigenFaceRecognizer()
it complains with a
'module' object has no attribute 'face'
I'm puzzled.. Thanks AC
edit - how I installed it:
1. download openCV from http://sourceforge.net/projects/opencvlibrary
2. unpack to ~/opencv
3. download opencv_contrib from https://github.com/Itseez/opencv_contrib
4. unpack to ~/opencv/contrib
5. >cd ~/opencv
6. >mkdir tmp; cd tmp
7. >cmake -D -DOPENCV_EXTRA_MODULES_PATH=~/opencv/contrib/modules CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ~/opencv
8. >make -j5
9. >sudo make install
您可能需要重新构建 opencv以及此处所述的其他模块-opencv_contrib ,如果尚未执行的话。
cmake -D -DOPENCV_EXTRA_MODULES_PATH
that "-D" is the cause of the error
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.