Interpolation, extrapolation, etc. Prof. Ramin Zabih

Slides:



Advertisements
Similar presentations
Book Scanning & Digital Image Production The VRC Guide to Imaging By Kate Stepp.
Advertisements

Least squares CS1114
Week 7 - Wednesday.  What did we talk about last time?  Transparency  Gamma correction  Started texturing.
December 5, 2013Computer Vision Lecture 20: Hidden Markov Models/Depth 1 Stereo Vision Due to the limited resolution of images, increasing the baseline.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Prof. Ramin Zabih (CS) Prof. Ashish Raj (Radiology) CS5540: Computational Techniques for Analyzing Clinical Data.
Clustering and greedy algorithms — Part 2 Prof. Noah Snavely CS1114
Interpolation Prof. Noah Snavely CS1114
Time to wake up. ChitChat Talk with the person sitting next to you –Ask him/her Name (if you do not know already) What have you done during this morning.
Computer Science 335 Data Compression.
Finding Red Pixels – Part 2 Prof. Noah Snavely CS1114
Feature-based object recognition Prof. Noah Snavely CS1114
Imaging Techniques in Digital Cameras Presented by Jinyun Ren Jan
Blobs and Graphs Prof. Noah Snavely CS1114
1 Computer Science 631 Lecture 4: Wavelets Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
Clustering and greedy algorithms Prof. Noah Snavely CS1114
Computing transformations Prof. Noah Snavely CS1114
Optimizing picture file size. Three things you can do to lower file size  Lower the resolution  Crop the picture  Save with a file format that uses.
File Formats The most common image file formats, the most important for cameras, printing, scanning, and internet use, are JPG, TIF, PNG, and GIF.
Digital Photography Basics. Pixels A pixel is a contraction if the term PIcture ELement. Digital images are made up of small squares, just like a tile.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
Understanding Web Graphics Web Design Section 5-4 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
CS448f: Image Processing For Photography and Vision Wavelets Continued.
Coming up in Math 110: Today: Section 8.2 (Quadratic formula)
Tips for Photography Assignment FYS100 Creative Discovery in Digital Art Forms Spring 2007 Burg.
Chpater 3 Resolution, File Formats and Storage. Introduction There are two factors that determine the quality of the picture you take; The resolution.
1 Ethics of Computing MONT 113G, Spring 2012 Session 11 Graphics on the Web Limits of Computer Science.
MPEG MPEG-VideoThis deals with the compression of video signals to about 1.5 Mbits/s; MPEG-AudioThis deals with the compression of digital audio signals.
Voronoi diagrams and applications Prof. Ramin Zabih
CAP5415: Computer Vision Lecture 4: Image Pyramids, Image Statistics, Denoising Fall 2006.
 Refers to sampling the gray/color level in the picture at MXN (M number of rows and N number of columns )array of points.  Once points are sampled,
JRN 440 Adv. Online Journalism Resizing and resampling Monday, 2/6/12.
December 4, 2014Computer Vision Lecture 22: Depth 1 Stereo Vision Comparing the similar triangles PMC l and p l LC l, we get: Similarly, for PNC r and.
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Still-image compression Moving-image compression and File types.
Storage allocation issues Prof. Ramin Zabih
Image segmentation Prof. Noah Snavely CS1114
What’s in a sum? Simon Dawes CMHAS. Should you stack frames using Mean, Median or Sum?
Interpolation Prof. Noah Snavely CS1114
Finding Red Pixels Prof. Ramin Zabih
Medians and blobs Prof. Ramin Zabih
Robustness and speed Prof. Noah Snavely CS1114
Math 104 Calculus I Part 6 INFINITE SERIES. Series of Constants We’ve looked at limits and sequences. Now, we look at a specific kind of sequential limit,
Figure ground segregation in video via averaging and color distribution Introduction to Computational and Biological Vision 2013 Dror Zenati.
Data Representation The storage of Text Numbers Graphics.
Clustering Prof. Ramin Zabih
1 Computer Science 631 Multimedia Systems Prof. Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
 By Bob “The Bird” Fiske & Anita “The Snail” Cost.
Image File Formats. What is an Image File Format? Image file formats are standard way of organizing and storing of image files. Image files are composed.
Information Technology Images: Types, Resolution and Techniques.
Sorting and selection – Part 2 Prof. Noah Snavely CS1114
Digital Imaging. Introduction Digital Imaging is used every day in life. Has become less expensive and easier to use than film.
CSSE463: Image Recognition Day 29 This week This week Today: Surveillance and finding motion vectors Today: Surveillance and finding motion vectors Tomorrow:
Or, how to make it all fit! DIGITAL VIDEO FILES AND COMPRESSION STANDARDS.
Understanding Web Graphics
Garbage collection; lightstick orientation
Proof by Contradiction
Image transformations
Resolution and Printing Tips
Data Representation.
Prof. Ramin Zabih Least squares fitting Prof. Ramin Zabih
Fundamentals of Data Representation
Quickselect Prof. Noah Snavely CS1114
Prof. Ramin Zabih Beyond binary search Prof. Ramin Zabih
Sorting, selecting and complexity
Bounding Boxes, Algorithm Speed
Quicksort and selection
Getting to the bottom, fast
Presentation transcript:

Interpolation, extrapolation, etc. Prof. Ramin Zabih

2 Administrivia  Assignment 5 is out, due Wednesday  A6 is likely to involve dogs again  Monday sections are now optional –Will be extended office hours/tutorial  Prelim 2 is Thursday –Coverage through today –Gurmeet will do a review tomorrow

3 Hillclimbing is usually slow m b Lines with errors < 40 Lines with errors < 30

4 Extrapolation  Suppose you only know the values of the distance function f(1), f(2), f(3), f(4) –What is f(5)?  This problem is called extrapolation –Figuring out a value outside the range where you have data –The process is quite prone to error –For the particular case of temporal data, extrapolation is called prediction –If you have a good model, this can work well

5 Interpolation  Suppose you only know the values of the distance function f(1), f(2), f(3), f(4) –What is f(2.5)?  This problem is called interpolation –Figuring out a value inside the range where you have data But at a point where you don’t have data –Less error-prone than extrapolation  Still requires some kind of model –Otherwise, crazy things could happen between the data points that you know

6 Analyzing noisy temporal data  Suppose that your data is temporal –Radar tracking of airplanes, or DJIA  There are 3 things you might wish to do –Prediction: given data through time T, figure out what will happen at time T+1 –Estimation: given data through time T, figure out what actually happened at time T Sometimes called filtering –Smoothing: given data through time T, figure out what actually happened at time T-1 Or even earlier

7 Image interpolation  Suppose we have a picture and want to make a bigger one –I.e., higher resolution  Lots of applications (if it could be done…) –Example: take a low-resolution picture on your cellphone, then create a high-resolution version to display on your computer monitor  Note that image extrapolation is clearly much harder –What is outside the picture? Who knows??

8 Scanline interpolation  Let’s just consider a single row –In an image, this is called a scanline Terminology comes from CRT’s  Suppose we have 100 data points –x values are 1, 2, 3, …, 100 –We know f(1), f(2), …, f(100)  How do we get another 99 data points? –x values of 1, 1.5, 2, 2.5, …, 99.5, 100 –We need f(1.5), f(2.5), …, f(99.5)

9 Motivating example

10 Obvious solution  f(2.5) is the average of f(2) and f(3)

11 Results

12 Linear interpolation  Suppose we want to interpolate f(2.2)? –As before, depend on f(2) and f(3) –If f(2) = 100, and f(3) = 200, f(2.2) = 120  With some algebra we can generalize this –Be sure to always check the boundary cases!

13 Nearest neighbor interpolation  There is an even simpler technique –Which will be useful when we look at color object recognition (real soon now…)  We can simply figure out which known value we are closest to, and use that –f(2.2) = f(2), f(2.9) = f(3), f(2.6) = f(3), etc.  This is a fast way to get a bad answer

14 Bilinear interpolation  What about in 2D? –Interpolate in x, then in y  Example –We know the red values –Linear interpolation between red values gives us the blue values –Linear interpolation between the blue values gives us the answer  This is order-independent

15 Limits of interpolation  Can you prove that it is impossible to interpolate soundly? –An algorithm is sound if it always gives the right answer This is widely considered a desirable property  Suppose I claim to have a sound way to produce an image with 4x as many pixels –Sound, in this context, means that it gives what a better camera would have captured –Can you prove this cannot work?  Related to impossibility of compression

16 Example algorithm that can’t exist  Consider a compression algorithm, like zip –Take a file F, produce a smaller version F’ –Given F’, we can uncompress to recover F –This is lossless compression, because we can “invert” it MP3, JPEG, MPEG, etc. are not lossless  Claim: there is no such algorithm that always produces a smaller file F’

17 Proof of claim  Pick a file F, produce F’ by compression –F’ is smaller than F, by assumption  Now run compression on F’ –Get an even smaller file, F’’  At the end, you’ve got a file with only a single byte (a number from 0 to 255) –Yet by repeatedly uncompressing this you can eventually get F  However, there are more than 256 different files F that you could start with!