CSCI 5980/8980: Assignment #4. Fundamental Matrix

Similar documents
3D Reconstruction of a Hopkins Landmark

Project: Camera Rectification and Structure from Motion

Srikumar Ramalingam. Review. 3D Reconstruction. Pose Estimation Revisited. School of Computing University of Utah

Computer Vision CSCI-GA Assignment 1.

Project 2: Structure from Motion

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

1 Projective Geometry

Stereo and Epipolar geometry

Project: Camera Rectification and Structure from Motion

CSCI 5980: Assignment #3 Homography

Srikumar Ramalingam. Review. 3D Reconstruction. Pose Estimation Revisited. School of Computing University of Utah

EECS 442: Final Project

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

Two-View Geometry (Course 23, Lecture D)

calibrated coordinates Linear transformation pixel coordinates

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

CS201 Computer Vision Camera Geometry

arxiv: v1 [cs.cv] 28 Sep 2018

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

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

Computational Optical Imaging - Optique Numerique. -- Multiple View Geometry and Stereo --

3D Geometry and Camera Calibration

Multiview Stereo COSC450. Lecture 8

Assignment 2: Stereo and 3D Reconstruction from Disparity

Multiple View Geometry

Camera Drones Lecture 3 3D data generation

Epipolar Geometry and Stereo Vision

Epipolar Geometry CSE P576. Dr. Matthew Brown

Today. Stereo (two view) reconstruction. Multiview geometry. Today. Multiview geometry. Computational Photography

Rectification and Disparity

Two-view geometry Computer Vision Spring 2018, Lecture 10

3D Reconstruction from Two Views

Lecture 14: Basic Multi-View Geometry

Observations. Basic iteration Line estimated from 2 inliers

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

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

Homographies and RANSAC

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

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

Structure from motion

Multiple View Geometry in Computer Vision Second Edition

Lecture 9: Epipolar Geometry

Multiple View Geometry in Computer Vision

Application questions. Theoretical questions

Rectification and Distortion Correction

Vision 3D articielle Multiple view geometry

Computational Optical Imaging - Optique Numerique. -- Single and Multiple View Geometry, Stereo matching --

Image correspondences and structure from motion

The end of affine cameras

Fundamental Matrix & Structure from Motion

arxiv: v1 [cs.cv] 28 Sep 2018

Name of student. Personal number. Teaching assistant. Optimisation: Stereo correspondences for fundamental matrix estimation.

Stereo Vision. MAN-522 Computer Vision

Geometry of Multiple views

Camera Model and Calibration

Camera Geometry II. COS 429 Princeton University

A Systems View of Large- Scale 3D Reconstruction

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

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Final project bits and pieces

CS 6320 Computer Vision Homework 2 (Due Date February 15 th )

Computer Vision Lecture 17

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

Computer Vision Lecture 17

Vision par ordinateur

Epipolar Geometry and Stereo Vision

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

JRC 3D Reconstructor CAMERA CALIBRATION & ORIENTATION

Stereo Epipolar Geometry for General Cameras. Sanja Fidler CSC420: Intro to Image Understanding 1 / 33

Augmenting Reality, Naturally:

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

3D Sensing and Reconstruction Readings: Ch 12: , Ch 13: ,

CS664 Lecture #19: Layers, RANSAC, panoramas, epipolar geometry

Instance-level recognition II.

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

Epipolar Geometry and Stereo Vision

Lecture 5 Epipolar Geometry

Flexible Calibration of a Portable Structured Light System through Surface Plane

Multiple Views Geometry

Project 4 Results. Representation. Data. Learning. Zachary, Hung-I, Paul, Emanuel. SIFT and HoG are popular and successful.

3D reconstruction class 11

CS231A Midterm Review. Friday 5/6/2016

Epipolar Geometry class 11

Visual Odometry. Features, Tracking, Essential Matrix, and RANSAC. Stephan Weiss Computer Vision Group NASA-JPL / CalTech

3D Reconstruction From Multiple Views Based on Scale-Invariant Feature Transform. Wenqi Zhu

Step-by-Step Model Buidling

There are many cues in monocular vision which suggests that vision in stereo starts very early from two similar 2D images. Lets see a few...

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

Structure from motion

Adaptive Zoom Distance Measuring System of Camera Based on the Ranging of Binocular Vision

Instance-level recognition part 2

BIL Computer Vision Apr 16, 2014

Recovering structure from a single view Pinhole perspective projection

1. Stereo Correspondence. (100 points)

Instance-level recognition

Miniature faking. In close-up photo, the depth of field is limited.

Computer Vision: Lecture 3

MERGING POINT CLOUDS FROM MULTIPLE KINECTS. Nishant Rai 13th July, 2016 CARIS Lab University of British Columbia

COMPARATIVE STUDY OF DIFFERENT APPROACHES FOR EFFICIENT RECTIFICATION UNDER GENERAL MOTION

Instance-level recognition I. - Camera geometry and image alignment

Transcription:

Submission CSCI 598/898: Assignment #4 Assignment due: March 23 Individual assignment. Write-up submission format: a single PDF up to 5 pages (more than 5 page assignment will be automatically returned.). MATLAB code submission in conjunction with visualization. Submission through Moodle.

CSCI 598/898: Assignment #4 2 VLFeat Installation One of key skills to learn in computer vision is the ability to use other open source code, which allow you not to re-invent the wheel. We will use VLFeat by A. Vedaldi and B. Fulkerson (28) for SIFT extraction given your images. Install VLFeat from following: http://www.vlfeat.org/install-matlab.html Run vl demo sift basic to double check the installation is completed. (NOTE) You will use this library only for SIFT feature extraction and its visualization. All following visualizations and algorithms must be done by your code. 3 SIFT Feature Extraction Figure : Given your two cellphone images (left and right), you will extract SIFT descriptors and visualize them using VLFeat. You will extract David Lowe s SIFT (Scale Invariant Feature Transform) features from your cellphone images as shown in Figure. First, take a pair of pictures with your calibrated camera (intrinsic parameter, K, and radial distortion parameter, k, are precalibrated.) as follow:. Take the first picture and another one after moving one step right (m). 2. Common 3D objects across different depths, e,g., buildings, ground plane, and tree, appear in both images. 3. Two images have to be similar enough so that the appearance based image matching can be applied, i.e., SIFT feature does not break, while maintaining the baseline between cameras (at least m), i.e., similar camera orientation and sufficient translation. 2

CSCI 598/898: Assignment #4 4. Avoid a 3D scene dominated by one planar surface, e.g., looking at ground plane. Write-up: (SIFT visualization) Use VLFeat to visualize SIFT features with scale and orientation as shown in Figure. You may want to plot up to 5 feature points. You may want to follow the following tutorial: http://www.vlfeat.org/overview/sift.html 3

CSCI 598/898: Assignment #4 4 SIFT Feature Matching (a) Matching from I to I 2 (b) Matching from I 2 to I (c) Matching from I to I 2 after ratio test (d) Matching from I 2 to I after ratio test (e) Bidirectional matching between I and I 2 Figure 2: You will match points between I and I 2 using SIFT features. (NOTE) From this point, you cannot use any function provided by VLFeat. The SIFT is composed of scale, orientation, and 28 dimensional local feature descriptor (integer), f Z 28. You will use the SIFT features to match between two images, I and I 2. Write-up: () (Nearest neighbor search) Let two sets of features be {f,, f N } from I and {g,, g N2 } from I 2 where N and N 2 are the number of features in image and 2, respectively. Compute nearest neighbor per feature and visualize ({f,, f N } {g,, g N2 } and {g,, g N2 } {f,, f N }) as shown in Figure 2(a) and Figure 2(b). Note that the distance between two features is defined as d = f g. You may use knnsearch function in MATLAB. 4

CSCI 598/898: Assignment #4 (2) (Ratio test) Filter out matches using the ratio test, i.e., keep the match if d ij /d ij2 <.7 and discard otherwise, where d ij and d ij2 are the first and second nearest neighbors for the i th feature, respectively. Visualize the matches after the ratio test as shown Figure 2(d) and Figure 2(c). (3) (Bidirectional match) Visualize bidirectionally consistent matches as shown Figure 2(e). Compare the number of matches from () to (3). 5

CSCI 598/898: Assignment #4 5 Fundamental matrix Figure 3: You will visualize epipole and epipolar lines for each image. Compute a fundamental matrix between I and I 2. Write-up: () (Fundamental matrix) Complete the following function to compute a fundamental matrix, linearly: F = ComputeFundamentalMatrix(u, v) Input: u and v are N f 2 matrices of 2D correspondences where the N f is the number of 2D correspondences, u v. Output: F R 3 3 is a rank 2 fundamental matrix. (2) (Epipole and epipolar line) Pick 8 random correspondences, u r v r, compute the fundamental matrix, F r and visualize epipole and epipolar lines for the rest of feature points in both images as shown in Figure 3. Pick different sets of correspondences and visualize different epipolar lines. 6

CSCI 598/898: Assignment #4 6 Robust Estimation Estimate the fundamental matrix using RANSAC. Write-up: () (RANSAC with fundamental matrix) Write a RANSAC algorithm for the fundamental matrix estimation given N matches from Section 4 using the following pseudo code: Algorithm GetInliersRANSAC : n 2: for i = : M do 3: Choose 8 correspondences, u r and v r, randomly from u and v. 4: F r = ComputeFundamentalMatrix(u r, v r ) 5: Compute the number of inliers, n r, with respect to F. 6: if n r > n then 7: n n r 8: F = F r 9: end if : end for (2) (Epipole and epipolar line) Using the fundamental matrix, visualize epipole and epipolar lines. 7

CSCI 598/898: Assignment #4.8.6.4.2 -.6 -.4 -.2.2.4.6.8.2.2 -.2 -.4 -.6 -.5 - -.5.5.5 -.5.2.4 -.2.2 -.4 -.2.2.4.6.8 -.6 -.5 - -.5.5 Figure 4: Four configurations of camera pose from a fundamental matrix. (3) (Camera pose estimation) Compute 4 configurations of relative camera poses: [R C R2 C2 R3 C3 R4 C4] = CameraPose(F, K) Input: F is the fundamental matrix and K is the intrinsic parameter. Output: R C R4 C4 are rotation and camera center (represented in the world coordinate system). (4) Visualize the 4 configuration in 3D as shown in Figure 4. 8

7 Triangulation CSCI 598/898: Assignment #4 Given four configurations of relative camera pose, you will find the best camera pose by verifying through 3D point triangulation. Write-up: () (Linear triangulation) Write a code that computes the 3D point given the correspondence, u v, and two camera projection matrices: [X] = LinearTriangulation(P,u,P 2,v) Input: P, P 2 R 3 4 are two camera projection matrices, and u v R 2 are their 2D correspondence. Output: X R 3 is the triangulated 3D point. Hint: Use the triangulation method by linear solve, i.e., ] [ u [ v ] P P 2 [ X ] = (2) (Cheirality) Write a code that computes the number of 3D points in front of two cameras. The condition of a 3D point being in front of camera is called cheirality: idx = CheckCheirality(Y,C,R,C 2,R 2 ) Input: Y is a n 3 matrix that includes n 3D points, and C,R /C 2,R 2 are the first and second camera poses (camera center and rotation). Output: idx is a set of indices of 3D points that satisfy cheirality. Hint: the point must satisfy r 3 (X C) > where r 3 is the 3rd row of the rotation matrix (z-axis of the camera), C is the camera position and X is the 3D point. 9

CSCI 598/898: Assignment #4 (3) (Camera pose disambiguation) Based on cheirality, find the correct camera pose. Visualize 3D camera pose and 3D points together as shown in Figure 5. Hint: Use plot3 and DisplayCamera.m to visualize them. -2-4 -6-8 8 6 4 2-5 5 - -5 5 (a) nvalid = (b) nvalid = 488 4 2 2-2 -2-4 -8-6 -4-2 2 4 6 8-8 -6-4 -2 2 4 6 (c) nvalid = (d) nvalid = Figure 5: You will visualize four camera pose configurations with point cloud. (4) (Reprojection) Project 3D points to each camera and visualize reprojection, û and measurement, u onto the image as shown in Figure 6, i.e., [ ] û λ = KR [ I C ] [ ] X where X is the reconstructed point. Reprojection Measurement Reprojection Measurement Figure 6: Visualization of measurements and reprojection.