Scene Modeling for a Single View

Similar documents
Scene Modeling for a Single View

Scene Modeling for a Single View

Scene Modeling for a Single View

Single-view 3D Reconstruction

Single View Geometry. Camera model & Orientation + Position estimation. What am I?

More Single View Geometry

More Single View Geometry

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

Single-view metrology

More Single View Geometry

N-Views (1) Homographies and Projection

More Single View Geometry

Image Warping and Mosacing

Projective Geometry and Camera Models

Projective Geometry and Camera Models

Image warping and stitching

CS4670: Computer Vision

Image warping and stitching

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

Pinhole Camera Model 10/05/17. Computational Photography Derek Hoiem, University of Illinois

But First: Multi-View Projective Geometry

More Mosaic Madness. CS194: Image Manipulation & Computational Photography. Steve Seitz and Rick Szeliski. Jeffrey Martin (jeffrey-martin.

Single-view 3D reasoning

COSC579: Scene Geometry. Jeremy Bolton, PhD Assistant Teaching Professor

Image Formation. Antonino Furnari. Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania

1 Projective Geometry

CIS 580, Machine Perception, Spring 2016 Homework 2 Due: :59AM

CS6670: Computer Vision

Computer Vision Project-1

Computer Graphics 7: Viewing in 3-D

3D Reconstruction from Scene Knowledge

CHAPTER 3. Single-view Geometry. 1. Consequences of Projection

ATIP A Tool for 3D Navigation inside a Single Image with Automatic Camera Calibration

Agenda. Perspective projection. Rotations. Camera models

Single View Geometry. Camera model & Orientation + Position estimation. What am I?

METRIC PLANE RECTIFICATION USING SYMMETRIC VANISHING POINTS

Computer Vision CS 776 Fall 2018

CSCI 5980: Assignment #3 Homography

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Three-Dimensional Viewing Hearn & Baker Chapter 7

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Perspective projection. A. Mantegna, Martyrdom of St. Christopher, c. 1450

Computer Vision Projective Geometry and Calibration. Pinhole cameras

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

CS6670: Computer Vision

Agenda. Rotations. Camera models. Camera calibration. Homographies

calibrated coordinates Linear transformation pixel coordinates

Midterm Examination CS 534: Computational Photography

A simple method for interactive 3D reconstruction and camera calibration from a single view

Computer Graphics. P05 Viewing in 3D. Part 1. Aleksandra Pizurica Ghent University

Camera Calibration. COS 429 Princeton University

Capturing Light: Geometry of Image Formation

CMPSCI 670: Computer Vision! Image formation. University of Massachusetts, Amherst September 8, 2014 Instructor: Subhransu Maji

Camera Geometry II. COS 429 Princeton University

Structure from Motion. Prof. Marco Marcon

Homographies and Mosaics

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...

Viewing. Reading: Angel Ch.5

Geometric camera models and calibration

Agenda. Rotations. Camera calibration. Homography. Ransac

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

3D Geometric Computer Vision. Martin Jagersand Univ. Alberta Edmonton, Alberta, Canada

Image-Based Lighting

Image stitching. Digital Visual Effects Yung-Yu Chuang. with slides by Richard Szeliski, Steve Seitz, Matthew Brown and Vaclav Hlavac

Prof. Feng Liu. Fall /19/2016

Chapter 5. Projections and Rendering

CS4670/5670: Computer Vision Kavita Bala. Lec 19: Single- view modeling 2

Computer Vision cmput 428/615

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

Think-Pair-Share. What visual or physiological cues help us to perceive 3D shape and depth?

Another Look at Camera Control

Lecture 8: Camera Models

I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S

Multiple View Geometry

CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems

Scanline Rendering 1 1/42

Modeling Light. On Simulating the Visual Experience

Single View Geometry. Camera model & Orientation + Position estimation. Jianbo Shi. What am I? University of Pennsylvania GRASP

CS 112 The Rendering Pipeline. Slide 1

CS 4204 Computer Graphics

Introduction to Computer Vision

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Rigid Body Motion and Image Formation. Jana Kosecka, CS 482

CS-9645 Introduction to Computer Vision Techniques Winter 2019

Automatic Photo Popup

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

Augmented Reality II - Camera Calibration - Gudrun Klinker May 11, 2004

Visible-Surface Detection Methods. Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin

Ray Tracer I: Ray Casting Due date: 12:00pm December 3, 2001

Viewing. Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

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

Game Architecture. 2/19/16: Rasterization

CS 184, Fall 1996 Midterm #1 Professor: unknown

CSE328 Fundamentals of Computer Graphics

3D Computer Vision II. Reminder Projective Geometry, Transformations

Homographies and RANSAC

Multiple View Geometry in computer vision

Transcription:

Scene Modeling for a Single View René MAGRITTE Portrait d'edward James CS194: Image Manipulation & Computational Photography with a lot of slides stolen from Alexei Efros, UC Berkeley, Fall 2014 Steve Seitz and David Brogan,

Breaking out of 2D now we are ready to break out of 2D And enter the real world!

on to 3D Enough of images! We want more of the plenoptic function We want real 3D scene walk-throughs: Camera rotation Camera translation Can we do it from a single photograph?

Camera rotations with homographies Original image St.Petersburg photo by A. Tikhonov Virtual camera rotations

Camera translation Does it work? synthetic PP PP1 PP2

Yes, with planar scene (or far away) PP3 PP1 PP2 PP3 is a projection plane of both centers of projection, so we are OK!

So, what can we do here? Model the scene as a set of planes! Now, just need to find the orientations of these planes.

Some preliminaries: projective geometry Ames Room

Silly Euclid: Trix are for kids! Parallel lines???

The projective plane Why do we need homogeneous coordinates? represent points at infinity, homographies, perspective projection, multi-view relationships What is the geometric intuition? a point in the image is a ray in projective space (0,0,0) z y x (x,y,1) (sx,sy,s) image plane Each point (x,y) on the plane is represented by a ray (sx,sy,s) all points on the ray are equivalent: (x, y, 1) (sx, sy, s)

Projective lines What does a line in the image correspond to in projective space? A line is a plane of rays through origin all rays (x,y,z) satisfying: ax + by + cz = 0 in vector notation : 0 = [ a b c] x y z A line is also represented as a homogeneous 3-vector l l p

Point and line duality A line l is a homogeneous 3-vector It is to every point (ray) p on the line: l p=0 l p 1 p 2 l 2 l 1 p What is the line l spanned by rays p 1 and p 2? l is to p 1 and p 2 l = p 1 p 2 l is the plane normal What is the intersection of two lines l 1 and l 2? p is to l 1 and l 2 p = l 1 l 2 Points and lines are dual in projective space given any formula, can switch the meanings of points and lines to get another formula

Ideal points and lines y (sx,sy,0) z x image plane Ideal point ( point at infinity ) p (x, y, 0) parallel to image plane It has infinite image coordinates Ideal line l (0, 0, 1) parallel to image plane

Vanishing points image plane vanishing point camera center ground plane Vanishing point projection of a point at infinity

Vanishing points (2D) image plane vanishing point camera center line on ground plane

Vanishing points image plane vanishing point V camera center C line on ground plane line on ground plane Properties Any two parallel lines have the same vanishing point v The ray from C through v is parallel to the lines An image may have more than one vanishing point

Vanishing lines v 1 v 2 Multiple Vanishing Points Any set of parallel lines on the plane define a vanishing point The union of all of these vanishing points is the horizon line also called vanishing line Note that different planes define different vanishing lines

Vanishing lines Multiple Vanishing Points Any set of parallel lines on the plane define a vanishing point The union of all of these vanishing points is the horizon line also called vanishing line Note that different planes define different vanishing lines

Computing vanishing points Properties P is a point at infinity, v is its projection They depend only on line direction Parallel lines P 0 + td, P 1 + td intersect at P V D P P t + = 0 + + + + + + = 0 1/ / / / 1 Z Y X Z Z Y Y X X Z Z Y Y X X t D D D t t D t P D t P D t P td P td P td P P P = ΠP v P 0 D

Computing vanishing lines C l Properties ground plane l is intersection of horizontal plane through C with image plane Compute l from two sets of parallel lines on ground plane All points at same height as C project to l points higher than C project above l Provides way of comparing height of objects in the scene

Fun with vanishing points

Tour into the Picture (SIGGRAPH 97) Create a 3D theatre stage of five billboards Specify foreground objects through bounding polygons Use camera transformations to navigate through the scene

The idea Many scenes (especially paintings), can be represented as an axis-aligned box volume (i.e. a stage) Key assumptions: All walls of volume are orthogonal Camera view plane is parallel to back of volume Camera up is normal to volume bottom How many vanishing points does the box have? Three, but two at infinity Single-point perspective Can use the vanishing point to fit the box to the particular Scene!

Fitting the box volume User controls the inner box and the vanishing point placement (# of DOF???) Q: What s the significance of the vanishing point location? A: It s at eye level: ray from COP to VP is perpendicular to image plane.

Example of user input: vanishing point and back face of view volume are defined High Camera

Example of user input: vanishing point and back face of view volume are defined High Camera

Example of user input: vanishing point and back face of view volume are defined Low Camera

Example of user input: vanishing point and back face of view volume are defined Low Camera

Comparison of how image is subdivided based on two different camera positions. You should see how moving the box corresponds to moving the eyepoint in the 3D world. High Camera Low Camera

Another example of user input: vanishing point and back face of view volume are defined Left Camera

Another example of user input: vanishing point and back face of view volume are defined Left Camera

Another example of user input: vanishing point and back face of view volume are defined Right Camera

Another example of user input: vanishing point and back face of view volume are defined Right Camera

Comparison of two camera placements left and right. Corresponding subdivisions match view you would see if you looked down a hallway. Left Camera Right Camera

2D to 3D conversion First, we can get ratios left right top back plane vanishing point bottom

2D to 3D conversion Size of user-defined back plane must equal size of camera plane (orthogonal sides) Use top versus side ratio to determine relative height and width dimensions of box Left/right and top/bot ratios determine part of 3D camera placement left camera pos right top bottom

Depth of the box Can compute by similar triangles (CVA vs. CV A ) Need to know focal length f (or FOV) Note: can compute position on any object on the ground Simple unprojection What about things off the ground?

DEMO Now, we know the 3D geometry of the box We can texture-map the box walls with texture from the image

Foreground Objects Use separate billboard for each For this to work, three separate images used: Original image. Mask to isolate desired foreground images. Background with objects removed

Foreground Objects Add vertical rectangles for each foreground object Can compute 3D coordinates P0, P1 since they are on known plane. P2, P3 can be computed as before (similar triangles)

Foreground DEMO