MA/CS 375 Fall 20021 MA/CS 375 Fall 2002 Lecture 23.

Slides:



Advertisements
Similar presentations
8.3 Inverse Linear Transformations
Advertisements

259 Lecture 17 Working with Data in MATLAB. Overview  In this lecture, we’ll look at some commands that are useful for working with data!  fzero  sum,
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 9 Instructor: Tim Warburton.
Laboratory of Image Processing Pier Luigi Mazzeo
1 RTL Example: Video Compression – Sum of Absolute Differences Video is a series of frames (e.g., 30 per second) Most frames similar to previous frame.
Chapter 14 Landsat 7 image of the retreating Malaspina Glacier, Alaska.
Engineering Mathematics Class #15 Fourier Series, Integrals, and Transforms (Part 3) Sheng-Fang Huang.
(a) an ordered list of objects.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 18 Sit in your groups.
MA/CS375 Fall MA/CS 375 Fall 2002 Lecture 4.
School of Computing Science Simon Fraser University
ISYS 3074 Graphics File Formats File formats have developed with applications. At least 50 currently in use. Examples include: GIF, JPEG, TIFF, BMP, DIB,
Finding Red Pixels – Part 2 Prof. Noah Snavely CS1114
CS430 © 2006 Ray S. Babcock CS430 – Image Processing Image Representation.
Lecture 7 Sept 19, 11 Goals: two-dimensional arrays (continued) matrix operations circuit analysis using Matlab image processing – simple examples Chapter.
Lecture 6 Sept 15, 09 Goals: two-dimensional arrays matrix operations circuit analysis using Matlab image processing – simple examples.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 32.
8 TECHNIQUES OF INTEGRATION. There are two situations in which it is impossible to find the exact value of a definite integral. TECHNIQUES OF INTEGRATION.
5. 1 JPEG “ JPEG ” is Joint Photographic Experts Group. compresses pictures which don't have sharp changes e.g. landscape pictures. May lose some of the.
Lecture II-2: Probability Review
Function approximation: Fourier, Chebyshev, Lagrange
Computational Methods in Physics PHYS 3437 Dr Rob Thacker Dept of Astronomy & Physics (MM-301C)
1 Ethics of Computing MONT 113G, Spring 2012 Session 11 Graphics on the Web Limits of Computer Science.
Solving Scale Linear Systems (Example system continued) Lecture 14 MA/CS 471 Fall 2003.
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
ME 1202: Linear Algebra & Ordinary Differential Equations (ODEs)
TOPIC 7 MODIFYING PIXELS IN A MATRIX NESTED FOR LOOPS 1 Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by.
Lecture 22 MA471 Fall Advection Equation Recall the 2D advection equation: We will use a Runge-Kutta time integrator and spectral representation.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Matlab Workshop 1/10/07 Lesson 1: Matlab as a graphing calculator.
1 CS6825: Digital images How are DIGITAL images created. How are DIGITAL images created. Previous lecture we discussed how ANALOG images are created Previous.
MA/CS 3751 Fall 2002 Lecture 24. MA/CS 3752 ginput ginput is a Matlab function which takes one argument input: number of points to select in the image.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 31.
Digital Image Processing Lecture 6: Image Geometry
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 8.
Understanding JPEG MIT-CETI Xi’an ‘99 Lecture 10 Ben Walter, Lan Chen, Wei Hu.
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 21.
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 12.
ManipulatingPictures-Mod6-part61 Manipulating Pictures, Arrays, and Loops: Eliminating color, Inversion, grey scale and adjusting for luminance Barb Ericson.
Computer Vision Introduction to Digital Images.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
MA/CS375 Fall MA/CS 375 Fall 2002 Lecture 7.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 23.
 By Bob “The Bird” Fiske & Anita “The Snail” Cost.
June 14, ‘99 COLORS IN MATLAB.
CMPS1371 Introduction to Computing for Engineers IMAGES.
Mathematical Writing chapter 7 Roozbeh Izadian Fall 2015.
Computer Science 121 Scientific Computing Winter 2014 Chapter 14 Images.
MA/CS 375 Fall 2002 Lecture 2. Motivation for Suffering All This Math and Stuff Try the Actor demo from
CS5500 Computer Graphics April 23, Today’s Topic Details of the front-end of the 3D pipeline: –How to construct the viewing matrix? –How to construct.
Solving Scalar Linear Systems A Little Theory For Jacobi Iteration
Do Now: #18 and 20 on p.466 Find the interval of convergence and the function of x represented by the given geometric series. This series will only converge.
MA/CS375 Fall MA/CS 375 Fall 2002 Lecture 6.
Textures – Basic Principles Lecture 29 Fri, Nov 14, 2003.
MA/CS375 Fall MA/CS 375 Fall 2002 Lecture 5.
John Federici NJIT Physics Department
Images In Matlab.
Visualizing the Error of Approximation of Interpolating Polynomials
Digital 2D Image Basic Masaki Hayashi
MA/CS 375 Fall 2002 Lecture 9 MA/CS375 Fall 2002.
Computer Vision Lecture 4: Color
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Multimedia System Image
Machine learning overview
5.6 Complex Zeros; Fundamental Theorem of Algebra
Presentation transcript:

MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 23

MA/CS 375 Fall Class Exercise Part 1: –Build a function called vandermonde.m which accepts a vector of x values and a polynomial order P –In the function find N=length of x –Function returns a matrix V which is Nx(P+1) and whose entries are: V(n,m) = (x n ) (m-1) Part 2: –Translate this pseudo-code to a Matlab script: –for N=1:5:20 build x = set of N points in [-1,1] build f = exp(x) build xfine = set of 10N points in [-1,1] build Vorig = vandermonde(N-1,x) build Vfine = vandermonde(N-1,xfine) build Finterp = Vfine*(Vorig\f); plot x,f and xfine,Finterp on the same graph –end

MA/CS 375 Fall Runge Phenomenon Theorem 2 (van Loan page 90) –Suppose If(x) is an N-1’th order interpolating polynomial of the function f at N distinct points x 1,x 2,..,x N. If f is N times continuously differentiable on an interval I containing the {x 1,x 2,..,x N } then for any x in I=[a,b]:

MA/CS 375 Fall Runge Phenomenon If we base the interpolant on the equi- spaced points then after some basic math we can show: where M N bounds the N’th derivative

MA/CS 375 Fall Runge Phenomenon If we base the interpolant on the equi-spaced points then after some basic math we can show: where M N bounds the N’th derivative Hence if the N’th derivative is badly behaved this bound suggests the quality of interpolation may decrease with increasing N!!.

MA/CS 375 Fall Example: Runge Phenomenon Use your Vandermonde routine to interpolate the function: for 10,20,30,40,50,60 points on the interval [-1,1] Volunteer to describe what happens

MA/CS 375 Fall Interpolating in Two Directions A picture (e.g. jpeg, tif or gif) is actually an array of pixel values There are a number of ways to represent color on the pixel. 1)gif uses a colormap, indexed by an integer 2)jpeg uses an 8 bit number for each component of red, green and blue

MA/CS 375 Fall Loading an Image in Matlab % read in the three dimensional array pic = imread(‘foo.jpg’); red = pic(:,:,1); green = pic(:,:,2); blue = pic(:,:,3);

MA/CS 375 Fall Double The Resolution In Each Direction Using 4 th order Interpolation

MA/CS 375 Fall Results From Interpolation Notice 600 pixelsNotice 300 pixels

MA/CS 375 Fall Details of Interpolation

MA/CS 375 Fall Details of Interpolation Notice reduced pixellation on new image

MA/CS 375 Fall But Not So Fast

MA/CS 375 Fall Now try 10 th order interpolation

MA/CS 375 Fall Not So Good! Note stripes appearing on new image

MA/CS 375 Fall Close Up of 10 th Order Interpolation Looks quite bad!!!

MA/CS 375 Fall What’s Going On We have divided each line of the picture into non-overlapping sections, containing 10 points each. We have then interpolated the picture values at the 10 points to 20 points on the same section The equispaced points lead to the Runge phenomenon i.e. highly oscillatory interpolants at the ends of each section How can we make this better?

MA/CS 375 Fall Team Exercise ( a little tricky – feel free to use loops) Even for 10+ points the interpolant function is probably going to be ok at the center of the region. 1)build VDM for N points (N even) 2)build weights = VDM\(1;0;0;…;0) 3)load in your jpeg picture 4) now use these weights to build the interpolating values between each given points

MA/CS 375 Fall Nth Order Mid-point Interpolation

MA/CS 375 Fall Nth Order Mid-point Interpolation

MA/CS 375 Fall Nth Order Mid-point Interpolation

MA/CS 375 Fall Summary So we have started to invert general matrix systems to obtain interpolating polyomial coefficients We saw the Runge phenomenon in action when equi-spaced interpolation is used We improved things somewhat by ignoring the interpolating polynomial away from the center of its range.

MA/CS 375 Fall Next Time Using Matlab’s built in interpolation routine Morphing images class project