iPhone: Face recognition feature
I have a requirement where I need to recognize the face and should be able to apply some kind of filters(or templates) so that eyes becom开发者_开发问答e big/small, able to add moustache, change hair etc. I will have all related graphics ready. I just need to recognize the area of eyes, hair etc and apply those graphic to change the face!
Please let me know if anyone could help to get me into right direction.
Thanks.
In iOS5 SDK you can detect faces in a CIImage
by creating a CIDetector
of type CIDetectorTypeFace
.
And then get the list of CIFaceFeature
objects with the method:
- (NSArray *)featuresInImage:(CIImage *)image
You can even get the position of the eyes and the mouth.
精彩评论