8

I've started work on an application for iOS that would recognize faces from a photo or from the iPhone / iPad camera.

Existing solutions like OpenCV and Core Image (in iOS 5.0) provide facial detection within an image, but I can't find a library or example that matches a face with a person.

Does such a means of performing facial recognition, not just detection, exist for iOS?

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Mateus Nunes
  • 91
  • 1
  • 6
  • You can refer this [tutorial](http://maniacdev.com/2011/11/tutorial-easy-face-detection-with-core-image-in-ios-5/) for face detection. – raaz Nov 05 '11 at 17:35

2 Answers2

5

On iOS 5 you can use CoreImage (CIDetector, CIFeature, CIFaceFeature should be named as the relevant keywords) for that task. Check out the SquareCam example App from Apple, it includes face detection. If you're targeting older iOS versions, openCV seems to be a good approach.

http://developer.apple.com/library/ios/#samplecode/SquareCam/Introduction/Intro.html

Edit_: Argh, soory. CoreImage can only detect faces but not recognize them. But maybe you can build a solution based on CoreImage...

Björn Kaiser
  • 9,882
  • 4
  • 37
  • 57
4

What OpenCV does is called "face detection." This is different than, but related to, face recognition, which is what you seem to want to do.

Face detection "detects" faces by finding the location of facial features such as the eyes, the mouth, etc. To "recognize" these faces, you then need to compare these features with a database of known faces, for which the features have already been detected.

I'm not aware of a face recognition library for iOS, and this is no easy feat. Even Apple's own iPhoto has, in my experience, very low accuracy.

However, if you only want to do face detection, or want to build your own facial recognition algorithm on top of a face detection library, iOS 5 also includes a face detection API. You can find it in the CoreImage framework.

Can Berk Güder
  • 109,922
  • 25
  • 130
  • 137
  • Do you think this could be used to match photos of unrelated people to create a "separated at birth" type app? See: http://en.wikipedia.org/wiki/Separated_at_birth – sberley Mar 21 '13 at 18:18