Interpolation, extrapolation, etc.

Similar documents
Image transformations. Prof. Noah Snavely CS Administrivia

Voronoi diagrams and applications

Introduction to Computer Vision

Optimization and least squares. Prof. Noah Snavely CS1114

Image Warping and Morphing. Alexey Tikhonov : Computational Photography Alexei Efros, CMU, Fall 2007

Simple Graph. General Graph

Classification and K-Nearest Neighbors

QED Q: Why is it called the triangle inequality? A: Analogue with euclidean distance in the plane: picture Defn: Minimum Distance of a code C:

Announcements. Problem Set 3 due Friday, October 21. Alternate Midterm Times. Drop by office hours! Ask questions at

CS664 Lecture #21: SIFT, object recognition, dynamic programming

CS4442/9542b Artificial Intelligence II prof. Olga Veksler

Microsoft Expression Web is usually obtained as a program within Microsoft Expression Studio. This tutorial deals specifically with Versions 3 and 4,

Feature Extractors. CS 188: Artificial Intelligence Fall Some (Vague) Biology. The Binary Perceptron. Binary Decision Rule.

So, what is data compression, and why do we need it?

Lecture 4: examples of topological spaces, coarser and finer topologies, bases and closed sets

Tips on DVD Authoring and DVD Duplication M A X E L L P R O F E S S I O N A L M E D I A

CS/COE 1501

Motion and Tracking. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

ISA 562: Information Security, Theory and Practice. Lecture 1

Edges, interpolation, templates. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

Classification: Feature Vectors

An Interesting Way to Combine Numbers

Standard File Formats

CS61C : Machine Structures

CS4442/9542b Artificial Intelligence II prof. Olga Veksler

CS178: Machine Learning and Data Mining. Complexity & Nearest Neighbor Methods

Caches. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See P&H 5.1, 5.2 (except writes)

Image Warping and Morphing. Alexey Tikhonov

Image Warping and Morphing. Alexey Tikhonov

CSC 421: Algorithm Design & Analysis. Spring 2015

INTRODUCTORY COMPUTER NETWORKS PHYSICAL LAYER, DIGITAL TRANSMISSION FUNDAMENTALS. Faramarz Hendessi

Today. Types of graphs. Complete Graphs. Trees. Hypercubes.

Feature Extractors. CS 188: Artificial Intelligence Fall Nearest-Neighbor Classification. The Perceptron Update Rule.

Linked lists. Prof. Noah Snavely CS1114

Image Compression With Haar Discrete Wavelet Transform

Lecture 1: Overview

CS5670: Computer Vision

The Boundary Graph Supervised Learning Algorithm for Regression and Classification

Computing in the Modern World

计算原理导论. Introduction to Computing Principles 智能与计算学部刘志磊

Case-Based Reasoning. CS 188: Artificial Intelligence Fall Nearest-Neighbor Classification. Parametric / Non-parametric.

CS 188: Artificial Intelligence Fall 2008

Gerald's Column by Gerald Fitton

CSE 573: Artificial Intelligence Autumn 2010

Strongly connected: A directed graph is strongly connected if every pair of vertices are reachable from each other.

Learning and Generalization in Single Layer Perceptrons

1 Counting triangles and cliques

Introduction to Geographic Information Science. Some Updates. Last Lecture 4/6/2017. Geography 4103 / Raster Data and Tesselations.

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL:

CS106B Handout 34 Autumn 2012 November 12 th, 2012 Data Compression and Huffman Encoding

Nathanaël COTTIN 14/05/2010 Hide secret information within innocuous carriers

EE 264: Image Processing and Reconstruction. Image Motion Estimation I. EE 264: Image Processing and Reconstruction. Outline

Optical Flow-Based Motion Estimation. Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides.

Data Representation. Reminders. Sound What is sound? Interpreting bits to give them meaning. Part 4: Media - Sound, Video, Compression

Edges, interpolation, templates. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

CS/COE 1501

Errors. Chapter Extension of System Model

Nearest Neighbor Classifiers

Jingyi Yu CISC 849. Department of Computer and Information Science

Retrospective Testing - How Good Heuristics Really Work

Compression; Error detection & correction

Nearest neighbors classifiers

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Week 14. Video Compression. Ref: Fundamentals of Multimedia

CS5112: Algorithms and Data Structures for Applications

Introduction to Machine Learning Prof. Anirban Santara Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Mathematics of Data. INFO-4604, Applied Machine Learning University of Colorado Boulder. September 5, 2017 Prof. Michael Paul

Ch5. Divide-and-Conquer

About MPEG Compression. More About Long-GOP Video

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression

CIS 121 Data Structures and Algorithms with Java Spring 2018

Video Texture. A.A. Efros

CS 498PS Audio Computing Lab. Audio Restoration. Paris Smaragdis. paris.cs.illinois.edu U NIVERSITY OF URBANA-CHAMPAIGN

ECE 499/599 Data Compression & Information Theory. Thinh Nguyen Oregon State University

Image Filtering, Warping and Sampling

CSC258: Computer Organization. Memory Systems

Slide Set 5. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Review : Pipelining. Memory Hierarchy

GCSE Computing. Revision Pack TWO. Data Representation Questions. Name: /113. Attempt One % Attempt Two % Attempt Three %

Homework Assignment #3

Coarse-to-fine image registration

Key Point. What are Cache lines

Motion Detection. Final project by. Neta Sokolovsky

Memory Bandwidth and Low Precision Computation. CS6787 Lecture 9 Fall 2017

Assignment # 4 Selected Solutions

Ma/CS 6b Class 26: Art Galleries and Politicians

2. Use elementary row operations to rewrite the augmented matrix in a simpler form (i.e., one whose solutions are easy to find).

Cache-Oblivious Traversals of an Array s Pairs

CS 343: Artificial Intelligence

1 Motivation for Improving Matrix Multiplication

MPEG-4: Simple Profile (SP)

Diffusion Wavelets for Natural Image Analysis

CS61C : Machine Structures

Lossy Coding 2 JPEG. Perceptual Image Coding. Discrete Cosine Transform JPEG. CS559 Lecture 9 JPEG, Raster Algorithms

1 Leaffix Scan, Rootfix Scan, Tree Size, and Depth

Introduction to LAN/WAN. Application Layer 4

CS70 - Lecture 6. Graphs: Coloring; Special Graphs. 1. Review of L5 2. Planar Five Color Theorem 3. Special Graphs:

Basis Functions. Volker Tresp Summer 2016

Edge Detection (with a sidelight introduction to linear, associative operators). Images

1 Algorithm and Proof for Minimum Vertex Coloring

Transcription:

Interpolation, extrapolation, etc. Prof. Ramin Zabih http://cs100r.cs.cornell.edu

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 2

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

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 4

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 5

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 6

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?? 7

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) 8

Motivating example 180 160 140 120 100 80 60 40 0 10 20 30 40 50 60 70 80 90 100 9

Obvious solution f(2.5) is the average of f(2) and f(3) 180 180 160 160 140 140 120 120 100 100 80 80 60 60 40 0 10 20 30 40 50 60 70 80 90 100 40 0 10 20 30 40 50 60 70 80 90 100 10

Results 11

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! 12

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 13

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 14

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 15

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 16

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! 17