Skip to content

Simple, effective colour transfer using linear algebra. Supports arbitrary image masking for selective transfer.

Notifications You must be signed in to change notification settings

fyz11/Linear-Colour-Transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linear-Colour-Transfer

Simple, effective colour transfer using linear algebra. Supports arbitrary image masking for selective transfer.

  • Given a source image (reference) and a target image (image to be recolored) this repo performs fast linear colour transfer based on similarity transform in RGB vector space.
  • based upon the histogram matching method outlined in Gatys, Leon A., et al., "Controlling perceptual factors in neural style transfer." IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2017."
  • Code is adapted from and extends the code in the repo of https://github.com/ProGamerGov/Neural-Tools.git.
  • The primary extension is that now colour can be arbitrarily sampled from a reference image using binary masking and applied selectively to a target image also using binary masking (see examples).
  • This method is much more stable than simple matching of mean and standard deviation (see baseline example comparison).

Examples

Baseline Example baseline_example

Example 1: Full colour transfer based on a reference image example_1

Example 2: Selective recoloring using image masking on the target image example_1

Example 3: Selective color sampling from reference image and selective recoloring on the target image example_1

About

Simple, effective colour transfer using linear algebra. Supports arbitrary image masking for selective transfer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages