Ask Your Question

Gkan's profile - activity

2019-07-20 04:12:32 -0600 received badge  Notable Question (source)
2018-10-31 07:38:21 -0600 received badge  Popular Question (source)
2017-09-18 16:17:30 -0600 received badge  Notable Question (source)
2017-08-06 07:47:46 -0600 received badge  Popular Question (source)
2015-11-22 12:39:31 -0600 received badge  Editor (source)
2015-11-22 12:16:55 -0600 asked a question Opencv LBPHFaceRecognizer Train data in Python

I am working on face recognition with LBPH algorithm and i need to save train data to database.

   recognizer =  cv2.createLBPHFaceRecognizer()
   recognizer.train(images, np.array(labels))

i need to see this train data for each image.

How can I make this ?

2015-11-14 14:20:59 -0600 commented question Opencv3 and Python 2.7 on Virtual Enviorement - AttributeError: 'module' object has no attribute 'createLBPHFaceRecognizer'

I did all of them about install from link but still the same error.

2015-11-10 22:45:13 -0600 asked a question Opencv3 and Python 2.7 on Virtual Enviorement - AttributeError: 'module' object has no attribute 'createLBPHFaceRecognizer'

I have python function with opencv 3. it is normally working without virtual enviorement.Also I installed opencv on venv from:pyimagesearch. i am trying to run that python function on venv, then it is getting error :

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

without venv in terminal:

gkhan@Gkan ~/Masaüstü/face_recognizer $ python face_recognizer.py
Yol :./sinif/114.jpg.
114 Yuz Tanindi 12

with venv in terminal:

gkhan@Gkan ~/Masaüstü/face_recognizer $ workon cv
(cv)gkhan@Gkan ~/Masaüstü/face_recognizer $ python face_recognizer.py
Traceback (most recent call last):
  File "face_recognizer.py", line 15, in <module>
    recognizer = cv2.createLBPHFaceRecognizer()
AttributeError: 'module' object has no attribute 'createLBPHFaceRecognizer'

my python codes:

#!/usr/bin/python
# -*- coding: utf-8 -*-

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

    # For Test
    if 0==0:

        cascadePath = "haarcascade_frontalface_default.xml"
        faceCascade = cv2.CascadeClassifier(cascadePath)

        recognizer = cv2.createLBPHFaceRecognizer()
    ...

Linux Mint 64 Bit, Opencv3, python2.7