Color transfer is a practical method to change the appearance of a source image according to the color patternof a target image.
This program is the implementation of the paper Color Transfer between Images by Erik Reinhard, Michael Ashikhmin, Bruce Gooch and Peter Shirley.
- Read BMP file (source/target image)
- Calculate the mean and STD of each channel
- Implement the RGB color transfer algorithm
- Convert images from RGB to ℓαβ color space
- Statistics and color correction
pip install numpy
pip install opencv-python
If you want to create EXE file
after programming, also install this:
pip install pyinstaller
Put 6 source picture and 6 target picture inside the source_and_target
folder, then execute the code:
python color_transfer.py
After that, your can find 6 result picture inside result
folder.
Execute following instruction to create EXE file
of this program:
pyinstaller -F color_transfer.py
Source / Target / Result