Ask Your Question
0

"FaceRecognizer.Fisherfaces" [closed]

asked 2013-09-19 01:29:00 -0600

Chochstr gravatar image

updated 2013-09-19 03:17:01 -0600

berak gravatar image

I have tried to follow the tutorial but when i run my code i get an error which says

"OpenCV Error: Unsupported format or combination of formats In the (Fisherfaces method all input samples (training images) must be of equal size! Expected 0 pixels, but was 10304 pixels.) in unknown function, file ...facerec.cpp line 455"

This is thrown on line containing model->train(images, labels);

I'm using this code here.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-10-22 08:07:51.281800

Comments

2

the error means, that your first training image was empty.

  • can you check the images you got on disk ?
  • you probably built some csv file, can you check if it's sane ? maybe there was a non-img file in
    that folder.
berak gravatar imageberak ( 2013-09-19 03:21:58 -0600 )edit

Perfect! Thanks. I checked the path I was pulling in the read_csv function and the first path was garbage because of something. still not sure what, but I erased the garbage data from the first path and now all is well and I have passed this line of code.

Chochstr gravatar imageChochstr ( 2013-09-20 10:18:34 -0600 )edit

nice. took a 2nd look, and in fact, e.g, the att database comes with a readme file at top level ;)

berak gravatar imageberak ( 2013-09-20 10:30:28 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-14 19:25:16 -0600

Chochstr gravatar image

also with the comments above make sure if your in windows the read file is in a encoding of UTF-8 or it will be finding garbage

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-09-19 01:29:00 -0600

Seen: 2,128 times

Last updated: Oct 14 '13