Ask Your Question
0

"FaceRecognizer.Fisherfaces" [closed]

asked Sep 19 '13

Chochstr gravatar image

updated Sep 19 '13

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.

Preview: (hide)

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 (Sep 19 '13)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 (Sep 20 '13)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 (Sep 20 '13)edit

1 answer

Sort by » oldest newest most voted
0

answered Oct 15 '13

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

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Sep 19 '13

Seen: 2,180 times

Last updated: Oct 14 '13