color-matcher

Description

color-matcher enables color transfer across images which comes in handy for automatic color-grading of photographs, paintings, film sequences or light-fields. The methods behind the mappings are based on the Monge-Kantorovich solution as proposed by Pitie et al., the approach by Reinhard et al. and histogram matching.

release build PyPi Dl2

Results

Photography

Source image

Target colors

Result

Film sequences

Source sequence

Target colors

Result

Light-field corrections

Raw light-field

Target colors

Result

Paintings

Source image

Target colors

Result


Installation

  • via pip:
    1. install with pip3 install color-matcher

    2. type color-matcher -h to the command line once installation finished

  • from source:
    1. install Python from https://www.python.org/

    2. download the source using git clone https://github.com/hahnec/color-matcher.git

    3. go to the root directory cd color-matcher

    4. load dependencies $ pip3 install -r requirements.txt

    5. install with python3 setup.py install

    6. if installation ran smoothly, enter color-matcher -h to the command line

Command Line Usage

From the root directory of your downloaded repo, you can run the tool on the provided test data by

color-matcher -s './test/data/scotland_house.png' -r './test/data/scotland_plain.png'

on a UNIX system where the result is found at ./test/data/. A windows equivalent of the above command is

color-matcher --src=".\\test\\data\\scotland_house.png" --ref=".\\test\\data\\scotland_plain.png"

Alternatively, you can specify the method or select your images manually with

color-matcher --win --method='hm-mkl-hm'

More information on optional arguments, can be found using the help parameter

color-matcher -h