Download presentation
Presentation is loading. Please wait.
Published byArchibald Anthony Modified over 9 years ago
1
Computational Photography Final project Image blending Student :杜 寧 Student ID : 601410050
2
Outline Motivation Program design Methods of operation Limitation Demo Reference
3
Motivation 市面上已經有許多完善的圖像處理工具,但我們卻 不知道這些程式背後運用了哪些理論才能實作出來。 這次在計算攝影學課程中學到許多關於處理影像的 方法,加上曾經在網路上看過很多有趣的合成照片, 想藉此機會實作出 Image blending 。
4
Program design Minimize squared difference between gradients of foreground region and gradients of target region. Keep background pixels constant. Given the pixel intensities of the source image "s" and of the target image "t", we want to solve for new intensity values "v" within the source region "S": Each "i" is a pixel in the source region "S", and each "j" is a 4-neighbor of "i". In the first summation, the gradient is over two variable pixels; in the second, one pixel is variable and one is in the fixed target region.
5
Program design(cont) Implemented the mixed gradient blending : This algorithm does the same steps as Poisson blending. Here "d_ij" is the value of the gradient from the source or the target image with larger magnitude. That means, if the target gradient is greater than the source gradient, then we use the target gradient as the guide, and vice versa. source gradient(i, j) = src(i) – src(j) target gradient(i, j) = tar(i) – tar(j) assume Sg is source gradient(i, j), Tg is target gradient(i, j) d(i, j) = if Tg > Sg then choose Tg else choose Sg
6
Methods of operation 1. Click “Load image” button and then choose the source image from “test_images” browser.
7
Methods of operation(cont) 2. It will show the mask after you used mouse to draw a region that you want to blend with the target image. Mouse down => drawMouse up => finish
8
Methods of operation(cont) 3. Click “Load image” button again to choose the target image, and it will display a figure window. 4. Pull the masked image to a good blending place on target image by mouse down.
9
Methods of operation(cont) 5. Click “Start blending” button and wait the result image to display on the GUI “Result Image” block.
10
Methods of operation(cont) 6. Click “Close” button to exit. (It will show you a pop- up window to ask if you really want to exit.)
11
Limitation Images need to be very well aligned. Cannot do contrast reversal. Changes foreground color(for better or worse).
12
Demo http://youtu.be/dfnX2tFjc8E 1. 2. 3. 連結
13
Reference 上課投影片 Chapter27 Blending and Compositing p.38~p.48 Gradient-Domain Fusion http://courses.engr.illinois.edu/cs498dwh/fa2010/projects/gradient/ComputationalPhotog raphy_ProjectGradient.html http://courses.engr.illinois.edu/cs498dwh/fa2010/projects/gradient/ComputationalPhotog raphy_ProjectGradient.html Poisson Image Editing.” Patrick Pérez, Michel Gangnet, and Andrew Blake. SIGGRAPH 2003 http://cs.engr.uky.edu/~jacobs/classes/2010_photo/readings/PoissonImageEditing.pdf Image Blending by Evan Wallace http://cs.brown.edu/courses/csci1950-g/results/proj2/edwallac/ http://cs.brown.edu/courses/csci1950-g/results/proj2/edwallac/
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.