I'm working on a Curves tool and i need to adjust all three channels at once using one curve. (RGB Curve)
Internally, the class i created for the counting gets a set of control points the curve should go through and then has method that returns resulting value for given input (and also a look-up-table - which is basically a table telling me that every pixel with RED intensity set to 50 should have this intensity set to 150, and like that for every intensity [0 - 255] - 8bit channels).
Now, i can get a channel (for example RED) from an RGB image and apply the look-up-table to it, and I can do it separately, but I don't know what method of aplication to use for all three channels?
The think I'm thinking about is applying the LUT (look-up-table) three times - once to each of the channels, but I'm not sure if it is the desired behavior. Is it correct, or should i apply it another way? (compute some "median value" for each pixel, apply the LUT and reverse compute all three channel values? etc.)
My knowledge of photography and image processing is basically zero - aside from the programming part and basic theory.