Ask Your Question
0

create Facerecognition dataset [closed]

asked 2016-12-23 15:10:15 -0600

vicky9009 gravatar image

I have created facerecognition sample(javacv) where i can detect and save images of faces real time. when i tried to recognize this faces again that time got this error: OpenCV Error: Unsupported format or combination of formats (In the Eigenfaces method all input samples (training images) must be of equal size! Expected 26896 pixels, but was 26244 pixels.) in cv::face::Eigenfaces::train, file

is there any way where i can use this images for recognition(or training)

how can i make all captured images with same size and pixel Highgui.imwrite(String.valueOf(System.currentTimeMillis()) + ".jpg", faceImage); am using above statment to save detectd faces.

how can i convert captured images in to dataset

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by LBerger
close date 2016-12-24 08:57:06.079214

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-12-24 01:58:19 -0600

berak gravatar image

all input samples (training images) must be of equal size!

yes, this is true. so just resize them before saving:

Imgproc.resize(faceImage, faceImage, new Size(100, 100));

also don't forget, that you'll have to do the same for the test images later !

edit flag offensive delete link more

Comments

Solved !! Thanks :)

vicky9009 gravatar imagevicky9009 ( 2016-12-24 08:43:06 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-12-23 15:10:15 -0600

Seen: 536 times

Last updated: Dec 24 '16