Saturday 9 May 2015

photoshop - How to find curve that correspond to a given transformation?


I am having a little bit of a mathematical approach here... I suppose that all the transformation we can make to an image which operate on one pixel per time (for example levels, saturation, color balance) can just be done with curves.


Is there a way to take the orginal image, the transformed one and find out what curve adjustment can give the same result?



Answer



You say:




I suppose that all the transformation we can make to an image which operate on one pixel per time (for example levels, saturation, color balance) can just be done with curves.



This is not correct. Some examples include converting to monochrome, making the image sepia toned, or even your example of changing the saturation. Increasing the saturation involves moving the maximum of the red, green, and blue channels away from the other 2 channels. (Or if there are 2 maxima, moving them both away from the third channel.) Since curves applies a separate curve to each channel (or the same curve to all channels), there's no way to achieve that sort of effect for all pixels with just an application of curves.


There is, however, a tool that is able to capture all of these things, and that's a look-up table (aka LUT). A 3D LUT has a red axis, a green axis, and a blue axis. Any triple in the input image can be used to look up a new triple in the LUT. You can apply the same LUT to different images to give them a similar look.


You can figure out the LUT if you have a before and after picture. (Or at least you can figure out a good portion of it, if not the whole thing.) You simply take each pixel in the original image, find its coordinates in the LUT and set it to whatever the corresponding pixel in the output is. If your input image covers most of the range from dark to light in most of the colors, you should get back a LUT that performs the same function.


There are a variety of algorithms for automating the copying of styles from one image to another one. They often do more than just color transfers. Here are a few:



No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...