I'm trying to figure out a way to use the facial recognition software within iOS 5 to detect objects. Currently, I'm using Xcode 4.2 and have a sample of code from here: http://maniacdev.com/2011/11/tutorial-easy-face-detection-with-core-image-in-ios-5/
I would like to redefine what "eyes" and "mouth" is to allow the app to distinguish objects.
Can anyone help me out with this problem?
Thank You!
Face detection algorithms typically work by searching for image features (e.g, certain patterns of gradients) that are specific to the human face. They cannot be used to detect other arbitrary objects.
There are no public APIs for modifying the face detector. You will have to find other image processing software to detect your non-face objects.
Check out Open CV. It should be able to do object recognition. Here is a post about building it for iPhone. http://lambdajive.wordpress.com/2008/12/20/cross-compiling-for-iphone/
Related
I am creating one application with face processing. How may i create face animation?
Is there any library which i can use?
How to face track once capturing image of face?
Please help me
As far as I am aware there is no completely free library to track facial expressions - which i think is what you need to produce aniamtion.
However, there is a commerical library for iOS (and other platforms) here: http://www.image-metrics.com/livedriver/overview/
This is available under a trial license and also a free educational licence. I believe it will do what you want.
Your other option is to develop you own facial feature tracking system using something like OpenCV: http://opencv.org/
Thats going to be a challenge though.
Face detection is already included in CoreImage (CI), see
http://www.bobmccune.com/2012/03/22/ios-5-face-detection-with-core-image/
If you want face recognition, you have to do something on your own, but there are some tutorials available - most of them using OpenCV.
Is there any library alternative to OpenCV which detects smile.
I dont want to use OpenCV as it sometimes fails to detect faces due to background.
Any one knw other library ? other than OpenCV ?
I would recommend having a look at The Machine Perception Toolbox (MPT Library).
I had a chance to play with it a bit at an Openframeworks OpenCV workshop at Goldsmiths and there is a c++ smile detection sample available.
I imagine you can try the MPT Library for iPhone with openframeworks or simply link to the library from an iphone project.
sometimes fails to detect faces due to
background.
An ideal lighting setup will guarantee better results, but given that you want to use this on a mobile device, you must inform your users that smile detection might fail under extreme conditions (bad lighting)
HTH
How are you doing smile detection? I can't see a smile-specific Haar dataset in the default OpenCV face detection cascades. I suspect your problem is training data rather than OpenCV itself.
Egawer is a good starting point if you need a working app to begin with.
https://github.com/Atrac613/egawer-iOS
I checked the training images of smileD_haarcascade_v0.05, an found that they include the full face. So, it seems to be a "smiling face" detector rather than a smile detector alone. While this seems easier, it can also be less accurate.
The best is to create your own Haar Cascade XML file, but admittedly most of us developers don't have time for that. You can improve the results considerably by equalizing the brightness of the image.
iOS 7 now has native support of simile detection in CoreImage. Here is the API diff:
For iOS 7, Yes, now you can do it with CoreImage.
Here is the API diff in iOS 7 Beta 2:
CoreImage
CIDetector.h
Added CIDetectorEyeBlink
Added CIDetectorSmile
I want to build a similar app as fatbooth and want some ideas on how to do this. I googled for Image morphing in iPhone but didn't find anything. Should I use some server side language to morph Image?
Any help would be much appreciated!
Thanks
Saurabh
The only language you can really use is C# or c++. the maths is very complicated although I am sure you can get a book or two that cover image manipulation.
I don't know if there is an open source morphing framework, but that is your best option - it doesn't have to be specific to the iPhone, but the integration will be hard.
I don't know what you mean about server side, unless there is a server you know of that does it and you want a wrapper around it
For starters, take a look at displacement mapping: http://www.imagemagick.org/Usage/mapping/
Basically, you use grayscale images to bloat/shrink/squeeze/etc parts of a person's face. I made an app called FaceCraze which had to implement a poor man's FatBooth as part of the face transformation, and I used grayscale images very similar to the examples in http://www.imagemagick.org/Usage/mapping/#spherical
edit: You can use the ImageMagick library in your iOS apps too: Link
I want to develop an application for iPhone in xcode and integrate face recognition in the application to correspond to other application functions but I do not know how it is possible to use face recognition in my application. Any ideas?
Check out this Wikipedia page. It has a lot of references to algorithms, applications, etc.
Check out OpenCV. Here's a blog post that should help get you started:
http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en
See the Apple published iOS sample code that implements face detection called
SquareCam. --
Integrating with CoreImage's new CIFaceDetector to find faces in a real-time VideoDataOutput, as well as in a captured still image. Found faces are indicated with a red square.
I hope this falls within the "programming question" category.
Im all lightheaded from Googling (and reading every post in here on the subject) on the subject "Computer Vision", but Im getting more confused than enlightened.
I have 6 abstract shapes printed on a piece of paper and I would like to have the camera on the iPhone identify these shapes (from different angles, lightning etc.).
I have used OpenCV a while back(Java) and I looked at other libraries out there. The caveat is that it seems that either they rely on a jail broken iPhone or they are so experimental and hard to use that I would probably end up using days learning libraries only to figure out they didn't work.
I have thought of taking +1000 images of my shapes and training a Haar filter. But again
if there is anything out there that is a bit easier to work with I would really appreciate the advise, suggestion of people with a bit of experience.
Thank you for any suggestion or pieces of advise you might have:)
Have a look at at OpenCV's SURF feature extraction (they also have a demo which uses it to detect objects).
Surf features are salient image features which are invariant to rotation and scale. Many algorithms detect objects by extracting such features from an image, and then use simple "bag of words" classification (comparing the set of extracted image features to the features of your "shapes". Even without referring to their spacial alignment you can have good detection rates if you only have 6 shapes).
While not a library, Chris Greening explains how iPhone Sudoku Grab does its image recognition of puzzles in his post here. He does seem to recommend OpenCV, and not just for jailbroken devices.
Also Glen Low talks a bit about how Instaviz does its shape recognition in an interview for the Mobile Orchard podcast.
I do shape recognition in my iPhone app Instaviz and the routines are actually packaged into a library I call "Recog". Only problem is that it is meant for finger or mouse gesture recognition rather than image recognition. You pass the routines a set of points representing the gesture and it tells you whether it's a square, circle etc.
I haven't yet decided on a licensing model but probably use a minimal per-seat royalty.