color transfer in correlated color space xuezhong xiao, computer science & engineering...

24
Color Transfer in Correlated Color Space Xuezhong Xiao , Computer Science & Engineering Department , Shanghai Jiao Tong University Lizhuang Ma. , Computer Science & Engineering Department , Shanghai Jiao Tong University Computer vision and Pattern Recognition 2006

Post on 22-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Color Transfer in Correlated Color Space

Xuezhong Xiao , Computer Science & Engineering Department , Shanghai Jiao Tong University

Lizhuang Ma. , Computer Science & Engineering Department , Shanghai Jiao Tong University

Computer vision and Pattern Recognition 2006

Page 2: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Introduction

Conveying the color characteristic of a warm-tone photograph (a) to a cold-tone one (b) in RGB color space.

Page 3: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Introduction

• Recently there were several important works about color alteration introduced to computer graphics community, including color transfer [ Reinhard et al. 2001] and colorization [Welsh et al.

2002][Levin et al. 2004][Ironi et al. 2005] and its reverse processing [Gooch et al. 2005].

• Our approach alters target image's color through a series of transformations that include translation, scaling and rotation, derived from these statistics- mean and covariance of the target and source images.

Page 4: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Color transfer between images- [Reinhard et al. 2001]

RGB lab RGB

Page 5: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Transferring color to greyscale images- [Welsh et al. 2002]

Page 6: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Colorization using optimization- [Levin et al. 2004]

Page 7: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Colorization by example- [Ironi et al. 2005]

Page 8: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Color2Gray: salience-preserving color removal- [Gooch et al. 2005]

Page 9: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

• We develop a statistics-based method that can achieve the goal in RGB color space just utilizing the statistics-mean and covariance matrix.

• The essence of our method is moving data points of source image by scaling, rotation and translating to fit data points‘ cluster of target image in RGB color space.

Page 10: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

• First, we calculate the mean of pixel data along the three axes and the covariance matrix between the three components in color space for both the source and target images.

• All of the statistics are denoted by

(Rsrc, Gsrc, Bsrc), (Rtgt, Gtgt , Btgt ), Covsrc and Covtgt , respectively.

Page 11: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

• We decompose the covariance matrices using SVD algorithm, namely,

Cov =U Λ V‧ ‧ T

– U and V are orthogonal matrices and are composed of the eigenvectors of Cov

– Λ=diag( λR, λG, λB)– λR, λG, λB are the eigenvalues of Cov

– U is a rotation matrix to manipulate pixels of the source image in the next step

Page 12: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

• Last, we do a transformation as follows:

I = Tsrc R‧ src S‧ src S‧ tgt R‧ tgt T‧ tgt I‧ tgt

– I = (R, G, B, 1)T

– Itgt = (Rtgt , Gtgt , Btgt , 1)T

– Tsrc, Ttgt , Rsrc, Rtgt , Ssrc and Stgt denote the matrices of translation, rotation and scaling

Page 13: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

Page 14: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

Page 15: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

Page 16: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

The mean is the center coordinates of an ellipsoid, and the eigenvalues and eigenvectors of the covariance matrix indicate the length and orientation of the three axes of the ellipsoid.

Page 17: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

Page 18: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Statistics-based Method

Page 19: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Swatch-based Transfer

• When we transfer one image's appearance to another, it's possible to select source and target images that don't work well together.

• The result's quality depends on the images' similarity in composition.

Page 20: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Swatch-based Transfer

Page 21: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Swatch-based Transfer

• We formulate Reinhard’s approach and provide some parameters for more flexible user interaction.1. select separate swatches from the source and

target images

2. calculate swatches' statistics-the mean and covariance matrices and transfer target image for the different swatch pairs

3. compute the distances from each pixel in the intermediate images to the center of each fitting ellipsoid of target swatch data.

Page 22: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Swatch-based Transfer4. We blend the pixels with same coordinates in separate result

images with weights inversely proportional to these distances, yielding the final color.

– I = (R, G, B)T is the final result's color– wij are the weights according to the distances between pixel data and

the center of swatches– Ij = (Rj, Gj, Bj)T are the intermediate images' data corresponding to

separate target swatches– m and n are the numbers of swatches in the source and target image– ai is the ratio of the corresponding swatch's area in the whole

Page 23: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Results

Page 24: Color Transfer in Correlated Color Space Xuezhong Xiao, Computer Science & Engineering Department, Shanghai Jiao Tong University Lizhuang Ma., Computer

Results