dpacmen / colorTrans

Color transfer from source image to target image using openCV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

colorTrans

Color transfer from source image to target image using opencv

Learn open cv from openCV documentation

TransferColor Module

This module is imported in color.py

trans_color function

  1. Convert the images from the RGB to L*a*b* color space

  2. Compute color statistics for the source and target images

  3. Subtract the means from the target image. Scale by the standard deviations

  4. Add in the source mean

  5. Merge the channels together and convert back to the RGB colorspace

In order to run this script

  1. Open terminal
  2. Run command in this sequence : $ python color.py -source source.jpg -target target.jpg

SOURCE IMAGE

image

TARGET IMAGE

image

RESULTANT TRANSFER IMAGE

image

About

Color transfer from source image to target image using openCV

License:MIT License


Languages

Language:Python 100.0%