Implements different methods to transfer colors between images.
Continuation of work on color transferring function for "neural-style". Since it can work alone, maybe someone will find it useful.
Requirements:
- Torch 7 (https://github.com/torch/torch7);
- Torch Image (https://github.com/torch/image).
License:
Public domain.
Usage:
th colorizer.lua -palette_image "gradients.png" -colorized_image "sausage.jpg" -output_image "yummy.png" -recolor_strength 1 -color_function "lab"
-palette_image
– image to take colors from;-colorized_image
– image to recolor;-output_image
– image to save result;-recolor_strength
– -N ... 0 ... 1 ... N, new palette strength, from original colors (0) to fully recolored (1);-color_function
– color transfer mode, currently present are: chol, pca, sym/mkl, rgb, xyz, lab, lms, hsl, hsl-full, hsl-polar, hsl-polar-full, lab-rgb, chol-pca, chol-sym, exp1.
Experimental, don't expect miracles from it.
Based on Leon Gatys's, ProGamerGov's, Adrian Rosebrock's, François Pitié's, mdfirman's code and different research papers (given in descriptions of functions).
Example: