Aliasing and Anti-Aliasing Copyright Zachary Wartell, University of North Carolina at Charlotte, All Rights Reserved Revision: 10/24/2007 3:38:00 AM ©Zachary.

Slides:



Advertisements
Similar presentations
The Framebuffer February 6, A Configurable Pixel Cache for Fast Image Generation, Gorris et al. Problem Processor speeds have increased to the point.
Advertisements

Sampling and Reconstruction
Direct Volume Rendering. What is volume rendering? Accumulate information along 1 dimension line through volume.
Computer Graphics Viewing, Rendering, Antialiasing گرد آوري و تاليف: دكتر احمد رضا نقش نيل چي دانشگاه اصفهان گروه مهندسي كامپيوتر.
David Luebke1/19/99 CS 551/651: Antialiasing David Luebke
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.
Aliasing & Antialiasing
CS 376 Introduction to Computer Graphics 02 / 05 / 2007 Instructor: Michael Eckmann.
Computer Graphics Recitation 6. 2 Motivation – Image compression What linear combination of 8x8 basis signals produces an 8x8 block in the image?
Sampling, Aliasing, & Mipmaps
CMPE 466 COMPUTER GRAPHICS
Computer Graphics Recitation 7. 2 Motivation – Image compression What linear combination of 8x8 basis signals produces an 8x8 block in the image?
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
CST 494/598 Computer Graphics Anshuman Razdan i3dea.asu.edu/razdan.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
©Zachary Wartell, Larry F. Hodges Scan Conversion I Revision 1.6 8/9/2007 Copyright 2006, Dr. Zachary Wartell, UNCC, All Rights Reserved.
CSC418 Computer Graphics n Aliasing n Texture mapping.
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
Filtering Approaches for Real-Time Anti-Aliasing /
Filtering theory: Battling Aliasing with Antialiasing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Sampling theorem In order to accurately reconstruct a signal from a periodically sampled version of it, the sampling frequency must be at least twice the.
CS 431/636 Advanced Rendering Techniques
© 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.
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Antialiasing CptS 548 Advanced Computer Graphics John C. Hart.
March Shape Drawing Algorithms Shmuel Wimer Bar Ilan Univ., Engineering Faculty.
Geometric Objects Computer Graphics Lab. Sun-Jeong Kim.
Image Synthesis Rabie A. Ramadan, PhD 3. 2 Our Problem.
CSC361/661 Digital Media Spring 2002
Antialiasing CAP4730: Computational Structures in Computer Graphics.
3/4/04© University of Wisconsin, CS559 Spring 2004 Last Time Clipping Lines –Cohen-Sutherland: The use of outcodes and early reject/accept tests –Liang-Barsky:
Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Seeram Chapter 7: Image Reconstruction
10/26/04© University of Wisconsin, CS559 Fall 2004 Last Time Drawing lines Polygon fill rules Midterm Oct 28.
CS 450: COMPUTER GRAPHICS ANTIALIASING SPRING 2015 DR. MICHAEL J. REALE.
Week 6 - Wednesday.  What did we talk about last time?  Light  Material  Sensors.
Graphics Graphics & Graphical Programming Lecture 14 - Lines & Circles.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
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.
2D Output Primitives Points Lines Circles Ellipses Other curves Filling areas Text Patterns Polymarkers.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized.
Attributes of Graphics Primitives Hearn & Baker Chapter 4 Some slides are taken from Robert Thomsons notes.
02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.
2D Sampling Goal: Represent a 2D function by a finite set of points.
1 Dr. Scott Schaefer Antialiasing. 2/70 What is aliasing?
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
CS552: Computer Graphics Lecture 17: Scan Conversion (Special Cases)
Antialiasing. What is alias? Alias - A false signal in telecommunication links from beats between signal frequency and sampling frequency (from dictionary.com)
Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
Advanced Computer Graphics
Attributes of Graphics Primitives Hearn & Baker Chapter 4
Multirate Signal Processing* Tutorial using MATLAB**
Sampling and Antialiasing
Advanced Computer Graphics:
Antialiasing Dr. Scott Schaefer.
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.
Fourier Transform Analytic geometry gives a coordinate system for describing geometric objects. Fourier transform gives a coordinate system for functions.
Fourier Transform Analytic geometry gives a coordinate system for describing geometric objects. Fourier transform gives a coordinate system for functions.
CSCE 643 Computer Vision: Image Sampling and Filtering
Fourier Transform Analytic geometry gives a coordinate system for describing geometric objects. Fourier transform gives a coordinate system for functions.
Primitive Drawing Algorithm
Primitive Drawing Algorithm
CSC418 Computer Graphics Aliasing Texture mapping.
Color Perception of color Color spaces
Presentation transcript:

Aliasing and Anti-Aliasing Copyright Zachary Wartell, University of North Carolina at Charlotte, All Rights Reserved Revision: 10/24/2007 3:38:00 AM ©Zachary Wartell - 1/26/2005

Describe what you see! (Hint) Example A Example B ©Zachary Wartell - 1/26/2005

Reconstructed Signal (Low Frequency) Describe what you see! Sampling (Lower Frequency) Signal (High Frequency) Reconstruction Reconstructed Signal (Low Frequency) Example A Example B Reconstruction Reconstructed Signal (Low freq.) Sampling (Lower Frequency) Signal (High Frequency) ©Zachary Wartell - 1/26/2005

Describe what you see! Sampling (Lower Frequency) Signal (High Frequency) Reconstruction Reconstructed Signal (Low Frequency) Example A Aliasing = a high frequency signal masquarading as a low frequency signal due to a poor sampling frequency. ©Zachary Wartell - 1/26/2005

position intensity Recall: frequency, cycle/wavelength Δx cycle A

What is a “poor sampling frequency”? Nyquist Sampling Frequency: f s = 2 f max Δx s = Δx cycle / 2 f s : Nyquist Sampling Frequency f max : maximum frequency component in signal Δx s : Nyquist Sampling Interval Δx cycle : Cycle interval “To avoid losing information we need to set sampling frequency to at least twice the highest frequency component of signal.” ©Zachary Wartell - 1/26/2005

TADA! highest freq. comp. of S( x ) Example of highest frequency component ● What is highest frequency component of this signal, S( x )? ● What if I tell you the equation is: Sin[x (2 Pi /10)] + Sin[x (2 Pi / 1)]*0.25 = + f = 1/10, a=1 Sin[x (2 Pi / 1)]*0.25Sin[x (2 Pi /10)] f = 1, a=0.25

Highest frequency component of general signal Any signal represented as sum of sinusoids: Amplitude vs Space Input Signal S = … ∑ ©Zachary Wartell - 1/26/2005

Fourier Transform Amplitude vs Frequency Input Signal S = … ∑ Insensity vs Position = ©Zachary Wartell - 1/26/2005 f a f -how much does frequency f contribute to the original signal S sinusoid a frequency f of amplitude a f

How does this relate to image capture? -”real” image is a 2D signal of infinite resolution - the sampled image is of finite resolution (finite # of pixels) -the original image contains details that are very much smaller than the pixel sampling rate, result is jagged lines/boundaries - high detail means high frequency components - jagged lines/boundaries is aliasing “real” image - 2D Signal (“Mia”) ©Zachary Wartell - 1/26/2005 sampled image - (“Eye”)

Sampling “Mia” signal at too low frequency ©Zachary Wartell → “1D” Slice Signal Sample Reconstruction ( ) ©Zachary Wartell - 1/26/2005

Anti-Aliasing Options (Lines)  increase sampling rate with more pixels in framebuffer & display  Use same framebuffer resolution but enable multiple pixels based on pixel coverage  pre-filter image - remove high frequencies before sampling  area sampling – calculate area of overlap of each pixel with displayed primitives  supersampling (post-filter) – use more framebuffer pixels and “average” intensities of groups of super- pixels results to the lower resolution actual pixels ©Zachary Wartell - 1/26/2005

-Bresenham's line algorithm can be modified to account for pixel coverage [Gupta-Sproull]. We treat line as 1 pixel thick rectangle which can intersect up to 3 pixels and use a measure of the distance (D?) from line to the upper (P k+1 u ), standard (P k+1 ) and lower pixel (P k+1 l ) to compute the weight each pixels intensity. Use Pixel Coverage Figure 13: Assume case P k+1 =P α. Distances D u,D,D l are functions of decision parameter (p k ). Each distance used to get a intensity weighting from a pre-computed lookup table ©Zachary Wartell - 1/26/2005

Supersampling Straight-Line Segments  supersample subpixel positions of zero-width line Intensity of pixel P is number of sub-pixels turned on in P ©Zachary Wartell - 1/26/2005

Supersampling Straight-Line Segments ©Zachary Wartell  supersample subpixel positions of finite-width line Intensity of pixel P is number of sub-pixels turned on in P -Use lower left corner rule -Also “pick-up” color of background ©Zachary Wartell - 1/26/2005

Subpixel Weighting Masks (Discrete Array) Mask (sum to 16) ©Zachary Wartell - 1/26/2005

Area Sampling Straight-Line Segments ©Zachary Wartell  Compute pixel to rectangle intersection area (trapezoid) ©Zachary Wartell - 1/26/2005

Filtering Techniques (Continuous Function) Box Cone Gaussian -Integrate over volume -Highest potential accuracy (= slow) Sinc (sin θ/θ) ∞ ©Zachary Wartell - 1/26/2005

Line-Intensity and Line Angle √2 * L L ©Zachary Wartell - 1/26/2005

Anti-aliasing boundaries: Pixel Coverage -adjust intensity on boundary x x+1 y y+1 ©Zachary Wartell - 1/26/2005

Anti-aliasing boundaries: Supersampling ©Zachary Wartell - 1/26/2005

Anti-aliasing boundaries: Pitteway & Watkinson -variant of Bresenham Midpoint decision parameter p (assume m in [0,1]) xkxk ykyk y k +1 x k +1 PβPβ PαPα MkMk L: y=mx+b PkPk y k +1/2 ©Zachary Wartell - 1/26/2005

Anti-aliasing boundaries: Pitteway & Watkinson  add 1 – m, p  [0,1] p = [m(x k +1) + b] – (y k + ½) + (1-m)  P α ↔ p 1 – m ©Zachary Wartell - 1/26/2005

Anti-aliasing boundaries: Pitteway & Watkinson Insight: p = [m(x k +1) + b] – (y k + ½) + (1-m) = coverage area = m x k + b – y k + ½ x k - 1/2x k + 1/2 xkxk y k +1/2 y k -1/2 ykyk y = m (x k + ½) + b y = m (x k - ½) + b A trap =B H 0 + ½ B (H 1 - H 0 ) ©Zachary Wartell - 1/26/2005

Anti-Aliasing: Nvidia -GeForce 4 has Accuview “multi-sampling”: “1. Subpixels are rendered in parallel (thanks to multisampling technology) to a back buffer. This back buffer is a factor that is larger than the final display resolution. 2. The image is filtered and written out to a front frame buffer. 3. The frame buffer is sent to the display.” -GeForce 8800 uses “coverage samples”…, and is Coverage Sampling Antialiasing (CSAA). “CSAA provides higher levels of AA than with current 4x or 8x multisampling AA. CSAA modes include 8x, 16x and 16xQ. CSAA produces antialiased images that rival the quality of 8x or 16x MSAA, while introducing only a minimal performance hit over standard (typically 4x) MSAA. ” ©Zachary Wartell - 1/26/2005

Revisions -1.2 – update with 8800 GPU commentary -to tedious s to keep this updated see SVN logs