Announcements Problem Set 2, handed out today, due next Tuesday. Late Homework should be turned into my office with date and time written on it. Mail problem.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Chapter 4 Euclidean Vector Spaces
3D Geometry for Computer Graphics
CS 691 Computational Photography Instructor: Gianfranco Doretto Image Warping.
Announcements. Structure-from-Motion Determining the 3-D structure of the world, and/or the motion of a camera using a sequence of images taken by a moving.
Linear Algebra.
Geometry (Many slides adapted from Octavia Camps and Amitabh Varshney)
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
Chapter 4.1 Mathematical Concepts
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
Computer Graphics Recitation 5.
Linear Algebra and SVD (Some slides adapted from Octavia Camps)
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
Invariants. Definitions and Invariants A definition of a class means that given a list of properties: –For all props, all objects have that prop. –No.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2008 Some slides from Steve Seitz
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2005 Some slides from Steve Seitz
Structure-from-Motion Determining the 3-D structure of the world, and/or the motion of a camera using a sequence of images taken by a moving camera. –Equivalently,
Now Playing: My Mathematical Mind Spoon From Gimme Fiction Released May 10, 2005.
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Computer Graphics CSC 630 Lecture 2- Linear Algebra.
Announcements Class mailing list: send to Hyoungjune Yi: Homework at the end of class. Text is on reserve in the.
Linear Algebra Review. 6/26/2015Octavia I. Camps2 Why do we need Linear Algebra? We will associate coordinates to –3D points in the scene –2D points in.
Lecture 7 Sept 19, 11 Goals: two-dimensional arrays (continued) matrix operations circuit analysis using Matlab image processing – simple examples Chapter.
Computer Graphics (Fall 2008) COMS 4160, Lecture 3: Transformations 1
Lecture 6 Sept 15, 09 Goals: two-dimensional arrays matrix operations circuit analysis using Matlab image processing – simple examples.
Matlab Tutorial Continued Files, functions and images.
Computer Graphics (Fall 2004) COMS 4160, Lecture 3: Transformations 1
CS6825: Linear Algebra Overview 2 Why do we need Linear Algebra? We will associate coordinates to We will associate coordinates to 3D points in the scene3D.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/27/11 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1,
Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka Virginia de Sa (UCSD) Cogsci 108F Linear.
Multi-view geometry. Multi-view geometry problems Structure: Given projections of the same 3D point in two or more images, compute the 3D coordinates.
Image Warping (Szeliski 3.6.1) cs129: Computational Photography James Hays, Brown, Fall 2012 Slides from Alexei Efros and Steve Seitz
Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Matlab tutorial and Linear Algebra Review Today’s goals: Learn enough matlab to get started. Review some basics of Linear Algebra Essential for geometry.
Elementary Linear Algebra Anton & Rorres, 9th Edition
Warping CSE 590 Computational Photography Tamara Berg.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/24/15 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
1 MAC 2103 Module 6 Euclidean Vector Spaces I. 2 Rev.F09 Learning Objectives Upon completing this module, you should be able to: 1. Use vector notation.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/23/10 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Geometric Transformations Sang Il Park Sejong University Many slides come from Jehee Lee’s.
Fall 2004CS-321 Dr. Mark L. Hornick 1 2-D Transformations World Coordinates Local/Modelling Coordinates x y Object descriptions Often defined in model.
Affine Geometry.
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Basic Theory (for curve 01). 1.1 Points and Vectors  Real life methods for constructing curves and surfaces often start with points and vectors, which.
Recap from Monday DCT and JPEG Point Processing Histogram Normalization Questions: JPEG compression levels Gamma correction.
Image Warping Many slides from Alyosha Efros + Steve Seitz + Derek oeim Photo by Sean Carroll.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Graphics Graphics Korea University kucg.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Image Warping 2D Geometric Transformations
CS682, Jana Kosecka Rigid Body Motion and Image Formation Jana Kosecka
MTH108 Business Math I Lecture 20.
Translation Symmetry (Sliding).
Transforms.
3. Transformation
Problem 1.5: For this problem, we need to figure out the length of the blue segment shown in the figure. This can be solved easily using similar triangles.
Computational Photography Derek Hoiem, University of Illinois
Linear Algebra Review.
Lecture 03: Linear Algebra
COMP 175: Computer Graphics February 9, 2016
2D transformations (a.k.a. warping)
(c) University of Wisconsin, CS559
Linear Algebra A gentle introduction
Computational Photography Derek Hoiem, University of Illinois
Presentation transcript:

Announcements Problem Set 2, handed out today, due next Tuesday. Late Homework should be turned into my office with date and time written on it. Mail problem sets in one zipped file to farrell (at) cs.umd.edu. When ing matlab code to Ryan, use subject: CMSC 426 Matlab code.

Matlab tutorial and Linear Algebra Review Today’s goals: Learn enough matlab to get started. Review some basics of Linear Algebra Essential for geometry of points and lines. But also, all math is linear algebra. (ok slight exaggeration). Many slides today adapted from Octavia Camps, Penn State.

Starting Matlab For PCs, Matlab should be a program. For Sun’s: Numerical Analysis and Visualization Matlab 6.1

Help help help command Eg., help plus Help on toolbar demo Tutorial: /matlab/

Matlab interpreter Many common functions: see help ops

Vectors Ordered set of numbers: (1,2,3,4) Example: (x,y,z) coordinates of pt in space.

Indexing into vectors

Vector Addition v w V+w

Scalar Product v av

Operations on vectors sum max, min, mean, sort, … Pointwise:.^

Inner (dot) Product v w  The inner product is a SCALAR!

How do we prove these properties of the inner product? Let’s start with the fact that orthogonal vectors have 0 inner product. Suppose one vector is (x,y), and WLOG x,y>0. Then, if we rotate that by 90 degrees counterclockwise, we’ll get (y, -x). Rotating the vector is just like rotating the coordinate system in the opposite direction. And (x,y)*(y,-x) = xy – yx = 0. Next, note that v*w = (v*w)/(||v||||w||) * ||v||||w|| This means that if we can show that when v and w are unit vectors v*w = cos alpha, then it will follow that in general v*w = ||v|| ||w|| cos alpha. So suppose v and w are unit vectors. Next, note that if w1 + w2 = w, then v*w = v*(w1+w2) = v*w1 + v*w2. For any w, we can write it as the sum of w1+w2, where w1 is perpendicular to v, and w2 is in the same direction as v. So v*w1 = 0. v*w2 = ||w2||, since v*w2/||w2|| = 1. Then, if we just draw a picture, we can see that cos alpha = ||w2|| = v*w2 = v*w.

Matrices Sum: A and B must have the same dimensions

Matrices Product: A and B must have compatible dimensions Identity Matrix:

Matrices Transpose: If A is symmetric

Matrices Determinant: A must be square

Matrices Inverse: A must be square

Indexing into matrices

Euclidean transformations

2D Translation t P P’

2D Translation Equation P x y txtxtxtx tytytyty P’ t

2D Translation using Matrices P x y txtxtxtx tytytyty P’ t tP

Scaling P P’

Scaling Equation P x y s.x P’ s.y

Rotation P P’

Rotation Equations Counter-clockwise rotation by an angle  P x Y’ P’  X’ y

Why is this true? (cos theta, - sin theta) is what we get if we rotate (1,0) clockwise by theta. So it is just the x axis, rotated by theta. Similarly, (sin theta, cos theta) is the y axis rotated clockwise by theta. Then, x’ is the inner product of the rotated x axis with (x,y). So it is just the x coordinate of the point according to the new x axis. And similarly, y’ is the coordinate of (x,y) relative to the new y axis.

Degrees of Freedom R is 2x2 4 elements BUT! There is only 1 degree of freedom:  The 4 elements must satisfy the following constraints:

Stretching Equation P x y S x.x P’ S y.y

Stretching = tilting and projecting (with weak perspective)

Linear Transformation SVD

Affine Transformation

Files Matlab

Functions Format: function o = test(x,y) Name function and file the same. Only first function in file is visible outside the file. Look at sample function

Images Black and white image is a 2D matrix. Intensities represented as pixels. Color images are 3D matrix, RBG. Matlab

Debugging Add print statements to function by leaving off ; keyboard debug and breakpoint

Conclusions Quick tour of matlab, you should teach yourself the rest. We’ll give hints in problem sets. The inner product will be very important.