0

Is there any theory or image filter for whitening the skin color in an image on iPhone ?

I have the RGB data on hand. But whatever I change, it cannot archieve my needs. I alter the RGB as follows:

New value of R/G/B = (int)roundf(Old R/G/B - 128) * contrast_value + 128 + brightness_value);

Where contrast_value = 1 to 1.3 and brightness_value = 0 to 50

But I found that it comes to pale yellow ...

SkyEagle888
  • 1,009
  • 2
  • 18
  • 42
  • 2
    Next you'll be wondering how to apply this outside of the iPhone... Kind of a scary question. (And honestly hard to imagine a typical use case. Why do you need to lighten the skin tones separately from the rest of an image?) – Cody Gray - on strike Feb 28 '11 at 10:23
  • A camera application with a WHITENING filter. So whenever a photo is taken, user can adjust to make the face of person more white – SkyEagle888 Mar 02 '11 at 23:40

2 Answers2

2

Convert your image to YUV colorspace first. This gives you two advantages:

  1. easily detect skin areas using this approach (see my answer to that question)
  2. easily increase the brightness (just increment the Y value)
Community
  • 1
  • 1
mpenkov
  • 21,621
  • 10
  • 84
  • 126
0

One thing I have seen to work is to add a constand value to all the three components of the color, like R + 0x33 G + 0x33 B + 0x33

EDITED: I just found another thread that has additional information: Programmatically Lighten a Color

Community
  • 1
  • 1
Krishna
  • 1,871
  • 14
  • 26