Git Product home page Git Product logo

color_transfer's Introduction

Color Transfer

Getting Started

The color_transfer.hpp header file is an OpenCV implementation based on Color Transfer between Images [Reinhard et al., 2001] and Adrian Rosebrock repository (for Python). The algorithm requires only the mean and standard deviation of pixel intensities for each channel in the Lab* color space.

This is an C++ approach from the above methods, for more information I recommend the above article or Adrian's post on his blog.

Requirements

  • OpenCV
  • boost/program_options*

*Optional - Used to get the input images from terminal

Installing

Just download this repository and use the header file color_transfer.hpp contained in the color_transfer folder.

Running the tests

A example is in sample folder. After compiling it, run the code below

$ ./color_transfer -s ../images/sunset.jpg -t ../images/ocean_day.jpg alt text

$ ./color_transfer -s ../images/autumn.jpg -t ../images/woods.jpg alt text

$ ./color_transfer -s ../images/old_pic.jpg -t ../images/city.jpg alt text

$ ./color_transfer -s ../images/florest_day.jpg -t ../images/florest_dark.jpg alt text

With docker

xhost +local:docker
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -

docker container run --rm -ti \
-e DISPLAY=$DISPLAY \
-v $XSOCK:$XSOCK \
-v $XAUTH:$XAUTH \
-e XAUTHORITY=$XAUTH \
-v /home/${USER}/${FOLDER}/:/lab/images/ 
hsneto/color_transfer ./transfer -s images/${src_image} -t images/${tgt_image} -p images/${output_image}

xhost -local:docker

Authors

  • Humberto da Silva Neto - Initial work

License

MIT LICENSE

Acknowledgments

color_transfer's People

Contributors

hsneto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ddtdt113

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.