110 likes | 351 Views
Agenda . Seam-carving: finish up “Mid-term review” (a look back) Main topic: Feature detection. Seam carving: construct an energy image. Define (vertical) seam. All the pixels in the seam are removed (shift row/column) Visual artifacts are visible only along the seam. k=1. k=2. k=M.
E N D
Agenda • Seam-carving: finish up • “Mid-term review” (a look back) • Main topic: Feature detection
Define (vertical) seam • All the pixels in the seam are removed (shift row/column) • Visual artifacts are visible only along the seam k=1 k=2 k=M Slide credit: Andrea Tagliasacchi
Define cost function for seam How to efficiently compute s* ? Energy function: (gradient) let I be an n×m image and define a vertical seam to be: Optimal seam s* that minimizes this seam cost :
Find best seam with dynamic progamming For M row by N column image: Scan every row in the image fromi=2 toi=M updating with local best choice j-1 j j+1 Mi,j= cost of best seam from top row (i=1) down to pixel i,j i-1 i In thefinal bottomrow we pick the smallest entry Mij (for i=M) and we backtrack a path choosing always the local minima Slide credit: Andrea Tagliasacchi
pi,j pi,j+1 x y y T S pi+1,j pi+1,j+1 x Alternative formulation: mincut on a graph x pi,j pi,j+1 y y pi+1,j pi+1,j+1 x • Each pixel is a node that’s connected to its 4 neighbors and a “source” and “terminal” • Weight edges appropriately (eg, gradient magnitude) • Find minimum cost cut that separates S and T – this is a “graphcut” problem • Graphcuts is a very common tool in pixel labeling problems • Can solve mincut/maxflow problem (cf, Algorithms textbook) • With a particular choice of of weights on edges, the min cut is equivalent to DP soln (c) ariel shamir
Extension to video: 3D graph of pixels Frame t+2 Time Frame t+1 Frame t Video Cube (c) ariel shamir
3D Graph Cut Video Cube (c) ariel shamir
Halfway done with course; take a breather • Midway evaluation form is posted on EEE • First-time course, so please provide feedback!
A look back • Part I: Introduction • Camera optics • Color • Fourier/filtering • Part II: (Photography) Image enhancement • Texture synthesis • Texture models: histograms of textons/filter responses • Markov models: sampling from conditional probability tables • Image blending • Gradient-domain editing • Constrained optimization (lagrangian techniques) • Image matting • Compositing • Bayesian modeling • Gaussian color models • Image retargeting (resizing) • Dynamic programming • Combinatorial optimization (graphcuts) • Part III: (Vision) Visual analysis • Feature matching • Mosaicing/stitching images • Recognition (finding and recognizing faces)