Sampling, Aliasing, & Mipmaps

Slides:



Advertisements
Similar presentations
Sampling, Aliasing.
Advertisements

Technische Universität München Fakultät für Informatik Computer Graphics SS 2014 Sampling Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
CS 445 / 645 Introduction to Computer Graphics Lecture 18 Antialiasing Antialiasing.
3-D Computational Vision CSc Image Processing II - Fourier Transform.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 4 Ravi Ramamoorthi
Image Interpolation CS4670: Computer Vision Noah Snavely.
Computer Graphics Viewing, Rendering, Antialiasing گرد آوري و تاليف: دكتر احمد رضا نقش نيل چي دانشگاه اصفهان گروه مهندسي كامپيوتر.
David Luebke1/19/99 CS 551/651: Antialiasing David Luebke
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
MIT EECS 6.837, Durand and Cutler Sampling, Aliasing, & Mipmaps.
Image Processing IB Paper 8 – Part A
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.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi Some slides.
Image Filtering, Part 2: Resampling Today’s readings Forsyth & Ponce, chapters Forsyth & Ponce –
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Sampling and Pyramids : Rendering and Image Processing Alexei Efros …with lots of slides from Steve Seitz.
Edges and Scale Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection Szeliski – From Sandlot ScienceSandlot.
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.
Image Sampling Moire patterns
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
CS5520 Image-Based Rendering © Chun-Fa Chang, Spring 2003 Sampling Theorem & Antialiasing April 15, 2003.
Lecture 4: Image Resampling CS4670: Computer Vision Noah Snavely.
Lecture 3: Image Resampling CS4670: Computer Vision Noah Snavely Nearest-neighbor interpolation Input image 3x upsample hq3x interpolation (ZSNES)
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Image Sampling Moire patterns -
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
CSC418 Computer Graphics n Aliasing n Texture mapping.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 3 Ravi Ramamoorthi
Filtering theory: Battling Aliasing with Antialiasing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
© 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.
David Luebke 1 9/4/2015 CS 551/651: Advanced Computer Graphics Antialiasing Continued: Prefiltering and Supersampling.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
MIT EECS Sampling and Monte-Carlo Integration.
Antialiasing CAP4730: Computational Structures in Computer Graphics.
Lecture 21Slide Fall 2001 Texture-Mapping Tricks Combining Textures Filtering Textures Textures and Shading Bump Mapping Solid Textures.
Image Resampling CS4670: Computer Vision Noah Snavely.
Image Resampling CS4670: Computer Vision Noah Snavely.
CS 450: COMPUTER GRAPHICS ANTIALIASING SPRING 2015 DR. MICHAEL J. REALE.
Image Processing Xuejin Chen Ref:
Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
CS418 Computer Graphics John C. Hart
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
Lecture Fall 2001 From S. Zeki, Inner Vision.
MIT EECS Sampling, Aliasing, & Mipmaps. MIT EECS Last Time? Global illumination “physically accurate light transport” The rendering equation.
Image Enhancement (Frequency Domain)
1 Dr. Scott Schaefer Antialiasing. 2/70 What is aliasing?
Projects Project 1a due this Friday Project 1b will go out on Friday to be done in pairs start looking for a partner now.
Antialiasing. What is alias? Alias - A false signal in telecommunication links from beats between signal frequency and sampling frequency (from dictionary.com)
Image Resampling & Interpolation
Advanced Computer Graphics
Image Sampling Moire patterns
Sampling Theorem & 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.
Joshua Barczak CMSC435 UMBC
Image Sampling Moire patterns
Samuel Cheng Slide credits: Noah Snavely
Image Processing Today’s readings For Monday
Filtering Part 2: Image Sampling
Image Sampling Moire patterns
Image Resampling & Interpolation
Resampling.
Samuel Cheng Slide credits: Noah Snavely
CSC418 Computer Graphics Aliasing Texture mapping.
Presentation transcript:

Sampling, Aliasing, & Mipmaps

Today What is a Pixel? Examples of aliasing Sampling & Reconstruction Filters in Computer Graphics Anti-Aliasing for Texture Maps

No triangles, just samples in 3D What is a Pixel? No triangles, just samples in 3D

What is a Pixel? A pixel is not: a box a disk a teeny tiny little light A pixel “looks different” on different display devices A pixel is a sample it has no dimension it occupies no area it cannot be seen it has a coordinate it has a value

More on Samples Most things in the real world are continuous, yet everything in a computer is discrete The process of mapping a continuous function to a discrete one is called sampling The process of mapping a continuous variable to a discrete one is called quantization To represent or render an image using a computer, we must both sample and quantize discrete value discrete position

An Image is a 2D Function An ideal image is a continuous function I(x,y) of intensities. It can be plotted as a height field. In general an image cannot be represented as a continuous, analytic function. Instead we represent images as tabulated functions. How do we fill this table?

Sampling Grid We can generate the table values by multiplying the continuous image function by a sampling grid of Kronecker delta functions.

Sampling an Image The result is a set of point samples, or pixels.

Today What is a Pixel? Examples of Aliasing Sampling & Reconstruction Filters in Computer Graphics Anti-Aliasing for Texture Maps

Examples of Aliasing Aliasing occurs because of sampling and reconstruction

Examples of Aliasing

Examples of Aliasing

Examples of Aliasing Texture Errors point sampling

Today What is a Pixel? Examples of Aliasing Sampling & Reconstruction Sampling Density Fourier Analysis & Convolution Filters in Computer Graphics Anti-Aliasing for Texture Maps

Sampling Density How densely must we sample an image in order to capture its essence? If we under-sample the signal, we won't be able to accurately reconstruct it...

Sampling Density Aliasing in 2D because of insufficient sampling density

Today What is a Pixel? Examples of Aliasing Sampling & Reconstruction Filters in Computer Graphics Pre-Filtering, Post-Filtering Ideal, Gaussian, Box, Bilinear, Bicubic Anti-Aliasing for Texture Maps

Filters Filters are used to reconstruct a continuous signal from a sampled signal (reconstruction filters) band-limit continuous signals to avoid aliasing during sampling (low-pass filters) Desired frequency domain properties are the same for both types of filters Often, the same filters are used as reconstruction and low-pass filters

Pre-Filtering Filter continuous primitives Treat a pixel as an area Compute weighted amount of object overlap What weighting function should we use?

Post-Filtering Filter samples Compute the weighted average of many samples Regular or jittered sampling (better)

Box Filter / Nearest Neighbor Pretending pixels are little squares. spatial frequency

Tent Filter / Bi-Linear Interpolation Simple to implement Reasonably smooth spatial frequency

Bi-Cubic Interpolation Begins to approximate the ideal spatial filter, the sinc function spatial frequency

Why is the Box filter bad? (Why is it bad to think of pixels as squares) Original high- resolution image Down-sampled with a 5x5 box filter (uniform weights) Down-sampled with a 5x5 Gaussian filter (non-uniform weights) notice the ugly horizontal banding

Today What is a Pixel? Examples of Aliasing Sampling & Reconstruction Filters in Computer Graphics Anti-Aliasing for Texture Maps Magnification & Minification Mipmaps Anisotropic Mipmaps

textured surface (texture map) Sampling Texture Maps How to map the texture area seen through the pixel window to a single pixel value? textured surface (texture map) circular pixel window image plane

Sampling Texture Maps When texture mapping it is rare that the screen-space sampling density matches the sampling density of the texture. 64x64 pixels Original Texture Magnification for Display Minification for Display for which we must use a reconstruction filter

Linear Interpolation Magnification looks better, but blurry (texture is under-sampled for this resolution)

MIP Mapping Construct a pyramid of images that are pre-filtered and re-sampled at 1/2, 1/4, 1/8, etc., of the original image's sampling During rasterization we compute the index of the decimated image that is sampled at a rate closest to the density of our desired sampling rate MIP stands for multum in parvo which means many in a small place

MIP Mapped (Bi-Linear) MIP Mapping Example Thin lines may become disconnected / disappear Nearest Neighbor MIP Mapped (Bi-Linear)

MIP Mapped (Bi-Linear) MIP Mapping Example Small details may "pop" in and out of view Nearest Neighbor MIP Mapped (Bi-Linear)

mipmaps & linear interpolation Examples of Aliasing Texture Errors point sampling mipmaps & linear interpolation

Storing MIP Maps Can be stored compactly Illustrates the 1/3 overhead of maintaining the MIP map