190 likes | 455 Views
Image Analogies. Shitong Jia. What is image analogies?. Image analogies apply a “relationship” which computed from one pair of source images to a pair of target images. If we are given A:A':: B:_ , we can get A:A':: B:B' but avoid calculating complex and non-linear filters. :. ::. A'. A. :.
E N D
Image Analogies Shitong Jia
What is image analogies? Image analogies apply a “relationship” which computed from one pair of source images to a pair of target images. If we are given A:A':: B:_ , we can get A:A':: B:B' but avoid calculating complex and non-linear filters.
: :: A' A : B B'
Main problem: How to find the best pixel to be copied to B'? The method: Paper: Image Analogies (Hertzmann, 2011)
How to find the match? 1. Build the features a.Transferring images into YIQ color space and use the data in Y channel. b.Building the Guassian Pyramid for A, A' and B. c. Creating a feature vector which contains the neighbor pixels of the pixel in both current level and last coarse level.
Fecture vector for A and A': Fine level: Al: 5*5 pixels Al': L-shape 12 pixels Coarse level: Al-1: 3*3 pixels Al-1': 3*3 pixels The same as B
How to find the match? 2. Search function a.Approximate-nearest-neighbor search (ANN) (p_app) b. Best coherence match (p_coh) Then compare them: if d_coh ≤ d_app(1 + 2^Kappa) then return p_coh else return p_app
Approximate-nearest-neighbor search (ANN) In the nearest neighbor problem a set of data points' features in is given. These datum are preprocessed into a data structure, so that given any query point q, the nearest or generally k nearest points of P to q can be reported efficiently. 1.different kinds of search trees 2.different calculation of distance between two points Advantage: better results Disadvantage: slow
Get best coherence match For each neighborhood pixel of the current pixel in B, find the patch with the correspong position of that pixel in A. Find the the patch with smallest Sum of squared differences with the patch in A. Then copy the pixel in the corresponding A' to B'. B
Another point: Luminance remapping (Only for the color artistic filters) If image A is light and image B is dark, there will be fewer matches. Applying a Luminance remapping in Y channel can improve the result. For both A and A'
Then recovering the color simply by copying the I and Q channels of the input A'(sometimes is the pixel in B) image into the synthesized B' image.Finally transferring back to RGB.
Things to improve: 1.The algorithm is slow, especially after adding coherence match. 2. Better operation for the holes. 3.How to choose the suitable Kappa? 4. What is standard for the evaluation of results?
without changing to YIQ Some results A' A l=3 B result in paper l=1 apply coherence match texture-by-numbers
l=3 image filter(emboss)
without get coherence match l=3 with get coherence match l=1 color artistic filter