Image transformations, Part 2 Prof. Noah Snavely CS1114

Slides:



Advertisements
Similar presentations
Image Processing. Overview ImagesPixel Filters Neighborhood Filters Dithering.
Advertisements

Image Interpolation CS4670: Computer Vision Noah Snavely.
15-463: Computational Photography Alexei Efros, CMU, Spring 2010 Most slides from Steve Marschner Sampling and Reconstruction.
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Slides from Alexei Efros
CS 691 Computational Photography
Computational Photography: Sampling + Reconstruction Connelly Barnes Slides from Alexei Efros and Steve Marschner.
Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
Computational Photography CSE 590 Tamara Berg Filtering & Pyramids.
Filtering CSE P 576 Larry Zitnick
Image Filtering, Part 2: Resampling Today’s readings Forsyth & Ponce, chapters Forsyth & Ponce –
Convolution, Edge Detection, Sampling : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz.
Affine Linear Transformations Prof. Graeme Bailey (notes modified from Noah Snavely, Spring 2009)
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.
Lecture 2: Edge detection and resampling
Image Sampling Moire patterns
Lecture 3: Edge detection, continued
Linear filtering. Overview: Linear filtering Linear filters Definition and properties Examples Gaussian smoothing Separability Applications Denoising.
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Lecture 4: Image Resampling CS4670: Computer Vision Noah Snavely.
15-463: Computational Photography Alexei Efros, CMU, Fall 2011 Many slides from Steve Marschner Sampling and Reconstruction.
Lecture 3: Image Resampling CS4670: Computer Vision Noah Snavely Nearest-neighbor interpolation Input image 3x upsample hq3x interpolation (ZSNES)
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Computational Photography: Fourier Transform Jinxiang Chai.
Slides from Alexei Efros, Steve Marschner Filters & fourier theory.
Image Sampling Moire patterns -
Fourier Analysis : Rendering and Image Processing Alexei Efros.
Image Pyramids and Blending
Recap from Friday Pinhole camera model Perspective projections Lenses and their flaws Focus Depth of field Focal length and field of view.
Robust fitting Prof. Noah Snavely CS1114
Image Sampling CSE 455 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
CSC589 Introduction to Computer Vision Lecture 9 Sampling, Gaussian Pyramid Bei Xiao.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
Applications of Image Filters Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/04/10.
Image Resampling CS4670: Computer Vision Noah Snavely.
Image Resampling CS4670: Computer Vision Noah Snavely.
Image Processing Xuejin Chen Ref:
Lecture 4: Image Resampling and Reconstruction CS4670: Computer Vision Kavita Bala.
Image Processing Edge detection Filtering: Noise suppresion.
Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
CS559: Computer Graphics Lecture 4: Compositing and Resampling Li Zhang Spring 2008.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Image Processing.
Lecture 5: Fourier and Pyramids
Projects Project 1a due this Friday Project 1b will go out on Friday to be done in pairs start looking for a partner now.
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
COMPUTER GRAPHICS AND LINEAR ALGEBRA AN INTRODUCTION.
Recall: Gaussian smoothing/sampling G 1/4 G 1/8 Gaussian 1/2 Solution: filter the image, then subsample Filter size should double for each ½ size reduction.
Recognizing objects Prof. Noah Snavely CS1114
Image Resampling & Interpolation
Many slides from Steve Seitz and Larry Zitnick
CS 4501: Introduction to Computer Vision Sparse Feature Detectors: Harris Corner, Difference of Gaussian Connelly Barnes Slides from Jason Lawrence, Fei.
Image Sampling Moire patterns
Image transformations
Gonzalez & Woods, and Efros)
Image transformations
Recap from Wednesday Spectra and Color Light capture in cameras and humans.
Image Sampling Moire patterns
More Image Manipulation
CSCE 643 Computer Vision: Thinking in Frequency
Samuel Cheng Slide credits: Noah Snavely
Image Processing Today’s readings For Monday
Filtering Part 2: Image Sampling
Linear filtering.
Image Sampling Moire patterns
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Image Resampling & Interpolation
Resampling.
Samuel Cheng Slide credits: Noah Snavely
Presentation transcript:

Image transformations, Part 2 Prof. Noah Snavely CS1114

Administrivia  Assignment 4 has been posted –Due the Friday after spring break  TA evaluations –  Midterm course evaluations 2

Tricks with convex hull  What else can we do with convex hull?  Answer: sort!  Given a list of numbers (x 1, x 2, … x n ), create a list of 2D points: (x 1, x 1 2 ), (x 2, x 2 2 ), … (x n, x n 2 )  Find the convex hull of these points – the points will be in sorted order  What does this tell us about the running time of convex hull? 3

Tricks with convex hull  This is called a reduction from sorting to convex hull  We saw a reduction once before 4

Last time: image transformations 5

2D Linear Transformations  Can be represented with a 2D matrix  And applied to a point using matrix multiplication 6

Inverse mapping 7

Downsampling  Suppose we scale image by

Downsampling 9

What’s going on?  Aliasing can arise when you sample a continuous signal or image  Occurs when the sampling rate is not high enough to capture the detail in the image  Can give you the wrong signal/image—an alias 10

Examples of aliasing  Wagon wheel effect  Moiré patterns 11 Image credit: Steve Seitz

 This image is too big to fit on the screen. How can we create a half-sized version? Slide credits: Steve Seitz

Image sub-sampling Current approach: throw away every other row and column (subsample) 1/4 1/8

Image sub-sampling 1/4 (2x zoom) 1/8 (4x zoom) 1/2

2D example Good sampling Bad sampling

Image sub-sampling  What’s really going on? 16

Subsampling with pre-filtering Average 4x4Average 8x8Average 2x2 Solution: blur the image, then subsample Filter size should double for each ½ size reduction.

Subsampling with pre-filtering Average 4x4 Average 8x8 Average 2x2 Solution: blur the image, then subsample Filter size should double for each ½ size reduction.

Compare with 1/4 1/8

Recap: convolution  “Filtering”  Take one image, the kernel (usually small), slide it over another image (usually big)  At each point, multiply the kernel times the image, and add up the results  This is the new value of the image 20

Blurring using convolution  2x2 average kernel  4x4 average kernel 21

Sometimes we want many resolutions Known as a Gaussian Pyramid [Burt and Adelson, 1983] In computer graphics, a mip map [Williams, 1983] A precursor to wavelet transform

Back to image transformations  Rotation is around the point (0, 0) – the upper-left corner of the image 23  This isn’t really what we want…

Translation  We really want to rotate around the center of the image  Approach: move the center of the image to the origin, rotate, then the center back  (Moving an image is called “translation”)  But translation isn’t linear… 24

Homogeneous coordinates  Add a 1 to the end of our 2D points (x, y)  (x, y, 1)  “Homogeneous” 2D points  We can represent transformations on 2D homogeneous coordinates as 3D matrices 25

Translation 26  Other transformations just add an extra row and column with [ ] scale translation

Correct rotation  Translate center to origin  Rotate  Translate back to center 27