CS 231A Computer Vision (Winter 2015) Problem Set 2

Similar documents
CS 231A: Computer Vision (Winter 2018) Problem Set 2

55:148 Digital Image Processing Chapter 11 3D Vision, Geometry

Lecture 6 Stereo Systems Multi-view geometry

CS201 Computer Vision Camera Geometry

Lecture 9: Epipolar Geometry

Recovering structure from a single view Pinhole perspective projection

Machine vision. Summary # 11: Stereo vision and epipolar geometry. u l = λx. v l = λy

Lecture 5 Epipolar Geometry

Two-view geometry Computer Vision Spring 2018, Lecture 10

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

CS231M Mobile Computer Vision Structure from motion

Structure from motion

Structure from Motion. Introduction to Computer Vision CSE 152 Lecture 10

Reminder: Lecture 20: The Eight-Point Algorithm. Essential/Fundamental Matrix. E/F Matrix Summary. Computing F. Computing F from Point Matches

Image Rectification (Stereo) (New book: 7.2.1, old book: 11.1)

calibrated coordinates Linear transformation pixel coordinates

BIL Computer Vision Apr 16, 2014

Lecture 6 Stereo Systems Multi- view geometry Professor Silvio Savarese Computational Vision and Geometry Lab Silvio Savarese Lecture 6-24-Jan-15

Metric Structure from Motion

Announcements. Stereo

Epipolar geometry. x x

Structure from Motion

Lecture 14: Basic Multi-View Geometry

Announcements. Stereo

Assignment 2: Stereo and 3D Reconstruction from Disparity

Computer Vision I - Algorithms and Applications: Multi-View 3D reconstruction

Computer Vision I. Announcement. Stereo Vision Outline. Stereo II. CSE252A Lecture 15

Structure from Motion and Multi- view Geometry. Last lecture

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 253

Stereo II CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

Lecture 10: Multi-view geometry

Epipolar Geometry and Stereo Vision

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 263

Lecture 10: Multi view geometry

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Epipolar Geometry and Stereo Vision

Stereo Vision. MAN-522 Computer Vision

Introduction à la vision artificielle X

The end of affine cameras

CSCI 5980: Assignment #3 Homography

Stereo and Epipolar geometry

An idea which can be used once is a trick. If it can be used more than once it becomes a method

CS231A Course Notes 4: Stereo Systems and Structure from Motion

Epipolar Geometry CSE P576. Dr. Matthew Brown

Structure from Motion

Structure from motion

Multiple View Geometry

Rectification and Disparity

Camera Calibration. Schedule. Jesus J Caban. Note: You have until next Monday to let me know. ! Today:! Camera calibration

Epipolar Geometry and the Essential Matrix

Lecture'9'&'10:'' Stereo'Vision'

Structure from Motion

Multi-view geometry problems

CSCI 5980/8980: Assignment #4. Fundamental Matrix

Structure from Motion

Multiple View Geometry. Frank Dellaert

1 (5 max) 2 (10 max) 3 (20 max) 4 (30 max) 5 (10 max) 6 (15 extra max) total (75 max + 15 extra)

Unit 3 Multiple View Geometry

Week 2: Two-View Geometry. Padua Summer 08 Frank Dellaert

Geometry of Multiple views

C / 35. C18 Computer Vision. David Murray. dwm/courses/4cv.

CSE 252B: Computer Vision II

Interlude: Solving systems of Equations

55:148 Digital Image Processing Chapter 11 3D Vision, Geometry

Epipolar Geometry Prof. D. Stricker. With slides from A. Zisserman, S. Lazebnik, Seitz

Vision Review: Image Formation. Course web page:

3D Reconstruction from Two Views

Computer Vision Lecture 17

CSE 252B: Computer Vision II

Computer Vision I. Announcements. Random Dot Stereograms. Stereo III. CSE252A Lecture 16

Introduction to Computer Vision

Computer Vision Lecture 17

Multiple View Geometry in Computer Vision

Rectification and Distortion Correction

Structure from Motion CSC 767

CS 664 Structure and Motion. Daniel Huttenlocher

Correspondence and Stereopsis. Original notes by W. Correa. Figures from [Forsyth & Ponce] and [Trucco & Verri]

Structure from Motion. Lecture-15

ECE 470: Homework 5. Due Tuesday, October 27 in Seth Hutchinson. Luke A. Wendt

CS6670: Computer Vision

CS5670: Computer Vision

Multiple View Geometry in Computer Vision Second Edition

Undergrad HTAs / TAs. Help me make the course better! HTA deadline today (! sorry) TA deadline March 21 st, opens March 15th

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

Camera Model and Calibration

Camera Geometry II. COS 429 Princeton University

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

Final Exam Study Guide

Stereo CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

3D Computer Vision. Structure from Motion. Prof. Didier Stricker

Structure from motion

Epipolar Geometry and Stereo Vision

Multiple View Geometry in Computer Vision

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Fundamentals of Stereo Vision Michael Bleyer LVA Stereo Vision

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3

Epipolar Geometry and Stereo Vision

Stereo. 11/02/2012 CS129, Brown James Hays. Slides by Kristen Grauman

Capturing, Modeling, Rendering 3D Structures

Mysteries of Parameterizing Camera Motion - Part 1

Transcription:

CS 231A Computer Vision (Winter 2015) Problem Set 2 Due Feb 9 th 2015 11:59pm 1 Fundamental Matrix (20 points) In this question, you will explore some properties of fundamental matrix and derive a minimal parameterization for it. a Show that two 3 4 camera matrices M and M can always be reduced to the following canonical forms by an appropriate projective transformation in 3D space, which is represented by a 4 4 matrix H. Here, we assume e T 3 ( A A 1 b+b ) 0, where e 3 = (0, 0, 1) T, M = [A, b] and M = [A, b ]. Note: You don t have to show the explicit form of H for the proof. [10 points] Hint: The camera matrix has rank 3. Block matrix multiplication may be helpful. If you construct a projective transformation matrix H 0 that reduces M to ˆM, (i.e., ˆM = MH0 ) can a H 1 be constructed such that not only does it not affect the reduction of M to ˆM (i.e., ˆM = MH0 H 1 ), but it also reduces M to ˆM? (i.e., ˆM = M H 0 H 1 ) 1 0 0 0 ˆM = 0 1 0 0 and ˆM a 11 a 12 a 13 b 1 = a 21 a 22 a 23 b 2 0 0 1 0 0 0 0 1 b Given a 4 4 matrix H representing a projective transformation in 3D space, prove that the fundamental matrices corresponding to the two pairs of camera matrices (M, M ) and (MH, M H) are the same. [5 points] (Hint: Think about point correspondences) c Using the conclusions from (a) and (b), derive the fundamental matrix F of the camera pair (M, M ) using a 11, a 12, a 13, a 21, a 22, a 23, b 1, b 2. Then use the fact that F is only defined up to a scale factor to construct a seven-parameter expression for F. (Hint: The fundamental matrix corresponding to a pair of camera matrices M = [I 0] and M = [A b] is equal to [b] A.) [5 points] 1

2 Fundamental Matrix Estimation From Point Correspondences (35 points) This programming assignment is concerned with the estimation of the fundamental matrix from point correspondences. Implement both the linear least-squares version of the eight-point algorithm and its normalized version. In both cases, enforce the rank-two constraint for the fundamental matrix via singular value decomposition. The data for this assignment can be found here: http://cs231a.stanford.edu/hw/hw2/ data.zip The zipped file contains two datasets. For each dataset, you will find in the corresponding directory the files pt_2d_1.txt pt_2d_2.txt image1.jpg image2.jpg The first two of these files contain matching image points (in the following format: number n of points followed by n pairs of floating-point coordinates). The two remaining files are the images where the points were found. You must turn in: a. An Algorithmic break-down of the process. [15 points] b. a copy of your code, [15 points] c. For both methods applied to both datasets, the average distance between the points and the corresponding epipolar lines for each image, as well as a drawing similar to Figure 1 (with the selected corresponding points and their epipolar lines). [5 points]. Figure 1: Example illustration, with epipolar lines shown in both images (Image courtesy Forsyth & Ponce) 2

3 Factorization Method (30 points) In this question, you will explore the factorization method, initially presented by Tomasi and Kanade, for solving the affine structure from motion problem. Begin by downloading the code templates and data from http://cs231a.stanford.edu/hw/ hw2/ps2_factor.zip and running the function ps2q2.m. Observe the point correspondences that have been selected in the two images. (a) Now implement the factorization method presented in the lecture slides. You only need to modify the file ps2q2.m, and you only need to enter code in the location that says YOUR CODE HERE. [7 points] (b) Run your code and visualize the result by plotting the resulting 3d points; the plot3 Matlab function may be helpful. For example: plot3(x, y, z,. ); where x, y, z are vectors. We also recommend calling axis equal after making your plots so that the axes will be scaled appropriately. Compare your result to the ground truth provided. The results should look identical, except for a scaling and rotation. Explain why this occurs. [5 points] (c) Report the 4 singular values from the SVD decomposition. Why are there 4 non-zero singular values? How many non-zero singular values would you expect to get in the idealized version of the method, and why? [6 points] (d) Change the file readtextfiles.m by setting usesubset to true, and re-run the code. The file will now only load a subset of the original correspondences. Compare your new results to the ground truth, and explain why they no longer appear similar. [6 points] (e) Report the new singular values, and compare them to the singular values that you found previously. Explain any major changes. [6 points] 4 Stereo Reconstruction (15 points) (a) The figure above shows a rectified stereo rig with camera centers O and O, focal length f and baseline B. x and x are the projected point locations on the virtual image planes by the point P ; note that since x is to the left of O, it is negative. Give an expression for the depth of the point P, shown in the diagram as Z. Also give an expression for the X coordinate of the point P in world coordinates, assuming an origin of O. You can assume that the two are pinhole cameras for the rest of this question. [3 points] (b) Now assume that the camera system can t perfectly capture the projected points location on the image planes, so there is now some uncertainty about the point s location since a real digital camera s image plane is discretized. Assume that the original x and x positions now have an uncertainty of ±e, which is related to discretization of the image plane. 3

Figure 2: Rectified Stereo Rig (B is not the mid point of OO, the figure isn t symmetric) Figure 3: Rectified Stereo Rig with image plane error (i) Give an expression of the X, Z locations of the 4 intersection points resulting from the virtual image plane uncertainty. Your answer should be in terms of f, B, x, x, and e. [3 points] (ii) Give an expression for the maximum uncertainty in the X and Z directions of the point P s location in world coordinates. Your answer should still be in terms of f, B, x, x, and e. [3 points] All expressions should be in terms of image coordinates only, you can assume that x is always positive and x is always negative. 4

(c) Assume the X coordinate of the point P is fixed. (i) Give an expression for the uncertainty in the reconstruction of Z, in terms of the actual value of Z and the other parameters of the stereo rig: f, B, and e (your answer should not include terms for x and x ). [3 points] (ii) Find the depth when the uncertainty is at its maximum and give a physical interpretation and a drawing to explain. [3 points] 5