Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to compile Python bindings for FaceRecognizer

I'm trying to use OpenCV's awesome looking face recognition module from python, but it looks like the bindings aren't working.

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

I'm on Ubuntu 10.04 64-bit, using stock python 2.6.5. I compiled OpenCV myself from the 2.4.2 source tarball. Everything else I've tried from the library works fine in python. But none of the face reco stuff seems to be available in Python.

I read in this answer (dated July 11) that "The Python wrapper for cv::FaceRecognizer works now." Seeing that OpenCV 2.4.2 was released about a week before that, do I need to grab the source from the trunk and recompile?