Image Color Transferer

This Python program takes two images and samples their color space after transforming them to L*a*b* color space which is linear, unlike RGB. This then allows the colors gradients from one image to be applied to another like a filter.

Top ▶
Some results from my script.

Source, Target, Result

source1 target1 target1

Source, Target, Result

target1 target1 target1
Method

To do this, the color spaces of the image must be seperated out and then multiplied by the matrix provided in this paper. This matrix is then used as a filter on the target image.

This image shows how L*a*b* color space is linear and flat, rather than having the hue being part of the gradient which can be seen as a part of the RGB color space.

labcolorspace

Image from: https://docs.esko.com/docs/en-us/packproof/16/userguide/home.html#en-us/common/pp/concept/co_pp_QuantifyingColors.html

RGB color space with hue as a part of it's nonlinear gradient:

RGB color space

Image from: https://upload.wikimedia.org/wikipedia/commons/5/53/CIExy1931_AdobeRGB.png