CS559: Computer Graphics Lecture 3: Image Sampling and Filtering Li Zhang Spring 2010.

Slides:



Advertisements
Similar presentations
CS559: Computer Graphics Lecture 2: Image Formation in Eyes and Cameras Li Zhang Spring 2008.
Advertisements

Cameras Digital Visual Effects, Spring 2005 Yung-Yu Chuang 2005/3/2 with slides by Brian Curless, Steve Seitz and Alexei Efros.
The Camera : Computational Photography Alexei Efros, CMU, Fall 2006.
CS 691 Computational Photography Instructor: Gianfranco Doretto 3D to 2D Projections.
15-463: Computational Photography Alexei Efros, CMU, Spring 2010 Most slides from Steve Marschner Sampling and Reconstruction.
Computational Photography: Sampling + Reconstruction Connelly Barnes Slides from Alexei Efros and Steve Marschner.
Motivation Application driven -- VoD, Information on Demand (WWW), education, telemedicine, videoconference, videophone Storage capacity Large capacity.
Projection Readings Szeliski 2.1. Projection Readings Szeliski 2.1.
School of Computing Science Simon Fraser University
First color film Captured by Edward Raymond Turner Predates Prokudin-Gorskii collection Like Prokudin-Gorskii, it was an additive 3-color system.
Announcements. Projection Today’s Readings Nalwa 2.1.
Recap from Monday Spectra and Color Light capture in cameras and humans.
Lecture 5: Projection CS6670: Computer Vision Noah Snavely.
1.The Concept and Representation of Periodic Sampling of a CT Signal 2.Analysis of Sampling in the Frequency Domain 3.The Sampling Theorem — the Nyquist.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Announcements Mailing list (you should have received messages) Project 1 additional test sequences online Talk today on “Lightfield photography” by Ren.
Lecture 1: Images and image filtering
Linear filtering. Overview: Linear filtering Linear filters Definition and properties Examples Gaussian smoothing Separability Applications Denoising.
Announcements Mailing list Project 1 test the turnin procedure *this week* (make sure it works) vote on best artifacts in next week’s class Project 2 groups.
Announcements Kevin Matzen office hours – Tuesday 4-5pm, Thursday 2-3pm, Upson 317 TA: Yin Lou Course lab: Upson 317 – Card access will be setup soon Course.
15-463: Computational Photography Alexei Efros, CMU, Fall 2011 Many slides from Steve Marschner Sampling and Reconstruction.
Lecture 4a: Cameras CS6670: Computer Vision Noah Snavely Source: S. Lazebnik.
Lecture 2: Image filtering
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Slides from Alexei Efros, Steve Marschner Filters & fourier theory.
The Camera : Computational Photography Alexei Efros, CMU, Fall 2008.
Building a Real Camera.
How the Camera Works ( both film and digital )
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 3 Ravi Ramamoorthi
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Kavita Bala Hybrid Images, Oliva et al.,
… Representation of a CT Signal Using Impulse Functions
Signal ProcessingES & BM MUET1 Lecture 2. Signal ProcessingES & BM MUET2 This lecture Concept of Signal Processing Introduction to Signals Classification.
Cameras Course web page: vision.cis.udel.edu/cv March 22, 2003  Lecture 16.
Photographics 10 Introduction to Digital Photography
The Basic Functions of a S ingle L ens R eflex C amera Exposure Basics.
Digital Photography A tool for Graphic Design Graphic Design: Digital Photography.
CS559: Computer Graphics Lecture 3: Digital Image Representation Li Zhang Spring 2008.
Comparing Regular Film to Digital Photography
Recap from Wednesday Two strategies for realistic rendering capture real world data synthesize from bottom up Both have existed for 500 years. Both are.
Filtering Robert Lin April 29, Outline Why filter? Filtering for Graphics Sampling and Reconstruction Convolution The Fourier Transform Overview.
Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science.
776 Computer Vision Jan-Michael Frahm Fall Last class.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Lenses. Diverging and Converging Lenses Double Convex lenses focus light rays to a point on the opposite side of the lens. Double Concave lenses diverge.
Why is computer vision difficult?
CS559: Computer Graphics Lecture 3: Digital Image Representation Li Zhang Spring 2008.
Lecture 3: Filtering and Edge detection
Announcements Project 1 grading session this Thursday 2:30-5pm, Sieg 327 –signup ASAP:signup –10 minute slot to demo your project for a TA »have your program.
Cornell CS465 Fall 2004 Lecture 5© 2004 Steve Marschner 1 Sampling and reconstruction CS 465 Lecture 5.
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
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.
Understanding Aperture (a beginner’s guide) Understanding Aperture (a beginner’s guide)
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Noah Snavely Hybrid Images, Oliva et al.,
PNU Machine Vision Lecture 2a: Cameras Source: S. Lazebnik.
Advanced Computer Graphics
Electronics Lecture 5 By Dr. Mona Elneklawi.
- photometric aspects of image formation gray level images
Sampling and reconstruction
The Camera : Computational Photography
Lecture 1: Images and image filtering
Jan-Michael Frahm Fall 2016
Sampling and Reconstruction
The Camera : Computational Photography
Announcements Midterm out today Project 1 demos.
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Projection Readings Nalwa 2.1.
Lecture 1: Images and image filtering
Announcements Midterm out today Project 1 demos.
Presentation transcript:

CS559: Computer Graphics Lecture 3: Image Sampling and Filtering Li Zhang Spring 2010

Announcement Today’s office hour moves to 4-5pm this Friday.

Last time: Image Formation in Cameras The first camera –5 th B.C. Aristotle, Mozi (Chinese: 墨子 ) –How does the aperture size affect the image?

Last time: Image Formation in Cameras scene sensor array lens & motor A digital camera replaces film with a sensor array Each cell in the array is a light-sensitive diode that converts photons to electrons YungYu Chuang’s slide

Last time: Image Formation in Cameras Canon EF-S 60mm f/2.8 Canon EF 100mm f/2.8 Canon EF 180mm f/3.5

Last time: Image Formation in Cameras 24mm 50mm 135mm Frédo Durand’s slide

Last time: Image Formation in Cameras Changing the aperture size affects depth of field. A smaller aperture increases the range in which the object is approximately in focus

Last time: Image Formation in Cameras Slower shutter speed => more light, but more motion blur Faster shutter speed freezes motion YungYu Chuang’s slide

Last time: Image Formation in Cameras Field of View, Motion blur, Depth of Field Can all be simulated in OpenGL

Last time: Image Formation in Cameras YungYu Chuang’s slide Lecture 3-4: Image Re-sampling and Filtering

Last time: Image Formation in Cameras automatic white balancewarmer YungYu Chuang’s slide

Last time: Image Formation in Cameras Bayer Pattern => color image, white balance Are good exercises for project 1.

Lens has different refractive indices for different wavelengths. Lens related issues: Chromatic Abberation Special lens systems using two or more pieces of glass with different refractive indexes can reduce or eliminate this problem.

Lens related issues: Distortion Radial distortion of the image –Caused by imperfect lenses –Deviations are most noticeable for rays that pass through the edge of the lens No distortionPin cushionBarrel Steve Seitz’s slide

Correcting radial distortion from Helmut DerschHelmut Dersch Steve Seitz’s slide Lecture 6: Image Warping

Digital camera review website

Image as a discreet function Represented by a matrix: Q1: How many discrete samples are needed to represent the original continuous function? Q2: How to reconstruct the continuous function from the samples?

Sampling in digital audio Recording: sound to analog to samples to disc Playback: disc to samples to analog to sound again – How can we make sure we are filling in the gaps correctly?

Sampled Representation in General How to store and compute with continuous functions? Sampling: write down the function’s values at many points

Sampled Representation in General Making samples back into a continuous function – For output – For analysis or processing Amounts to guessing what the function did in between

Advantage of sampled representation Simplifying the job of processing a function Simple example: smoothing by averaging – Can be executed in continuous form (analog circuit design) – But can also be executed using sampled representation

History of sampling Nyquist 1928; Shannon 1949 – Famous results in information theory 1940s: first practical uses in telecommunications 1960s: first digital audio systems 1970s: commercialization of digital audio 1982: introduction of the Compact Disc – The first high-profile consumer application This is why all terminology has ECE flavor instead of CS Compressed Sensing 2004; sub-Nyquiest-Shannon criterion

Sampling a continuous function (1D) Continuous Function Discrete Samples Sampling Period T = 32Sampling Period T = 16Sampling Period T = 8Sampling Period T = 4 The denser the better, but at the expense of storage and processing power

Under-sampling Sampling a sine wave

Under-sampling Sampling a sine wave What if we “missed” things between the samples? – Unsurprising result: information is lost

Sampling a sine wave What if we “missed” things between the samples? – Unsurprising result: information is lost – Surprising result: indistinguishable from lower frequency

Sampling a sine wave What if we “missed” things between the samples? – Unsurprising result: information is lost – Surprising result: indistinguishable from lower frequency

Sampling a sine wave What if we “missed” things between the samples? – Unsurprising result: information is lost – Surprising result: indistinguishable from lower frequency – Also indistinguishable from high frequency – Aliasing: Insufficient samples to reconstruct original signal

Preventing aliasing

Introducing lowpass filters: remove high frequency leaving only safe low frequencies choose lowest frequency in reconstruction (disambiguate)

Linear filtering: a key idea Transformation on signals; e.g.: bass/treble controls on stereo blurring/sharpening operations in image editing smoothing/noise reduction in tracking Can be mathematically by convolution

Let’s take a break

a a

a a

a a

Linear filtering (warm-up slide) original ? ★

Linear filtering (warm-up slide) original Filtered (no change) ★

Linear filtering original ? ★

shift original shifted ★

Linear filtering original ? 1/9 ★

Blurring originalBlurred (filter applied in both dimensions). 1/9 ★

original ? Linear filtering (warm-up slide) ★ ( )

original Filtered (no change) Linear Filtering (no change) ★ ( )

1/9 original ? Linear Filtering ★ ( )

(remember blurring) Blurred (filter applied in both dimensions). 1/9 ★ ( ) original

sharpening 1/ ★ ( ) original Sharpened original

Sharpening example coefficient -1/3 original 9 Sharpened (differences are accentuated; constant areas are left untouched). 12 5/ ★ -1/3

Sharpening beforeafter