Homework #1. Displays, Image Processing, Affine Transformations, Hierarchical modeling, Projections

Similar documents
Homework #1. Displays, Image Processing, Affine Transformations, Hierarchical Modeling

Homework #1. Displays, Image Processing, Affine Transformations, Hierarchical Modeling

Homework #1. Displays, Alpha Compositing, Image Processing, Affine Transformations, Hierarchical Modeling

Representing 2D Transformations as Matrices

Lesson 5.6: Angles in Standard Position

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

Computer Graphics 7: Viewing in 3-D

Lesson 27: Angles in Standard Position

1 Affine and Projective Coordinate Notation

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

Homework #2. Shading, Ray Tracing, and Texture Mapping

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014

CS 559 Computer Graphics Midterm Exam March 22, :30-3:45 pm

CSE328 Fundamentals of Computer Graphics

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CS 130 Final. Fall 2015

Graphics and Interaction Transformation geometry and homogeneous coordinates

E0005E - Industrial Image Analysis

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

You will have the entire period (until 9:00pm) to complete the exam, although the exam is designed to take less time.

MATHEMATICS FOR ENGINEERING TRIGONOMETRY

2D and 3D Transformations AUI Course Denbigh Starkey

Computer Science 336 Fall 2017 Homework 2

Vector Calculus: Understanding the Cross Product

For each question, indicate whether the statement is true or false by circling T or F, respectively.

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves

Math 7 Elementary Linear Algebra PLOTS and ROTATIONS

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer

Conics, Parametric Equations, and Polar Coordinates. Copyright Cengage Learning. All rights reserved.

Final Review CMSC 733 Fall 2014

Section 10.1 Polar Coordinates

CS 184, Fall 1996 Midterm #1 Professor: unknown

Lecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016

MATRIX REVIEW PROBLEMS: Our matrix test will be on Friday May 23rd. Here are some problems to help you review.

2D Object Definition (1/3)

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009

MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS

Image warping , , Computational Photography Fall 2017, Lecture 10

CS 4620 Midterm 1. Tuesday 22 October minutes

Finite Math - J-term Homework. Section Inverse of a Square Matrix

N-Views (1) Homographies and Projection

AQA GCSE Further Maths Topic Areas

Conics, Parametric Equations, and Polar Coordinates. Copyright Cengage Learning. All rights reserved.

Computer Graphics: Viewing in 3-D. Course Website:

2D Transforms. Lecture 4 CISC440/640 Spring Department of Computer and Information Science

Answers to practice questions for Midterm 1

2D transformations: An introduction to the maths behind computer graphics

GEOMETRIC TRANSFORMATIONS AND VIEWING

The points (2, 2, 1) and (0, 1, 2) are graphed below in 3-space:

Institutionen för systemteknik

CS1114 Assignment 5, Part 1

(Refer Slide Time: 00:04:20)

Unit Circle. Project Response Sheet

Homework 3: Shading, Raytracing, and Image Processing

Linear algebra deals with matrixes: two-dimensional arrays of values. Here s a matrix: [ x + 5y + 7z 9x + 3y + 11z

EE795: Computer Vision and Intelligent Systems

PreCalculus Unit 1: Unit Circle Trig Quiz Review (Day 9)

Today. Parity. General Polygons? Non-Zero Winding Rule. Winding Numbers. CS559 Lecture 11 Polygons, Transformations

Unit 1 NOTES Honors Math 2 1

2D/3D Geometric Transformations and Scene Graphs

Computer Vision I Name : CSE 252A, Fall 2012 Student ID : David Kriegman Assignment #1. (Due date: 10/23/2012) x P. = z

Polynomials. Math 4800/6080 Project Course

Technical Arts 101 Prof. Anupam Saxena Department of Mechanical engineering Indian Institute of Technology, Kanpur. Lecture - 7 Think and Analyze

MODULE - 7. Subject: Computer Science. Module: Other 2D Transformations. Module No: CS/CGV/7

2.0 Trigonometry Review Date: Pythagorean Theorem: where c is always the.

Chapter 18. Geometric Operations

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

y= sin( x) y= cos( x)

Viewing with Computers (OpenGL)

Camera Model and Calibration

3.0 Trigonometry Review

CS201 Computer Vision Lect 4 - Image Formation

Math 231E, Lecture 34. Polar Coordinates and Polar Parametric Equations

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

Homogeneous Coordinates and Transformations of the Plane

Lecture 5 2D Transformation

TRANSFORMATIONS. The original figure is called the pre-image; the new (copied) picture is called the image of the transformation.

Kinematics of the Stewart Platform (Reality Check 1: page 67)

Overview. By end of the week:

Anno accademico 2006/2007. Davide Migliore

Introduction to Transformations. In Geometry

Biomedical Image Analysis. Point, Edge and Line Detection

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care?

Topics and things to know about them:

EXAM SOLUTIONS. Image Processing and Computer Vision Course 2D1421 Monday, 13 th of March 2006,

Game Engineering CS S-05 Linear Transforms

Appendix D Trigonometry

DD2429 Computational Photography :00-19:00

CS 184, Fall 1996 Midterm #1 Professor: unknown

Lab 2B Parametrizing Surfaces Math 2374 University of Minnesota Questions to:

5/27/12. Objectives. Plane Curves and Parametric Equations. Sketch the graph of a curve given by a set of parametric equations.

Graphics Hardware and Display Devices

MAT 003 Brian Killough s Instructor Notes Saint Leo University

Graphics pipeline and transformations. Composition of transformations

Pre Calculus Worksheet: Fundamental Identities Day 1

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations

Camera Model and Calibration. Lecture-12

Graphics Pipeline 2D Geometric Transformations

NAME: Sample Final Exam (based on previous CSE 455 exams by Profs. Seitz and Shapiro)

Transcription:

Computer Graphics Instructor: rian Curless CSEP 557 Winter 213 Homework #1 Displays, Image Processing, Affine Transformations, Hierarchical modeling, Projections Assigned: Tuesday, January 22 nd Due: Tuesday, January 29 th at the beginning of class Directions: Please provide short written answers to the following questions, using this page as a cover sheet. Feel free to discuss the problems with classmates, but please answer the questions on your own. Name:

Problem 1: Short answers (14 points) Provide short answers to each of the following questions: a) (2 points) In order to draw 3D graphics without noticeable screen refresh artifacts, we always use double-buffering. Do we need to duplicate both the color buffer and the Z-buffer to avoid these artifacts? Explain. b) (2 points) How do you normalize a convolution filter, and what is the purpose of doing so? c) (2 points) Suppose, for each pixel of a grayscale image, you only average pixels in a 5x5 neighborhood that have values within +/-5% of the pixel being filtered. This is a kind of bilateral filter. Could this be written as a convolution filter? Explain. d) (4 points) How would you compute the unit-length normal to a triangle in 3D with vertices A,, and C, specified according to the right-hand rule (where curling the fingers of your right hand from A to to C will leave your thumb pointing along the normal direction)? What happens if A,, and C are colinear? e) (4 Points) Consider a pair of three dimensional vectors, u and v, which are of non-zero length and not parallel to each other. Label each of the following is True, False, or Nonsense (i.e., involving an operation that cannot be performed). vuuuuv vu uuuv vuuuuv u u v u v v You do not need to justify your answer for part (e). 2

Problem 2: Alpha compositing (19 points) The alpha channel is used to control blending between colors. The most common use of alpha is in the compositing equation C = F + (1-) or C C C R G F F F R G ( 1 ) R G where is the blending coefficient, F is the foreground color, is the background color, and C is the composite color. In film production, compositing is a common operation for putting a foreground character into a new scene (background). The challenge faced with real imagery is to extract per pixel alpha and foreground color from a live action sequence, to enable compositing over a new background. (a) (4 points) When filming an actor, a color C is observed at each pixel. If the three observed color channel values C R, C G, and C are the only knowns at a given pixel, how many unknowns remain in the compositing equation at that pixel? Treating each color channel separately, how many equations are there at the pixel? Is it generally possible to solve for all the unknowns under these circumstances? [Note: we are treating each pixel in isolation, so in each of these problems, you should just be thinking in terms of a single pixel.] (b) (3 points) To assist the process of extracting the desired F and values, the actor may be filmed against a known background, typically solid blue or green. If the components of are known, how many unknowns remain at a given pixel? Is it possible, in general, to solve for F and under these circumstances? (c) (6 points) When filming the original Star Wars trilogy, the starships were assumed to contain only shades of gray and were filmed against a solid blue background. Thus, at a given pixel, the visual effects people could assume F = [L L L] T, where L is a shade of gray, and = [ 1] T, where color channel values are in the range [...1]. Given an observed color C = [C R C G C ] T at a pixel, compute and L in terms of the color components of C. You should comment on how to handle the case when =. Show your work. [Note: if the answer is not unique, just provide one possible solution.] (d) (6 points) Suppose you had the luxury of two consecutive images of a stationary foreground subject against a blue and a green background in succession, = [ 1] T and G = [ 1 ] T, thus recording two colors, C and D, respectively, at each pixel. You would then have to consider two color compositing equations C = F + (1-) and D = F + (1-) G. Solve for and the components of the foreground color, F R, F G, and F at a given pixel in terms of the components of C and D. Show your work. [Note: if the answer is not unique, just provide one possible solution.] 3

Problem 3: Image Processing (16 points) Suppose we have two filters: -1 1 Filter A 1 2 1 Filter a) (3 points) In class, we described a simple and intuitive version of an x-gradient filter: [-1 1]. When applied, this filter computes the finite difference gradient in the x-direction, essentially solving for f / x f / x, where x = 1 and pixels are one unit distance from their neighbors. Filter A, by contrast, is used to compute what is known as the central difference x-gradient. Although it cannot be normalized in the usual way, since its values sum to zero, it is usually multiplied by a coefficient of ½. Why? b) (3 points) Normalize. What effect will this normalized filter have when applied to an image? c) (4 points) Compute A*, using A and from the original problem statement, i.e., without using the scale factors described in (a) and (b). You can treat as the filter kernel and assume that A is zero outside of its support. You do not need to show your work. [Aside: convolution is commutative (A*=*A), so you would get the same answer by using A as the filter kernel. ut, you would have to remember to flip the ~ kernel to get A[ i, j] A[ i, j]. We ve asked you instead to use as the filter kernel, but since is ~ symmetric, i.e., [ i, j] [ i, j] [ i, j], you don t need to worry about flipping.] d) (2 points) Compute A*, now using A and after scaling them according to (a) and (b). e) (4 points) If we apply the result of (c) or (d) to an image f, we are computing (A*)*f. Convolution is associative, so we would get the same results as computing A*(*f). In other words, we re filtering the image with, and then filtering the result with A. Why would it be desirable to apply before computing the gradient (as opposed to not applying at all)? Why might applying be better than applying a filter that is filled with a full 3x3 set of coefficients, rather than just a single column of coefficients? [Answer both of these questions.] 4

Problem 4: 3D Affine Transformations (19 points) The equation nˆ x d describes the plane pictured below which has unit length normal ˆn pointing away from x x y z the origin and is a distance d from the origin (in the direction of the normal vector). Any point on the plane must satisfy the plane equation nˆ x d. M xy 1 1 1 1 Now consider a plane with normal lying in the y-z plane (not shown). The normal will have the form (, sinθ, cosθ) for some θ. The equation for the plane is then y sin z cos d. Write out the product of 4x4 matrices that would perform a reflection across this plane. One of these matrices will be a reflection matrix; you must use the matrix M xy above, which performs a reflection across the x-y plane. You must write out the elements of the matrices and the product order in which they would be applied, but you do not need to multiply them out. Justify your answer with words and/or drawings. 5

Problem 5: Hierarchical modeling (18 points) Suppose you want to model the robot arm with calipers, shown below. The arm is made out of six parts (1-6), and each part is drawn as one of the four primitives (A-D). A C D (ase) (Arm Segment) (ar) (Caliper) The following transformations are also available to you: R() rotate by degrees (counter-clockwise) T(a, b) translate by [a b] T Note that the angle parameters in the illustration above are each positive in the current configuration in the illustration ( +6 o, +11 o, +4 o ), though of course the model can be re-posed by changing these parameters. 6

Problem 5: Hierarchical Modeling (cont d) a) (15 points) Construct a tree to specify the robot arm that is rooted at 1. Along each of the edges of the tree, write expressions for the transformations that are applied along that edge, using the notation given above (you do not need to write out the matrices). Remember that order is important! Your tree should contain a bunch of boxes (or circles) each containing one part number (1 6); these boxes should be connected by line segments, each labeled with a corresponding transformation that connects child to parent. The calipers are distance d away from each other, and equidistant from the center of the bar they are attached to. (Note: Each caliper (objects 5 & 6) is attached to the bar (object 4) so you will need to reflect this fact in your tree.) b) (3 points) Write out the full transformation expression for the part labeled 5. Problem 6: Projections (14 Points) In class, we derived the matrix for perspective projection for a viewer sitting at the origin looking down the z axis. Suppose now that we assume that the projection plane PP passes through the origin, and the viewer is at the COP somewhere on the +z axis, still looking in the z direction, as illustrated in the figure below. y h z COP θ p' P x PP In addition, assume that we parameterize the projection in terms of viewing angle that measures the angle from top to bottom subtended by the image, which is of height h, and lies in the projection plane. The size of the image (and thus h) is constant throughout this problem. a) (8 Points) What is the projection matrix that we would use to map a point P = [x y z 1] T to p = [x y 1] T. (The w coordinate for p will be 1 after doing the perspective divide.) Your answer should be in terms of and h only. Show your work. b) (4 Points) Solve for and write out the projection matrix when =. Also solve for p when =. What kind of projection does this case correspond to? c) (2 Points) What happens to p as goes to 18 o? Why? 7