Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

IMREAD_GRAYSCALE error in facerec_demo.py

Trying to run FaceRecognizer in Python (see (http://code.opencv.org/projects/opencv/repository/revisions/master/entry/samples/python2/facerec_demo.py) and (http://answers.opencv.org/question/253/broken-python-bindings-with/), but I'm stuck. I'm running python 2.7 in Ubuntu Precise on a 64 bit HP G62. I opened up a terminal, cd'd to the working directory, entered: python facerec_demo.py <single space="">path to orl_faces<single space="">path to empty data directory I created for out_dir and I'm getting the following error: Unexpected error: <type 'exceptions.attributeerror'=""> Traceback (most recent call last): File "facerec_demo.py", line 100, in <module> [X,y] = read_images(sys.argv[1]) File "facerec_demo.py", line 75, in read_images im = cv2.imread(os.path.join(subject_path, filename), cv2.IMREAD_GRAYSCALE) AttributeError: 'module' object has no attribute 'IMREAD_GRAYSCALE' Any guidance? regards, Richard

IMREAD_GRAYSCALE error in facerec_demo.py

Trying to run FaceRecognizer in Python (see (http://code.opencv.org/projects/opencv/repository/revisions/master/entry/samples/python2/facerec_demo.py) and (http://answers.opencv.org/question/253/broken-python-bindings-with/), but I'm stuck.

I'm running python 2.7 in Ubuntu Precise on a 64 bit HP G62. I opened up a terminal, cd'd to the working directory, entered:

python facerec_demo.py <single space="">path to orl_faces<single space="">path to empty data directory path/to/orl_faces path/to/empty/data/directory

I created for out_dir and I'm getting the following error: error:

Unexpected error: 
<type 'exceptions.attributeerror'="">
 'exceptions.AttributeError'>
Traceback (most recent call last): File "facerec_demo.py", 
line 100, in <module> [X,y] = read_images(sys.argv[1]) File "facerec_demo.py", 
line 75, in read_images im = cv2.imread(os.path.join(subject_path, filename), cv2.IMREAD_GRAYSCALE) AttributeError: 'module' object has no attribute 'IMREAD_GRAYSCALE'

Any guidance? regards, Richard

IMREAD_GRAYSCALE error in facerec_demo.py

Trying to run FaceRecognizer in Python (see (http://code.opencv.org/projects/opencv/repository/revisions/master/entry/samples/python2/facerec_demo.py) and (http://answers.opencv.org/question/253/broken-python-bindings-with/), but I'm stuck.

I'm running python 2.7 in Ubuntu Precise on a 64 bit HP G62. I opened up a terminal, cd'd to the working directory, entered:

python facerec_demo.py path/to/orl_faces path/to/empty/data/directory

I created for out_dir and I'm getting the following error:

Unexpected error: 
<type 'exceptions.AttributeError'>
Traceback (most recent call last): File "facerec_demo.py", 
line 100, in <module> [X,y] = read_images(sys.argv[1]) File "facerec_demo.py", 
line 75, in read_images im = cv2.imread(os.path.join(subject_path, filename), cv2.IMREAD_GRAYSCALE)  AttributeError: 'module' object has no attribute 'IMREAD_GRAYSCALE'

Any guidance? regards, Richard

IMREAD_GRAYSCALE error in facerec_demo.py

Trying to run FaceRecognizer in Python (see (http://code.opencv.org/projects/opencv/repository/revisions/master/entry/samples/python2/facerec_demo.py) and (http://answers.opencv.org/question/253/broken-python-bindings-with/), but I'm stuck.

I'm running python 2.7 in Ubuntu Precise on a 64 bit HP G62. I opened up a terminal, cd'd to the working directory, entered:

python facerec_demo.py path/to/orl_faces path/to/empty/data/directory

I created for out_dir and I'm getting the following error:

Unexpected error: 
<type 'exceptions.AttributeError'>
Traceback (most recent call last): File "facerec_demo.py", 
line 100, in <module> [X,y] = read_images(sys.argv[1]) File "facerec_demo.py", 
line 75, in read_images im = cv2.imread(os.path.join(subject_path, filename), cv2.IMREAD_GRAYSCALE) 
AttributeError: 'module' object has no attribute 'IMREAD_GRAYSCALE'

Any guidance? regards, Richard