Face Recognition using Eigen and Fisher Face.

2,362 views
Skip to first unread message

Hammad Naeem

unread,
Apr 9, 2013, 1:38:43 PM4/9/13
to jav...@googlegroups.com
I am trying to do face recognition using Eigen and Fisher Face Method..
But I got this error:
"OpenCV Error: Unsupported format or combination of formats (In the Fisherfaces method all input samples (training images) must be of equal size! Expected 10404 pixels, but was 2025 pixels.)"

Same Recognition codes works fine on LBPH but the results are not good..

So need help with this case..

vignesh dhamodaran

unread,
Apr 10, 2013, 12:10:08 AM4/10/13
to jav...@googlegroups.com
hi naeem,
when you use fisherfaces and Eigen faces the training dataset and test image must be of same size . This error indicates that your training samples are of different sizes so choose the image dataset which are of same size say 70x70 . The major constraint in face recognition is that when you extract and crop the faces from the detected faces the size must not exceed the size of the image size if your camera size is 240x320 then the face extracted should be lesser than that size for optimum face recognition. But lbph recogniser doesnot need the images should be of same size  .

Hope your problem is solved.

Regards,
Vignesh.

Hammad Naeem

unread,
Apr 10, 2013, 5:13:09 AM4/10/13
to jav...@googlegroups.com
Hi Vignesh

Thanks for your reply..

I changed the size of the pictures and make all them same, now I am getting this error:

"OpenCV Error: Image step is wrong (The matrix is not continuous, thus its number of rows can not be changed) in unknown function, file ..\..\..\src\opencv\modules\core\src\matrix.cpp, line 801"

What to do with this..??

Regards
Hammad

Hammad Naeem

unread,
Apr 10, 2013, 6:56:09 AM4/10/13
to jav...@googlegroups.com
So i solved the issue of database...


Now no errors but the output is always as Predicted Label: -1..

Samuel Audet

unread,
Apr 14, 2013, 7:04:29 AM4/14/13
to jav...@googlegroups.com
There's a problem with that sample code: It doesn't keep a Java
reference to the images. MatVector is a C++ object and cannot hold Java
references, so they have good chances of getting garbage collected
before they get used.

Let me know if keeping references to the images in an array or something
fixes this, thanks

Samuel

vignesh dhamodaran

unread,
Apr 14, 2013, 10:57:41 PM4/14/13
to jav...@googlegroups.com
Hi Samuel
I am using .save() function to save trained data so it will happen for the first time only so for the next time we can use the load function and we can predict the face . Will this solve the problem? .

Regards
Vignesh

Samuel Audet

unread,
Apr 20, 2013, 9:20:01 PM4/20/13
to jav...@googlegroups.com
On 04/15/2013 11:57 AM, vignesh dhamodaran wrote:
> I am using .save() function to save trained data so it will happen for the first time only so for the next time we can use the load function and we can predict the face . Will this solve the problem? .

Could you remind me of which problem you are trying to solve?
Reply all
Reply to author
Forward
0 new messages