Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 5 Ravi Ramamoorthi

Slides:



Advertisements
Similar presentations
Introduction to compositing. What is compositing?  The combination of two images to produce a single image  Many ways we can do this, especially in.
Advertisements

Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 4: Image Processing 1 Ravi Ramamoorthi
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 4 Ravi Ramamoorthi
CS 551 / CS 645 Antialiasing. What is a pixel? A pixel is not… –A box –A disk –A teeny tiny little light A pixel is a point –It has no dimension –It occupies.
School of Computing Science Simon Fraser University
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi Some slides.
CS248 Midterm Review. CS248 Midterm Mon, November 4, 7-9 pm, Terman Aud Mostly “short answer” questions – Keep your answers short and sweet! Covers lectures.
CS248 Midterm Review Derek Chan and Ethan Dreyfuss.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
CS248 Midterm Review Szymon Rusinkiewicz. CS248 Midterm Monday, November 1, 7-9 pm Gates B01 and B03 Designed to be 1-hour exam Mostly “short answer”
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F(  ) is the spectrum of the function.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 5: Image Processing 2: Warping Ravi Ramamoorthi
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
CS248 Midterm Review. CS248 Midterm Mon, November 3, 7-9 pm, Gates B01 Mostly “short answer” questions – Keep your answers short and sweet! Covers lectures.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 5: Image Processing 2: Warping Ravi Ramamoorthi
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.
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
CS5520 Image-Based Rendering © Chun-Fa Chang, Spring 2003 Sampling Theorem & Antialiasing April 15, 2003.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 7: Review, Reconstruction Ravi Ramamoorthi
CS148: Introduction to Computer Graphics Final Review Session.
CS248 Midterm Review Michael Green and Sean Walker (based on the work of previous TAs)
Sampling and Aliasing Kurt Akeley CS248 Lecture 3 2 October 2007
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Computational Photography: Fourier Transform Jinxiang Chai.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 6: Image Compositing, Morphing (brief discussion of reconstruction) Ravi Ramamoorthi
CS248 Midterm Review. CS248 Midterm Mon, November 5, 7-9 pm, Terman Aud Mon, November 5, 3-5 pm, Gates 392 Mostly “short answer” questions Covers through.
Fourier Analysis : Rendering and Image Processing Alexei Efros.
Image warping/morphing Digital Video Special Effects Fall /10/17 with slides by Y.Y. Chuang,Richard Szeliski, Steve Seitz and Alexei Efros.
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.
Sampling and Antialiasing CMSC 491/635. Abstract Vector Spaces Addition –C = A + B = B + A –(A + B) + C = A + (B + C) –given A, B, A + X = B for only.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 3 Ravi Ramamoorthi
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Fourier Transform Basic idea.
© Chun-Fa Chang Sampling Theorem & Antialiasing. © Chun-Fa Chang Motivations “ My ray traced images have a lot more pixels than the TV screen. Why do.
Antialiasing CptS 548 Advanced Computer Graphics John C. Hart.
Fundamentals Rawesak Tanawongsuwan
Image Synthesis Rabie A. Ramadan, PhD 3. 2 Our Problem.
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.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
Lecture 7: Sampling Review of 2D Fourier Theory We view f(x,y) as a linear combination of complex exponentials that represent plane waves. F(u,v) describes.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
Digital Image Compositing. Compositing for volume rendering c1 c2 c3 The initial pixel color = Black opaque Back-to-Front compositing: use ‘under’ operator.
CMSC 635 Sampling and Antialiasing. Aliasing in images.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
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.
2D Sampling Goal: Represent a 2D function by a finite set of points.
Graphics Graphics Korea University cgvr.korea.ac.kr Image Processing 고려대학교 컴퓨터 그래픽스 연구실.
Sampling Theorem & Antialiasing
Lecture 5: Fourier and Pyramids
2D Fourier Transform.
College of Computer and Information Science, Northeastern UniversityMarch 8, CS U540 Computer Graphics Prof. Harriet Fell Spring 2007 Lecture 34.
CS559: Computer Graphics Lecture 7: Image Warping and Panorama Li Zhang Spring 2008 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.
Advanced Computer Graphics
Advanced Computer Graphics
Advanced Computer Graphics
Sampling Theorem & Antialiasing
(C) 2002 University of Wisconsin, CS 559
Dr. Nikos Desypris, Oct Lecture 3
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F() is the spectrum of the function.
CSCE 643 Computer Vision: Image Sampling and Filtering
CSCE 643 Computer Vision: Thinking in Frequency
© University of Wisconsin, CS559 Spring 2004
Feature-Based Warping
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Feature-Based Warping
Presentation transcript:

Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 5 Ravi Ramamoorthi

To Do  Assignment 1, Due Apr 24.  This lecture only extra credit and clear up difficulties  Questions/difficulties so far in doing assignment?

Digital Image Compositing 1996: Academy scientific and engineering achievement award (oscar ceremony) “For their pioneering inventions in digital image compositing”

Image Compositing Separate an image into elements  Each part is rendered separately  Then pasted together or composited into a scene Many slides courtesy Tom Funkhouser

Outline Compositing  Blue screen matting  Alpha channel  Porter-Duff compositing algebra (Siggraph 84) Morphing (Beier-Neely, Siggraph 92)

Blue Screen Matting  Photograph or create image of object against blue screen (blue usually diff from colors like skin)  Then extract foreground (non-blue pixels)  Add (composite) to new image  Problem: aliasing [hair] (no notion of partial coverage/blue)

Alpha Channel  In general, 32 bit RGBα images  Alpha encodes coverage (0=transparent, 1=opaque)  Simple compositing:

Alpha Channel

Pixels with Alpha: Conventions Pre-multiplication  Color C = (r,g,b) and coverage alpha is often represented as  One benefit: color components αF directly displayed (analogous to homogeneous coordinates) What is ( α, C ) for the following?  (0, 1, 0, 1) = Full green, full coverage  (0, ½, 0, 1) = Half green, full coverage  (0, ½, 0, ½) = Full green, half (partial) coverage  (0, ½, 0, 0) = No coverage

Compositing with Alpha

Opaque Objects  In this case, α controls the amount of pixel covered (as in blue screening).  How to combine 2 partially covered pixels? 4 possible outcomes

Outline Compositing  Blue screen matting  Alpha channel  Porter-Duff compositing algebra (Siggraph 84) Morphing (Beier-Neely, Siggraph 92)

Compositing Algebra  12 reasonable combinations (operators)

Computing Colors with Compositing  Coverages shown previously only examples  We only have α, not exact coverage, so we assume coverages of A and B are uncorrelated  How to compute net coverage for operators?

Example: C = A over B

Image Compositing Example Jurassic Park 93

Outline Compositing  Blue screen matting  Alpha channel  Porter-Duff compositing algebra (Siggraph 84) Morphing (Beier-Neely, Siggraph 92)

Examples  Famous example: Michael Jackson Black and White Video (Nov 14, 1991).   Easy enough to implement: assignment in many courses (we show example from CMU course):  No music, but the good poor man’s alternative

Examples

Simple Cross-Dissolve

The idea in morphing  User marks line segments  These are used to warp image 1 and image 2  Images are then blended  Key step is warping  Why is it needed? Why not just cross-dissolve or blend two images based on alpha (how far between them)  How is it to be done with line segments?

Beier-Neely examples

Feature-Based Warping  To warp image 1 into image 2, we must establish correspondence between like features  Then, those features transform (and rest of image moves with them)  In Beier-Neely, features are user-specified line segments (nose, face outline etc.)  Warping is an image transformation (generally more complex than scale or shift, but same basic idea)  Morphing takes two warped images, cross-dissolves

Warping with Line Segments  We know how line warps, but what about whole img?  Given p in dest image, where is p’ in source image?

Warping with one Line Pair  What happens to the F? Translation!!

Warping with one Line Pair  What happens to the F? Scale !! Similar ideas apply to rotation, other similarity transforms

Warping with Multiple Line Pairs

Details

Weighting effect of each line pair

Warping Pseudocode

Morphing Pseudocode

Examples

Bonus: Reconstruction  Section of textbook (in handout)  Some interesting, more technical ideas  Discuss briefly if time permits

Discrete Reconstruction Equivalent to multiplying by comb function (a) Convolving with similar fn in frequency domain (b). Separation in frequency domain depends on spatial sampling rate Replicated Fourier spectra (when is this safe?)

Replicated Fourier Spectra  One can window to eliminate unwanted spectra  Equivalent to convolution with sinc  No aliasing if spectra well enough separated (initial spatial sampling rate high enough)  In practice, we use some reconstruction filter (not sinc), such as triangle or Mitchell filter

Adequate Sampling Rate

Inadequate Sampling Rate

Filter first

Non-Ideal Reconstruction  In practice, convolution never with sinc  Sampling frequency must be even higher than Nyquist, or we get substantial aliasing  In figure, samples trace out original modulated by a low- frequency sine wave. Low freq amplitude modulation remains, compounded by rastering if reconstruct box filter