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

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

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

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

Homework 3: Shading, Raytracing, and Image Processing

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

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE328 Fundamentals of Computer Graphics

Computer Science 336 Fall 2017 Homework 2

1 Affine and Projective Coordinate Notation

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

Image processing. Reading. What is an image? Brian Curless CSE 457 Spring 2017

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

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

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

CS 130 Final. Fall 2015

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

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

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

Unit Circle. Project Response Sheet

Perspective Projection [2 pts]

Why is computer vision difficult?

Image warping , , Computational Photography Fall 2017, Lecture 10

Basics of Computational Geometry

DD2423 Image Analysis and Computer Vision IMAGE FORMATION. Computational Vision and Active Perception School of Computer Science and Communication

UNIT 2 2D TRANSFORMATIONS

Transforms. COMP 575/770 Spring 2013

Computer Graphics 7: Viewing in 3-D

EE795: Computer Vision and Intelligent Systems

(Refer Slide Time: 00:04:20)

Practice Exam Sample Solutions

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

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

Stereo Vision. MAN-522 Computer Vision

CSE152a Computer Vision Assignment 1 WI14 Instructor: Prof. David Kriegman. Revision 0

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

Part 3: 2D Transformation

GEOMETRIC TRANSFORMATIONS AND VIEWING

Computer Vision CSCI-GA Assignment 1.

The Graphics Pipeline. Interactive Computer Graphics. The Graphics Pipeline. The Graphics Pipeline. The Graphics Pipeline: Clipping

SUMMARY. CS380: Introduction to Computer Graphics Varying Variables Chapter 13. Min H. Kim KAIST School of Computing 18/04/26.

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation

2D and 3D Transformations AUI Course Denbigh Starkey

Two-view geometry Computer Vision Spring 2018, Lecture 10

CS 4620 Midterm 1. Tuesday 22 October minutes

Surface shading: lights and rasterization. Computer Graphics CSE 167 Lecture 6

Lesson 20: Exploiting the Connection to Cartesian Coordinates

Chapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Camera Model and Calibration

Representing 2D Transformations as Matrices

Vector Calculus: Understanding the Cross Product

Computer Vision I - Appearance-based Matching and Projective Geometry

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

Midterm Examination CS 534: Computational Photography

Mosaics. Today s Readings

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University

Calculus III. Math 233 Spring In-term exam April 11th. Suggested solutions

Stereo imaging ideal geometry

Robot vision review. Martin Jagersand

Unit 1 NOTES Honors Math 2 1

Chapter 3 Image Registration. Chapter 3 Image Registration

CV: 3D sensing and calibration

Ray Tracer Due date: April 27, 2011

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

Final Review CMSC 733 Fall 2014

Overview. By end of the week:

2D/3D Geometric Transformations and Scene Graphs

Complex Sensors: Cameras, Visual Sensing. The Robotics Primer (Ch. 9) ECE 497: Introduction to Mobile Robotics -Visual Sensors

CS6670: Computer Vision

Triangle Rasterization

Lecture 4: Spatial Domain Transformations

CS201 Computer Vision Lect 4 - Image Formation

CS 4204 Computer Graphics

Computer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG.

CSE 252B: Computer Vision II

Biomedical Image Analysis. Point, Edge and Line Detection

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

Game Engineering: 2D

3D Rendering and Ray Casting

CIS 580, Machine Perception, Spring 2015 Homework 1 Due: :59AM

lecture 10 - depth from blur, binocular stereo

Visual Recognition: Image Formation

Computer Graphics Hands-on

COMP Preliminaries Jan. 6, 2015

CS 184, Fall 1996 Midterm #1 Professor: unknown

Chapter 2: Transformations. Chapter 2 Transformations Page 1

Module 2 Test Study Guide. Type of Transformation (translation, reflection, rotation, or none-of-theabove). Be as specific as possible.

CS4620/5620. Professor: Kavita Bala. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Affine Transformations Computer Graphics Scott D. Anderson

3D Rendering and Ray Casting

1 Review of Functions Symmetry of Functions; Even and Odd Combinations of Functions... 42

Basic Polarization Techniques and Devices 1998, 2003 Meadowlark Optics, Inc

Integrated Algebra A Packet 1

COMP 558 lecture 19 Nov. 17, 2010

CS184, Fall 1997 Midterm #1 Professor Brian A. Barksy

Background for Surface Integration

Section 10.1 Polar Coordinates

MET71 COMPUTER AIDED DESIGN

CS 184, Fall 1996 Midterm #1 Professor: unknown

Transcription:

Computer Graphics Instructor: Brian Curless CSE 457 Spring 215 Homework #1 Displays, Image Processing, Affine Transformations, Hierarchical Modeling Assigned: Thursday, April 9 th Due: Thursday, April 23 rd at the beginning of class Directions: Please provide short written answers to the following questions on your own paper. Feel free to discuss the problems with classmates, but please answer the questions on your own and show your work. Please write your name on your assignment!

Problem 1: Short answer (1 points) a) (6 Points) Much of our perception of 3D arises from the fact that we have two eyes, viewing a scene from two different viewpoints, so-called stereo vision. Given images recorded or rendered for two different viewpoints separated by the typical distance between human eyes, a 3D stereo display presents one image to one eye and the other image to the other eye; our eyes are then fooled into believing they are looking at an actual 3D scene. One approach to 3D displays is based on a standard color LCD display and a pair of LCD shutter glasses. The LCD display first shows a left-eye image, then a right-eye image, and so on, while the LCD shutter glasses synchronously let light reach the left eye, then the right, etc. An LCD shutter is essentially one giant LCD pixel (a crystal sandwiched between two polarizers) with no color filter, driven with a voltage to be either opaque or transmissive. The display and shutters are designed to give a reasonably bright picture when sitting naturally in front of the display. Assume that the LCD crystal at each display pixel is oriented the same way as every other pixel in the display (regardless of color filter). If you tilt your head sideways (i.e., tilting your head over to one of your shoulders, so that the imaginary line segment connecting your eyes is now aligned with the vertical direction), will the displayed images appear dimmer in one eye, both eyes, or neither eye? Justify your answer. Suppose you removed the LCD panel in front of the unpolarized backlight you removed the entire assembly with polarizers, crystals, color filters, everything and looked right at the even backlighting with your naked eye(s); you would see even, white light. Roughly how much dimmer would you expect that light to become after putting the LCD panel back on and putting on the shutter glasses (which are turned on and shuttering), assuming the framebuffer is set to white at each pixel for both eyes? [Note that unpolarized light intensity is cut in half by a linear polarizer. Assume that the R,G,B sub-pixels each transmit 1/3 of the visible spectrum of the light. Perceived brightness is averaged over time.] Justify your answer. b) (4 Points) Consider two vectors u and v which are of non-zero length and not parallel to each other. Which of the following is true and which is false: 1. v u v = v u v 2. u v u v 3. v v u v u 4. v u u v v You do not need to justify your answer. 2

Problem 2: Image processing (25 points) In this problem, you will consider several convolution filtering operations and their behaviors. You do not need to worry about flipping filters before sliding them across images; i.e., assume filters are preflipped. In addition, assume that the y-axis points up, the x-axis points to the right, and the lower left corner of the image is at (,). For each sub-problem, justify your answer. a) (3 points) The image you re editing is too dark and noisy, and you decide you need to blur the image a little with a 3x3 filter to reduce noise, and amplify the overall brightness of the image by a factor of 3. Suggest a single convolution filter that perform this task when applied to the image. (Technically, pixel values could go out of range, i.e., brighter than 255 in one or more color channels at a pixel; assume that any needed clamping will be taken care of later, after filtering). b) (3 points) While taking a photograph with your digital camera, you fail to hold the camera steady, and it translates diagonally along the x = y direction while the shutter is open. You discover this later when you see that diagonal x = -y (or equivalently, y = -x) edges, in particular, have been blurred a bit (an effect called motion blur ). You decide to filter the image so that diagonal x = -y edges are sharpened, but diagonal x = y edges are unchanged. Suggest a single convolution filter that does this. c) (3 points) After thinking a little more about the previous picture, you decide that motion blur is cool, and you want to apply it to another image. In this case, though, you want to simulate the effect of a camera translating horizontally (in the x-direction) while the shutter is open. Suggest a convolution filter that would accomplish some horizontal blurring along that direction by averaging across m pixels. d) (3 points) Describe a non-constant image that, when convolved with your horizontal blur filter from (c), would be unchanged by the filter. (You may ignore the boundaries.) e) (3 points) Suppose now you wanted to create the effect of averaging an image with a vertically shifted copy of itself, where the amount of the shift is 4 pixels in the y-direction. More, specifically, you will take the original image and shift it down by two pixels. Then you will take the original image and shift it up by two pixels. Then you will average these two shifted images together. Suggest a single convolution filter that will accomplish this. f) (1 points) Suppose you pad the boundary of an image in some way that allows you to compute output values for every pixel being filtered by a convolution filter. For an image of dimensions n x n and a filter of dimensions m x m, how many output pixels will be influenced by input pixels hallucinated beyond the boundary of the image? For simplicity, assume that m is odd. However, m and n may otherwise have arbitrary positive values. 3

Problem 3: Triangle coordinates (24 points) Consider triangle ABC and a point Q depicted below: y C A Q B x A, B, C, and Q lie in the x-y plane, so, neglecting the homogeneous coordinate, we can write out their 3D coordinates as: Ax Bx Cx Qx A A y B B y C C y Q Q y The last coordinate is the z coordinate in this case, and we know that Az = Bz = Cz = Qz =. Note that Q is depicted as lying inside of ABC, but you should not assume that it does unless stated otherwise in a sub-problem. Assume that A B C, i.e., the triangle is not degenerate. Further assume that if you curl the fingers of your right hand from A to B to C, your thumb will point in the direction of the positive z-axis. (a) (3 points) Using cross and/or dot products, devise a test (with the help of equations) to ermine if point Q lies inside of ABC. You should assume that the edges and vertices of the triangle are part of the interior of the triangle. [You do not need to expand any cross or dot products in your answer, but you may do so if it helps you.] (b) (2 points) Using cross and/or dot products, compute the unit-length normal to ABC. Your solution should work for 3D points in general, i.e., not depend on the fact that these points lie in the x-y plane. We will use the right-hand rule for triangles, which means that as you curl the fingers of your right hand from A to B to C, your thumb will point in the direction of the normal. [You do not need to expand any cross or dot products in your answer, but you may do so if it helps you.] (c) (3 points) Using cross and/or dot products, compute the area of the triangle, Area(ABC). This time you do need to expand all cross and/or dot products based on the elements of A, B, and C. Multiply out all terms; e.g., an expression like (a+b)(c+d) should be expanded to ac+ad+bc+bd. For the remainder of the problem, we will safely ignore the z coordinate and work in 2D only, but now we will keep track of the affine coordinate (w=1 for all points). We can now represent the triangle vertices and the point Q as: Ax Bx Cx Qx A A y B B y C C y Q Q y 1 1 1 1 4

Again, to be clear, the last coordinate is now the affine w coordinate, which, for affine points, is always 1; i.e., Aw = Bw = Cw = Qw = 1. (d) (2 points) Suppose we create a 3x3 matrix [A B C], i.e., a matrix with columns filled by A, B, and C. Write out this matrix, explicitly filling in the elements of the matrix in terms of the elements of A, B, and C, and compute its erminant, [A B C]. Again, multiply out all terms. (e) (1 point) Based on your answers to (c) and (d), what is Area(ABC) in terms of [A B C]? (f) (1 point) In general, we can express Q as a weighted sum of A, B, and C; i.e., Q = A + B + C, where,, and are scalars. In order for this to be a proper affine combination, what constraint is placed on,, and? Explain. (g) (3 points) Now we will work on solving for,, and. Write out a matrix equation of the form M p = r: m m m p r 1 2 m1 m11 m p 1 r 1 m2 m21 m 22 p 2 r 2 where M is a 3x3 matrix, p is the column vector of unknowns, i.e., p = [] T and r is a column vector with three elements. I.e., explicitly write out the matrix equation, filling in the elements of M, p, and r, in terms of,, and the elements of A, B, C, and Q. (Do not apply the matrix, just set up the equation.) Hint: you can expand Q = A + B + C explicitly in terms of the elements of A, B, C, and Q and the result should be equivalent to your matrix equation. (h) (2 points) We can solve for p using Cramer s rule. In particular, for a matrix equation M p = r as above, we can solve for p as ratios of erminants: r m1 m2 m r m2 m m1 r r1 m11 m m1 r1 m m1 m11 r 1 r2 m21 m22 m2 r2 m22 m2 m21 r2 p p 1 p2 m m1 m2 m m1 m2 m m1 m2 m1 m11 m m1 m11 m m1 m11 m m2 m21 m 22 m2 m21 m 22 m2 m21 m 22 Note how the denominator is always the erminant of M, and the numerator is the erminant of a matrix that consists of M with one of the columns replaced with the elements of r. Based on your answer to (g), re-write these same Cramer s rule equations using,, and the elements of A, B, C, and Q. (i) (3 points) Assume Q is inside of ABC. In this case, all of the erminants in (h) are positive. Based on your answer to (e), re-write your answer to (h) in terms of areas of triangles. (j) (2 points) Suppose Q = B. What should,, and be? Justify your answer in terms of areas of triangles. (k) (2 points) Suppose Q is halfway between A and C. What should,, and be? Justify your answer in terms of areas of triangles. 5

Problem 4: 3D Affine Transformations (17 points) The equation nˆ x d describes the plane pictured below which has unit length normal ˆn pointing away from the origin and is a distance d from the origin (in the direction of the normal vector). Any point x x y z 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. 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 Mxy 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. 6

Problem 5: Hierarchical modeling (24 points) Suppose you want to model the pincer with accordion joint illustrated below. The model is comprised of 8 parts, using primitives A and B. The model is shown in two poses below, with the controlling parameters of the model illustrated on the far right. The illustration on the right also shows a point P that the model is reaching toward, as described in sub-problem c). Assume that and can take values in the range [, 9 o ]. Also assume that all parts use primitive A, except for part 6, which uses primitive B. The model on the left shows the primitives used, the model on the right shows the enumeration (naming) of the parts. The following transformations are available to you: R() rotate by degrees (counter clockwise) T(a, b) translate by a b a) (16 points) Construct a tree to describe this hierarchical model using part 1 as the root. 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 the order of transformations is important! Show your work wherever the transformations are not obvious. Your tree should contain a bunch of boxes (or circles) each containing one part number (1 8); these boxes should be connected by line segments, each labeled with a corresponding transformation that connects child to parent. The tree must have one or more branches in it. If two parts are connected physically, then they should be connected in the tree, as long as you don t form a cycle by connecting them. b) (2 points) Write out the full transformation expression for part 7. c) (6 points) Suppose the primitives are infinitesimally thin, w 1 = h 2 =, and have lengths h 1 = 1 and w 2 =. Assume that part 1 sits right on the origin in world coordinates. What would the and parameters have to be so that the model extends out and closes the pincer just enough to precisely grasp the point P 28 T, in world coordinates. Show your work. 7