Search code examples
iosimageimage-processingreverse-engineeringphotoshop

What's the Math / Algorithm Behind Photoshop's Selective Color Filter?


I'm working on an image-processing software on iPhone and get stuck in the selective color function as photoshop.

How to caculate new RGB values after selective color adjustment on a pixel via code?

I mean how to create a tool which has the same function as Photoshop's selective color(In Image->Adjustment->Selective Color).

Special thx!


Solution

  • Finally I sampled data of images which have be processed by photoshop, and got a quadratic curve with hue. But it is not exactly the same as photoshop's.