-1

How to use createLBPHFaceRecognizer() in opencv3.3, and Python 2.7.13?

I Used Windows 64 bit OS

because i find an error in syntax :

import os
import cv2
import numpy as np
from PIL import Image

recognizer = cv2.createLBPHFaceRecognizer()
path='dataSet'

Error : recognizer = cv2.createLBPHFaceRecognizer()

AttributeError: 'module' object has no attribute 'createLBPHFaceRecognizer'

Priyantha
  • 4,839
  • 6
  • 26
  • 46
Willy Andika Putra
  • 281
  • 1
  • 4
  • 4
  • Please refer to this [link](http://answers.opencv.org/question/137349/how-can-i-use-createlbphfacerecognizer-in-opencv32-python3/) – ZdaR Oct 06 '17 at 05:45

1 Answers1

0

You need compile OpenCV from source. Download both opencv and opencv_contrib.

In opencv_contrib source, there is a folder called modules, delete you don't use.

I don't how to compile it on Windows. There(OpenCV 3 Tutorials, Resources, and Guides) are some tutorials for install OpenCV(Linux, macOS, etc), but no Windows version. You can refer to relevant information for compile OpenCV from source on Windows.

tomfriwel
  • 2,575
  • 3
  • 20
  • 47