Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

opencv 3.0 is slightly different. you will have to get and build the opencv_contrib repo, and then there is a new 'face' submodule (namespace):

>>> help(cv2.face)
Help on module cv2.face in cv2:

NAME
    cv2.face

FILE
    (built-in)

FUNCTIONS
    createEigenFaceRecognizer(...)
        createEigenFaceRecognizer([, num_components[, threshold]]) -> retval

    createFisherFaceRecognizer(...)
        createFisherFaceRecognizer([, num_components[, threshold]]) -> retval

    createLBPHFaceRecognizer(...)
        createLBPHFaceRecognizer([, radius[, neighbors[, grid_x[, grid_y[, thres
hold]]]]]) -> retval

so, you will have to use : cv2.face.createEigenFaceRecognizer(),

[edit] : this is the opencv3.0 answer, interfaces changed in later versions, please look at @supra56 ' answer below

opencv 3.0 is slightly different. you will have to get and build the opencv_contrib repo, and then there is a new 'face' submodule (namespace):

>>> help(cv2.face)
Help on module cv2.face in cv2:

NAME
    cv2.face

FILE
    (built-in)

FUNCTIONS
    createEigenFaceRecognizer(...)
        createEigenFaceRecognizer([, num_components[, threshold]]) -> retval

    createFisherFaceRecognizer(...)
        createFisherFaceRecognizer([, num_components[, threshold]]) -> retval

    createLBPHFaceRecognizer(...)
        createLBPHFaceRecognizer([, radius[, neighbors[, grid_x[, grid_y[, thres
hold]]]]]) -> retval

so, you will have to use : cv2.face.createEigenFaceRecognizer(),