SFM under orthographic projection

Slides:



Advertisements
Similar presentations
Bayesian Belief Propagation
Advertisements

The fundamental matrix F
ECE 8443 – Pattern Recognition LECTURE 05: MAXIMUM LIKELIHOOD ESTIMATION Objectives: Discrete Features Maximum Likelihood Resources: D.H.S: Chapter 3 (Part.
MASKS © 2004 Invitation to 3D vision Lecture 7 Step-by-Step Model Buidling.
N-view factorization and bundle adjustment CMPUT 613.
Structure from motion.
Object Detection and Recognition
How many object categories are there? Biederman 1987.
Today Feature Tracking Structure from Motion on Monday (1/29)
Recognition Readings Szeliski Chapter 14 The “Margaret Thatcher Illusion”, by Peter Thompson.
Structure from motion. Multiple-view geometry questions Scene geometry (structure): Given 2D point matches in two or more images, where are the corresponding.
Project 4 out today –help session today –photo session today Project 2 winners Announcements.
Lecture 11: Structure from motion CS6670: Computer Vision Noah Snavely.
Computer Vision I Instructor: Prof. Ko Nishino. Today How do we recognize objects in images?
Pattern Recognition. Introduction. Definitions.. Recognition process. Recognition process relates input signal to the stored concepts about the object.
Camera parameters Extrinisic parameters define location and orientation of camera reference frame with respect to world frame Intrinsic parameters define.
Project 2 due today Project 3 out today –help session today Announcements.
Image Stitching Ali Farhadi CSE 455
CSE 185 Introduction to Computer Vision
So far focused on 3D modeling
Some books on linear algebra Linear Algebra, Serge Lang, 2004 Finite Dimensional Vector Spaces, Paul R. Halmos, 1947 Matrix Computation, Gene H. Golub,
Last lecture Passive Stereo Spacetime Stereo Multiple View Stereo.
Affine Structure from Motion
Last lecture Passive Stereo Spacetime Stereo.
EECS 274 Computer Vision Affine Structure from Motion.
Final Review Course web page: vision.cis.udel.edu/~cv May 21, 2003  Lecture 37.
CSE 185 Introduction to Computer Vision Feature Matching.
776 Computer Vision Jan-Michael Frahm & Enrique Dunn Spring 2013.
Recognition Readings – C. Bishop, “Neural Networks for Pattern Recognition”, Oxford University Press, 1998, Chapter 1. – Szeliski, Chapter (eigenfaces)
Structure from Motion Paul Heckbert, Nov , Image-Based Modeling and Rendering.
Optical flow and keypoint tracking Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Structure from motion Digital Visual Effects, Spring 2007 Yung-Yu Chuang 2007/4/24 with slides by Richard Szeliski, Steve Seitz, Zhengyou Zhang and Marc.
8/16/99 Computer Vision: Vision and Modeling. 8/16/99 Lucas-Kanade Extensions Support Maps / Layers: Robust Norm, Layered Motion, Background Subtraction,
776 Computer Vision Jan-Michael Frahm Spring 2012.
CS Statistical Machine learning Lecture 7 Yuan (Alan) Qi Purdue CS Sept Acknowledgement: Sargur Srihari’s slides.
Reconstruction of a Scene with Multiple Linearly Moving Objects Mei Han and Takeo Kanade CISC 849.
Histograms CSE 6363 – Machine Learning Vassilis Athitsos
Motion Segmentation with Missing Data using PowerFactorization & GPCA
Digital Visual Effects, Spring 2007 Yung-Yu Chuang 2007/4/17
Lecture 25: Introduction to Recognition
Announcements Project 2 due tomorrow night Project 3 out Wednesday
Structure from motion II
Lecture 8:Eigenfaces and Shared Features
Recognition: Face Recognition
Lecture 14: Introduction to Recognition
Lecture 25: Introduction to Recognition
Announcements Project 1 artifact winners
Structure from motion Input: Output: (Tomasi and Kanade)
Outline Peter N. Belhumeur, Joao P. Hespanha, and David J. Kriegman, “Eigenfaces vs. Fisherfaces: Recognition Using Class Specific Linear Projection,”
In summary C1={skin} C2={~skin} Given x=[R,G,B], is it skin or ~skin?
Lecture 26: Faces and probabilities
Lecture 3: Camera Rotations and Homographies
Where did we stop? The Bayes decision rule guarantees an optimal classification… … But it requires the knowledge of P(ci|x) (or p(x|ci) and P(ci)) We.
Announcements more panorama slots available now
Noah Snavely.
CS4670: Intro to Computer Vision
CS4670: Intro to Computer Vision
Announcements Project 2 artifacts Project 3 due Thursday night
Announcements Project 4 out today Project 2 winners help session today
Parametric Methods Berlin Chen, 2005 References:
Where are we? We have covered: Project 1b was due today
Announcements Artifact due Thursday
CSE 185 Introduction to Computer Vision
Announcements more panorama slots available now
Computational Photography
Optical flow and keypoint tracking
Structure from motion Input: Output: (Tomasi and Kanade)
Announcements Artifact due Thursday
Tracking Many slides adapted from Kristen Grauman, Deva Ramanan.
The “Margaret Thatcher Illusion”, by Peter Thompson
Presentation transcript:

SFM under orthographic projection matrix 2D image point 3D scene point image offset Trick Choose scene origin to be centroid of 3D points Choose image origins to be centroid of 2D points Allows us to drop the camera translation:

factorization (Tomasi & Kanade) projection of n features in one image: projection of n features in m images W measurement M motion S shape Key Observation: rank(W) <= 3

Factorization Factorization Technique known solve for Factorization Technique W is at most rank 3 (assuming no noise) We can use singular value decomposition to factor W: S’ differs from S by a linear transformation A: Solve for A by enforcing metric constraints on M

Metric constraints Orthographic Camera Rows of P are orthonormal: Enforcing “Metric” Constraints Compute A such that rows of M have these properties Trick (not in original Tomasi/Kanade paper, but in followup work) Constraints are linear in AAT : Solve for G first by writing equations for every Pi in M Then G = AAT by SVD

Results

Extensions to factorization methods Paraperspective [Poelman & Kanade, PAMI 97] Sequential Factorization [Morita & Kanade, PAMI 97] Factorization under perspective [Christy & Horaud, PAMI 96] [Sturm & Triggs, ECCV 96] Factorization with Uncertainty [Anandan & Irani, IJCV 2002]

Bundle adjustment

CSE 576 (Spring 2005): Computer Vision Structure from motion How many points do we need to match? 2 frames: (R,t): 5 dof + 3n point locations  4n point measurements  n  5 k frames: 6(k–1)-1 + 3n  2kn always want to use many more Richard Szeliski CSE 576 (Spring 2005): Computer Vision

CSE 576 (Spring 2005): Computer Vision Bundle Adjustment What makes this non-linear minimization hard? many more parameters: potentially slow poorer conditioning (high correlation) potentially lots of outliers Richard Szeliski CSE 576 (Spring 2005): Computer Vision

Lots of parameters: sparsity Only a few entries in Jacobian are non-zero Richard Szeliski CSE 576 (Spring 2005): Computer Vision

CSE 576 (Spring 2005): Computer Vision Robust error models Outlier rejection use robust penalty applied to each set of joint measurements for extremely bad data, use random sampling [RANSAC, Fischler & Bolles, CACM’81] Richard Szeliski CSE 576 (Spring 2005): Computer Vision

Structure from motion: limitations Very difficult to reliably estimate metric structure and motion unless: large (x or y) rotation or large field of view and depth variation Camera calibration important for Euclidean reconstructions Need good feature tracker Lens distortion Richard Szeliski CSE 576 (Spring 2005): Computer Vision

Issues in SFM Track lifetime Nonlinear lens distortion Prior knowledge and scene constraints Multiple motions

every 50th frame of a 800-frame sequence Track lifetime every 50th frame of a 800-frame sequence

lifetime of 3192 tracks from the previous sequence Track lifetime lifetime of 3192 tracks from the previous sequence

track length histogram Track lifetime track length histogram

Nonlinear lens distortion

Nonlinear lens distortion effect of lens distortion

Prior knowledge and scene constraints add a constraint that several lines are parallel

Prior knowledge and scene constraints add a constraint that it is a turntable sequence

Applications of Structure from Motion

Jurassic park

PhotoSynth http://labs.live.com/photosynth/

So far focused on 3D modeling Multi-Frame Structure from Motion: Multi-View Stereo Unknown camera viewpoints

Next Recognition Human can do it well easily but computers can not yet.

Today Recognition

Recognition problems What is it? Who is it? What are they doing? Object detection Who is it? Recognizing identity What are they doing? Activities All of these are classification problems Choose one class from a list of possible candidates

How do human do recognition? We don’t completely know yet But we have some experimental observations.

Observation 1: Q1: who is she?

The “Margaret Thatcher Illusion”, by Peter Thompson Observation 1: The “Margaret Thatcher Illusion”, by Peter Thompson Q1: who is she? Q2: which picture looks more natural?

The “Margaret Thatcher Illusion”, by Peter Thompson Observation 1: The “Margaret Thatcher Illusion”, by Peter Thompson http://www.wjh.harvard.edu/~lombrozo/home/illusions/thatcher.html#bottom Human process up-side-down images separately

Observation 2: Jim Carrey Kevin Costner High frequency information is not enough

Observation 3:

Observation 3: Negative contrast is difficult

Observation 4: Image Warping is OK

The list goes on Face Recognition by Humans: Nineteen Results All Computer Vision Researchers Should Know About http://web.mit.edu/bcs/sinha/papers/19results_sinha_etal.pdf

Face detection How to tell if a face is present? You can ask people to see what they come up with How to tell whether a pixel is on face or not?

One simple method: skin detection Skin pixels have a distinctive range of colors Corresponds to region(s) in RGB color space for visualization, only R and G components are shown above Skin classifier A pixel X = (R,G,B) is skin if it is in the skin region But how to find this region?

Skin detection Learn the skin region from examples Skin classifier Given X = (R,G,B): how to determine if it is skin or not? Learn the skin region from examples Manually label pixels in one or more “training images” as skin or not skin Plot the training data in RGB space skin pixels shown in orange, non-skin pixels shown in blue some skin pixels may be outside the region, non-skin pixels inside. Why? Q1: under certain lighting conditions, some surfaces have the same RGB color as skin Q2: ask class, see what they come up with. We’ll talk about this in the next few slides

Skin classification techniques Skin classifier Given X = (R,G,B): how to determine if it is skin or not? Nearest neighbor find labeled pixel closest to X choose the label for that pixel Data modeling fit a model (curve, surface, or volume) to each class Probabilistic data modeling fit a probability model to each class

Probability Basic probability X is a random variable P(X) is the probability that X achieves a certain value or Conditional probability: P(X | Y) probability of X given that we already know Y called a PDF probability distribution/density function a 2D PDF is a surface, 3D PDF is a volume For skin detection, our random variable is multi-dimensional (color, label). continuous X discrete X

Probabilistic skin classification Now we can model uncertainty Each pixel has a probability of being skin or not skin Skin classifier Given X = (R,G,B): how to determine if it is skin or not? Choose interpretation of highest probability set X to be a skin pixel if and only if Where do we get and ?

Learning conditional PDF’s We can calculate P(R | skin) from a set of training images It is simply a histogram over the pixels in the training images each bin Ri contains the proportion of skin pixels with color Ri This doesn’t work as well in higher-dimensional spaces. Why not? Approach: fit parametric PDF functions common choice is rotated Gaussian center covariance orientation, size defined by eigenvecs, eigenvals

Learning conditional PDF’s We can calculate P(R | skin) from a set of training images It is simply a histogram over the pixels in the training images each bin Ri contains the proportion of skin pixels with color Ri But this isn’t quite what we want Why not? How to determine if a pixel is skin? We want P(skin | R) not P(R | skin) How can we get it?

Bayes rule In terms of our problem: The prior: P(skin) what we measure (likelihood) domain knowledge (prior) what we want (posterior) normalization term The prior: P(skin) Could use domain knowledge P(skin) may be larger if we know the image contains a person for a portrait, P(skin) may be higher for pixels in the center Could learn the prior from the training set. How? P(skin) may be proportion of skin pixels in training set

Bayesian estimation likelihood posterior (unnormalized) Goal is to choose the label (skin or ~skin) that maximizes the posterior this is called Maximum A Posteriori (MAP) estimation = minimize probability of misclassification Suppose the prior is uniform: P(skin) = P(~skin) = 0.5 in this case , maximizing the posterior is equivalent to maximizing the likelihood if and only if this is called Maximum Likelihood (ML) estimation

Skin detection results Other application: Porn detection

General classification This same procedure applies in more general circumstances More than two classes More than one dimension H. Schneiderman and T.Kanade Example: face detection Here, X is an image region dimension = # pixels each face can be thought of as a point in a high dimensional space What’s the problem with high-dim feature points? Cov requires a lot of parameters. A way to resolve this problem is dimension reduction. H. Schneiderman, T. Kanade. "A Statistical Method for 3D Object Detection Applied to Faces and Cars". IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2000) http://www-2.cs.cmu.edu/afs/cs.cmu.edu/user/hws/www/CVPR00.pdf