1 / 14

CS 585 Computational Photography

CS 585 Computational Photography. Nathan Jacobs. Today’s Agenda. Group discussion Assignment 1 S eam carving assignment Recap from last time Gradient Domain/Poisson Image Editing. some terminology. compositing : combining two (or more) images often using an alpha channel

melody
Download Presentation

CS 585 Computational Photography

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 585 Computational Photography Nathan Jacobs

  2. Today’s Agenda • Group discussion • Assignment 1 • Seam carving assignment • Recap from last time • Gradient Domain/Poisson Image Editing

  3. some terminology • compositing: combining two (or more) images • often using an alpha channel • how do you transition between images? • segmentation: dividing image up into regions of “similar” pixels • matting: soft segmentation to pull an object from the background

  4. Laplacian Pyramids lowpass Images (gaussian) bandpass Images (laplacian)

  5. laplacian level 4 laplacian level 2 laplacian level 0 left pyramid right pyramid blended pyramid

  6. LaplacianPyramid Blending • We decomposed our image into a set of Difference-of-Gaussian images and a low-res image • Now lets look at 1storder derivatives (gradients)

  7. Gradient Domain • Let us now look at 1st order derivatives (gradients): • No need for low-res image • captures everything (up to a constant) • Idea: • Differentiate • Blend • Reintegrate

  8. James McCann and Nancy S. Pollard. Real-time Gradient-domain Painting, ACM Transactions on Graphics (SIGGRAPH 2008),

  9. code for 1D gradient blending • mask = double(im1 > 15); • im1 = 1:30; im2 = 5*sin(linspace(0,15,30)); • im1g = gradient(im1); • im2g = gradient(im2); • imBlend = mask.*im1 + (1-mask).*im2; • imBlendGradient = mask.*im1g + (1-mask).*im2g; • imBlendGradient(1) = imBlend(1); % fix one value (should really fix both ends) • imBlendGradient = cumsum(imBlendGradient); % reintegrate • figure(1); • subplot(2,2,1), plot(im1), title('signal one') • subplot(2,2,2), plot(im2), title('signal two') • subplot(2,2,3), plot(imBlend), title('direct blending') • subplot(2,2,4), plot(imBlendGradient), title('gradient blending')

  10. Gradient Domain Blending (2D) • Trickier in 2D: • Take partial derivatives dx and dy (the gradient field) • Fiddle around with them (smooth, blend, feather, etc) • Reintegrate • But now integral(dx) might not equal integral(dy) • Find the most agreeable solution • Equivalent to solving Poisson equation • Can use FFT, deconvolution, multigrid solvers, etc. • Show linear constraints on board…

  11. Perez et al., 2003

  12. Perez et al, 2003 • Limitations: • Can’t do contrast reversal (gray on black -> gray on white) • Colored backgrounds “bleed through” • Images need to be very well aligned editing

  13. next time • Graph Cut Based Methods • read: • Lazy Snapping, Yin Li, Jian Sun, Chi-Keung Tang, and Heung-YeungShum. April 2004 • GrabCut (Rother et al. ’04)

More Related