270 likes | 403 Views
Solving Poisson Equations Using Least Square Technique in Image Editing. Colin Zheng Yi Li. Roadmap. Poisson Image Editing Poisson Blending Poisson Matting Least Square Techniques Conjugate Gradient With Pre-conditioning Multi-grid. Intro to Blending. source. target. paste. blend.
E N D
Solving Poisson Equations Using Least Square Technique in Image Editing Colin Zheng Yi Li
Roadmap • Poisson Image Editing • Poisson Blending • Poisson Matting • Least Square Techniques • Conjugate Gradient • With Pre-conditioning • Multi-grid
Intro to Blending source target paste blend
Into to Matting I = α F + (1 – α) B ∇I = (F −B)∇α+ α∇F +(1− α)∇B ∇I ≈ (F −B)∇α
Poisson Matting with
Poisson Matting with with
Conjugate Gradient Method • Problem to solve: Ax=b • Sequences of iterates: x(i)=x(i-1)+(i)d(i) • The search directions are the residuals. • The update scalars are chosen to make the sequence conjugate (A-orthogonal) • Only a small number of vectors needs to be kept in memory: good for large problems
Initialized as the source image (50 iterations) Initialized as the target image (50 iterations) Conjugate Gradient: Starting
Precondition • We can solve Ax=b indirectly by solving M-1Ax= M-1b • If (M-1A) <<(A), we can solve the latter equation more quickly than the original problem. * If max and min are the largest and smallest eigenvalues of a symmetric positive definite matrix B, then the spectral condition number of B is
Symmetric Successive Over Relaxation (SSOR) Barrett, R.; Berry, M.; Chan, T. F.; Demmel, J.; Donato, J.; Dongarra, J.; Eijkhout, V.; Pozo, R.; Romine, C.; and Van der Vorst, H. Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods, 2nd ed. Philadelphia, PA: SIAM, 1994.
Precondition (Cont) Step=0 Step=5 Step=10 Step=20 Step=40 Without Precondition Without Precondition
Precondition Demo (20 iterations)
Multigrid Use coarse grids to computer an improved initial guess for the fine-grid.
Multigrid: Different Starting Initialized as Target (bad starting)
Multigrid (Cont) Looser threshold for the coarse grids:
Multigrid + Precondition Combine Multigrid with Precondition
Conclusion • Applications • Poisson Blending • Poisson Matting • Least Square Techniques • Conjugate Gradient • With Pre-conditioning • Multi-grid • Performance Analysis • Sensitivity • Convergence