Face Recognition using OpenCV

Post on 28-Nov-2014

9.445 views 8 download

Tags:

description

Describing face recognition API exposed by OpenCV for Android. This small API makes use of Android NDK to get the most from OpenCV library.

Transcript of Face Recognition using OpenCV

Face detection in android media apps

Adding more value to applicationsHackathon, Mobile DayEndava24.06.2013

• Face detection/recognition – what’s all about?

• Pioneers in face recognition

• Add value to your media apps

• What we want to…

• Tools & technologies

• How it’s all mixed up?

• How all things work together?

• How can we make it work?

• Some facts

• Don’t forget about privacy

• Q&A

Highlights

2

3IN YOUR ZONE

Face detection/recognition – what’s all about?

•Face detection

• Definition

• Use cases

•Face recognition

•Definition

•Use cases

4IN YOUR ZONE

Pioneers in face recognition

•Marker points (position of eyes, ears, nose)

• Kanade, T. (November 1973) - Euclidean distance between feature vectors of a probe and reference image

• Eigenfaces – Turk, M. & Pentland, A. – a holistic approach to face recognition

• Fisherfaces – Belhumeur, P. N., Hespanha, J., and Kriegman, D. (1997) - Eigenfaces vs. Fisherfaces

• Local feature extraction:

• Gabor Wavelets – Wiskott, L., Fellous, J., Krüger, N., Malsburg, C. (1997)

• Discrete Cosinus Transform – Messer, K. (2006

• Local Binary Patterns – Ahonen, T., Hadid, A., and Pietikainen, M. (2004)

5IN YOUR ZONE

Add value to your media apps

• Face tagging in social media

• Sharing – open new ways to share

6IN YOUR ZONE

Add value to your media apps

•Android Device lock, specific applications face authorization

•Determining friends in video clips

7IN YOUR ZONE

What we want to…

•Detect faces in a specific image

• Recognize a tagged contact in Android Media library

8IN YOUR ZONE

Tools & technologies

9IN YOUR ZONE

How it’s all mixed up?

10IN YOUR ZONE

How all things work together?

11IN YOUR ZONE

How can we make it work?

Mat imgGray = imread(originalImageName, CV_LOAD_IMAGE_GRAYSCALE);CascadeClassifier face_cascade;if(face_cascade.load(cascadeFilePath)){ face_cascade.detectMultiScale(loadedImageData, faces);}

Ptr<FaceRecognizer> recognizer = createLBPHFaceRecognizer();//training modelrecognizer->train(images, labels);

//face predictionrecognizer->predict(scalledFace, predicted_label, predicted_confidence);

Face detection

Face detection

Face recognition

12IN YOUR ZONE

Some facts about face recognition

14 faces 25 faces 40 faces0.00

5.00

10.00

15.00

20.00

25.00

30.00

35.00

40.00

45.00

50.00

Recognition ratio

Local Binary Paths Histogram (LBPH) FisherFaces EigenFaces

Perc

enta

ge

13IN YOUR ZONE

Don’t forget about privacy

•Make use of privacy policies and/or disclaimers

Privacy matters to me!!!That’s why I’m using privacy visor…

14IN YOUR ZONE

Q&A

15IN YOUR ZONE

That’s it…

Vasile Chelban | Android Developer

thank you

http://opencv.org/platforms/android.html

http://developer.android.com/tools/sdk/ndk/index.html

http://developer.android.com/sdk/index.html