Graphics Graphics Korea University cgvr.korea.ac.kr Image Processing 고려대학교 컴퓨터 그래픽스 연구실.

Slides:



Advertisements
Similar presentations
Wavelets Fast Multiresolution Image Querying Jacobs et.al. SIGGRAPH95.
Advertisements

Introduction to compositing. What is compositing?  The combination of two images to produce a single image  Many ways we can do this, especially in.
Morphing & Warping 2D Morphing Involves 2 steps 1.Image warping “get features to line up” 2.Cross-dissolve “mix colors” (fade-in/fadeout transition)
Warping and Morphing.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 5 Ravi Ramamoorthi
Image Compositing and Matting. Introduction Matting and compositing are important operations in the production of special effects. These techniques enable.
2-D IMAGE MORPHING.
2D preobrazba (morphing). 2D preobrazba dekle-tiger.
Feature-Based Image Metamorphosis Thaddeus Beier Shawn Neely SIGGRAPH 1992.
Copyright  Pat Hanrahan Optical Printing From: “Special Optical Effects,” Zoran Perisic From: “Industrial Light and Magic,” Thomas Smith (p. 181)
 P Hanrahan & M Levoy “Pulling a Matte” - Matte Creation From digitized images o Blue-screen matting (Petro Vlahos) Separate blue background from foreground.
1cs426-winter-2008 Notes  More papers to read: T. Duff, "Compositing 3-D rendered images", SIGGRAPH 1985 R. Cook, "Distributed ray tracing", SIGGRAPH.
1 Computer Science 631 Lecture 2: Morphing Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
Copyright  Pat Hanrahan Composing Two Elements Background ForegroundTraveling Matte Holdout Matte * *+ += =
Background Subtraction and Matting : Computational Photography Alexei Efros, CMU, Fall 2006 © Yuri Bonder.
1Notes. 2Atop  The simplest (useful) and most common form of compositing: put one image “atop” another  Image 1 (RGB) on top of image 2 (RGB)  For.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 6: Image Compositing, Morphing Ravi Ramamoorthi
Image Morphing : Rendering and Image Processing Alexei Efros.
Image Morphing Tong-Yee Lee. Image Morphing Animate transitions between two images Specify Correspondence Warping Blending.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 6: Image Compositing, Morphing (brief discussion of reconstruction) Ravi Ramamoorthi
Copyright  Pat Hanrahan Composing Two Elements Background ForegroundTraveling Matte Holdout Matte * *+ += =
CS 4731: Computer Graphics Lecture 21: Raster Graphics Part 2 Emmanuel Agu.
Image warping/morphing Digital Video Special Effects Fall /10/17 with slides by Y.Y. Chuang,Richard Szeliski, Steve Seitz and Alexei Efros.
Painterly Rendering for Animation Barbara J. Meier Walt Disney Feature Animation SIGGRAPH 96.
CS448f: Image Processing For Photography and Vision Denoising.
02/14/02(c) University of Wisconsin 2002, CS 559 Last Time Filtering Image size reduction –Take the pixel you need in the output –Map it to the input –Place.
Image Morphing CSC320: Introduction to Visual Computing
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실.
CS559: Computer Graphics Lecture 6: Edge Detection, Image Compositing, and Warping Li Zhang Spring 2010.
Graphics Graphics Korea University cgvr.korea.ac.kr 2D Geometric Transformations 고려대학교 컴퓨터 그래픽스 연구실.
Geometric Operations and Morphing.
2D Graphics: Rendering Details
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Multiscale Moment-Based Painterly Rendering Diego Nehab and Luiz Velho
Filtering and Color To filter a color image, simply filter each of R,G and B separately Re-scaling and truncating are more difficult to implement: –Adjusting.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 2D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction
Digital Image Compositing. Compositing for volume rendering c1 c2 c3 The initial pixel color = Black opaque Back-to-Front compositing: use ‘under’ operator.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Computer Animation 고려대학교 컴퓨터 그래픽스 연구실.
Advanced Multimedia Warping & Morphing Tamara Berg.
CS559: Computer Graphics Lecture 4: Compositing and Resampling Li Zhang Spring 2008.
CS559: Computer Graphics Lecture 8: Warping, Morphing, 3D Transformation Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
Image 2013, Fall. Image Processing Quantization  Uniform Quantization  Halftoning & Dithering Pixel Operation  Add random noise  Add luminance  Add.
Multimedia Programming 14: Matting Departments of Digital Contents Sang Il Park.
CISC 110 Day 3 Introduction to Computer Graphics.
3D Geometric Transformation
3D Geometric Transformation
Multimedia Programming 10: Image Morphing
Graphics Graphics Korea University cgvr.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
CS559: Computer Graphics Lecture 7: Image Warping and Panorama Li Zhang Spring 2008 Most slides borrowed from Yungyu ChuangYungyu Chuang.
CS559: Computer Graphics Lecture 7: Image Warping and Morphing Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
9/28/04© University of Wisconsin, CS559 Fall 2004 Last Time Filtering –Box –Bartlett –Gaussian –Edge Detect (High-Pass) –Edge Enhance –How to apply filters.
Image warping/morphing Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2005/3/15 with slides by Richard Szeliski, Steve Seitz and Alexei Efros.
CS1315: Introduction to Media Computation
Advanced Computer Graphics
Images, Display, Perception
Image 2016, Fall.
Computational Photography Derek Hoiem, University of Illinois
Hank Childs, University of Oregon
© University of Wisconsin, CS559 Spring 2004
Feature-Based Warping
Morphing WU PO-HUNG.
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Feature-Based Warping
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.
Image Morphing using mesh warp and feature based warp
Computer Graphics Image processing 紀明德
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.
Presentation transcript:

Graphics Graphics Korea University cgvr.korea.ac.kr Image Processing 고려대학교 컴퓨터 그래픽스 연구실

CGVR Graphics Korea University cgvr.korea.ac.kr Image Processing Quantization Uniform quantization Random dither Ordered dither Floyd-Steinberg dither Pixel operations Add random noise Add luminance Add contrast Add saturation Filtering Blur Detect edge Warping Scale Rotate Warps Combining Morphs Composite

CGVR Graphics Korea University cgvr.korea.ac.kr Image Processing Quantization Uniform quantization Random dither Ordered dither Floyd-Steinberg dither Pixel operations Add random noise Add luminance Add contrast Add saturation Filtering Blur Detect edge Warping Scale Rotate Warps Combining Morphs Composite

CGVR Graphics Korea University cgvr.korea.ac.kr Overview Image compositing Blue-screen mattes Alpha channel Porter-Duff compositing algebra Image morphing Specifying correspondences Warping Blending

CGVR Graphics Korea University cgvr.korea.ac.kr Image Compositing Separate an image into “elements” Render independently Composite together Applications Cel animation Chroma-keying Blue-screen matting Dobkin meets Elvis

CGVR Graphics Korea University cgvr.korea.ac.kr Blue-Screen Matting Composite foreground and background images Create background image Create foreground image with blue background Insert non-blue foreground pixels into background

CGVR Graphics Korea University cgvr.korea.ac.kr Alpha Channel Encodes pixel coverage information α = 0 : no coverage (or transparent) α = 1 : full coverage (or opaque) 0 < α < 1 : partial coverage (or semi-transparent) Example : α = 0.3 Partial coverageSemi-Transparent or

CGVR Graphics Korea University cgvr.korea.ac.kr Compositing with Alpha Controls the linear interpolation of foreground and background pixels when elements are composited α = 0 0< α < 1 α = 1

CGVR Graphics Korea University cgvr.korea.ac.kr Pixels with Alpha Alpha channel convention : (r, g, b, α) represents a pixel that is α covered by the color C=(r/α, g/α, b/α) Color components are premultiplied by α Can display (r, g, b) values directly Closure in composition algebra What is the meaning of the following? (0, 1, 0, 1) = (0, ½, 0, 1) = (0, ½, 0, ½) = (0, ½, 0, 0) =

CGVR Graphics Korea University cgvr.korea.ac.kr Pixels with Alpha Alpha channel convention : (r, g, b, α) represents a pixel that is α covered by the color C=(r/α, g/α, b/α) Color components are premultiplied by α Can display (r, g, b) values directly Closure in composition algebra What is the meaning of the following? (0, 1, 0, 1) = full green, full coverage (0, ½, 0, 1) = half green, full coverage (0, ½, 0, ½) = full green, half coverage (0, ½, 0, 0) = no coverage

CGVR Graphics Korea University cgvr.korea.ac.kr Semi-Transparent Objects Suppose we put A over B over background G How much of B is blocked by A? A B G

CGVR Graphics Korea University cgvr.korea.ac.kr Semi-Transparent Objects Suppose we put A over B over background G How much of B is blocked by A? How much of B is shows through A? α Aα A A B G

CGVR Graphics Korea University cgvr.korea.ac.kr Semi-Transparent Objects Suppose we put A over B over background G How much of B is blocked by A? How much of B is shows through A? How much of G shows through both A and B? α Aα A (1 – α A ) A B G

CGVR Graphics Korea University cgvr.korea.ac.kr Semi-Transparent Objects Suppose we put A over B over background G How much of B is blocked by A? How much of B is shows through A? How much of G shows through both A and B? (1 – α A ) α Aα A (1 – α A ) (1 – α B ) A B G

CGVR Graphics Korea University cgvr.korea.ac.kr Opaque Objects How do we combine 2 partially covered pixels 3 possible colors (0, A, B) 4 regions (0, A, B, AB) B A BA 0 AB

CGVR Graphics Korea University cgvr.korea.ac.kr Composition Algebra 12 reasonable combinations A in BB over AA over BBAclear A xor BB atop AA atop BB out AA out BB in A

CGVR Graphics Korea University cgvr.korea.ac.kr Example: C = A over B For colors that are not premultiplied : C = α A A + (1 – α A ) α B B α = α A + (1 – α A ) α B For colors that are premultiplied : C’ = A’ + (1 – α A ) B’ α = α A + (1 – α A ) α B A over B

CGVR Graphics Korea University cgvr.korea.ac.kr Image Composition Example Jurassic Park

CGVR Graphics Korea University cgvr.korea.ac.kr Overview Image compositing Blue-screen mattes Alpha channel Porter-Duff compositing algebra Image morphing Specifying correspondences Warping Blending

CGVR Graphics Korea University cgvr.korea.ac.kr Image Morphing Animate transition between two images

CGVR Graphics Korea University cgvr.korea.ac.kr Cross-Dissolving Blend image with “over” operator Alpha of bottom image is 1.0 Alpha of top image varies from 0.0 to 1.0

CGVR Graphics Korea University cgvr.korea.ac.kr Image Morphing Combines warping and cross-dissolving

CGVR Graphics Korea University cgvr.korea.ac.kr Image Morphing The warping step is the hard one Aim to align feature in images How specify mapping for the warp?

CGVR Graphics Korea University cgvr.korea.ac.kr Feature Based Warping Beier & Neeley use pairs of lines to specify warp Given p in destination image, where is p’ in source image? Beier & Neeley SIGGRAPH 92

CGVR Graphics Korea University cgvr.korea.ac.kr Warping with One Line Pair What happens to the “F”? Translation

CGVR Graphics Korea University cgvr.korea.ac.kr Warping with One Line Pair What happens to the “F”? Scale

CGVR Graphics Korea University cgvr.korea.ac.kr Warping with One Line Pair What happens to the “F”? Rotation

CGVR Graphics Korea University cgvr.korea.ac.kr Warping with One Line Pair What happens to the “F”? In general, similarity transformations

CGVR Graphics Korea University cgvr.korea.ac.kr Warping with Multiple Line Pairs Use weighted combination of points defined by each pair of corresponding lines

CGVR Graphics Korea University cgvr.korea.ac.kr Warping with Multiple Line Pairs Use weighted combination of points defined by each pair of corresponding lines P’ is a weighted average

CGVR Graphics Korea University cgvr.korea.ac.kr Weighting Effect of Each Line Pair To weight the contribution of each line pair : Where length[i] is the length of the i -th line dist[i] is the distance from a point P to the i -th line a, b, p are constants that control the wrap

CGVR Graphics Korea University cgvr.korea.ac.kr Warping Pseudocode WarpImage(Image, L’[…], L[…]) Begin for each destination pixel p do psum = (0, 0) wsum = 0 for each line L[i] in destination do p’[i] = p transformed by (L[i], L’[i]) psum += p’[i] * weight[i] wsum += weight[i] end p’ = psum / wsum Result(p) = Image(p’) end

CGVR Graphics Korea University cgvr.korea.ac.kr Morphing Pseudocode GenerateAnimation(Image 0, L 0 […], Image 1, L 1 […]) Begin for each intermediate frame time t do for i=1 to number of line pairs do L[i] = line t-th of the way from L 0 [i] to L 1 [i] end Warp 0 = WarpImage(Image 0, L 0, L) Warp 1 = WarpImage(Image 1, L 1, L) for each pixel p in FinalImage do Result(p) = (1-t)*Warp 0 + t*Warp 1 end

CGVR Graphics Korea University cgvr.korea.ac.kr Beier & Neeley Example Image 0 Image 1 Warp 0 Warp 1 Result

CGVR Graphics Korea University cgvr.korea.ac.kr Beier & Neeley Example Image 0 Image 1 Warp 0 Warp 1 Result

CGVR Graphics Korea University cgvr.korea.ac.kr Image Processing Quantization Uniform quantization Random dither Ordered dither Floyd-Steinberg dither Pixel operations Add random noise Add luminance Add contrast Add saturation Filtering Blur Detect edge Warping Scale Rotate Warps Combining Morphs Composite