6

You know those iPhone applications that fatten your face, make you look older, etc...

How do they work? If I wanted to know how to code something similar in Objective C, where would you point me to start on the implementation of that portion of code?

If you are well versed in PHP, how would you do it in GD or similar?

Pseudo code is fine.

Thanks.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
alex
  • 479,566
  • 201
  • 878
  • 984

3 Answers3

3

From other apps I have done in Flash, its by overlaying PNG images eg with lines and wrinkles. I can imagine that some of the images would be tinted to fit you skin tone.

Some of the other smart things they do is use OpenCV for the iPhone to detect where the persons eyes, nose and mouth are so they can overlay images more accurately.

I think with FatBooth, they are doing some sneaky image stretching doing pixel by pixel image manipulation around where they think the chin and other areas of the face. I don't think you will find a simple example with a simple filter. I think its a real mixture of techniques.

John Ballinger
  • 7,380
  • 5
  • 41
  • 51
1

GD doesn't have Imagick's capability to morphImages()

alex
  • 479,566
  • 201
  • 878
  • 984
bcosca
  • 17,371
  • 5
  • 40
  • 51
0

you can access the raw pixel data like so, How to get pixel data from a UIImage (Cocoa Touch) or CGImage (Core Graphics)?

What you do with that data depends greatly on what you want to achieve. As @stillstanding hinted at, you'll probably want to find an open source library capable of morphing that has been ported to iOS.

Community
  • 1
  • 1
Kenny Winker
  • 11,919
  • 7
  • 56
  • 78