3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom...

70
3D Computer Vision Introduction Tom Henderson CS 6320 S2014 [email protected] Acknowledgements: slides from Guido Gerig (Utah) & Marc Pollefeys, UNC Chapel Hill)

Transcript of 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom...

Page 1: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

3D Computer VisionIntroduction

Tom Henderson

CS 6320 S2014

[email protected]

Acknowledgements: slides from Guido Gerig(Utah) & Marc Pollefeys, UNC Chapel Hill)

Page 2: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Administration

• Classes: M & W, 1:25-2:45

Room WEB L126

• Instructor: Tom Henderson ([email protected])

• TA: Anshul Joshi ([email protected])

• Prerequisites: CS 6640 ImProc or equiv

• Textbook: “Computer Vision: A Modern Approach” by Forsyth & Ponce

Page 3: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

K. Grauman

Page 4: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig
Page 5: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Grading Information

The grading distribution will be as follows:

• Project: 30%

• Problems: 50%

• In-Class: 20%

(Quizzes and Participation)

You are expected to make a good effort on all assignments and in-class discussion based on a careful reading of the assigned material.

Page 6: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Assignments

• Project: This is an individual research project written up as a paper.

• Problems:

– Matlab functions: require verification

– Labs: require Lab Report

• Quizzes: In-class

– Evaluation:

• ‘+’ convincing answers

• ‘0’ not convincing but not a disaster

• ‘-’ convincing ignorance

Page 7: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig
Page 8: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Goal and objectives

• To introduce the fundamental problems of computer vision.

• To introduce the main concepts and techniques used to solve those.

• To enable participants to implement solutions for reasonably complex problems.

• To enable the student to make sense of the literature of computer vision.

Page 9: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

CV: What is the problem?

Page 10: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

CV: A Hard Problem

Page 11: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

What is Computer Vision? • Automatic understanding of

images and video – Computing properties of the 3D world

from visual data (measurement) – Algorithms and representations to

allow a machine to recognize objects, people, scenes, and activities. (perception and interpretation)

Page 12: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Vision and graphics

Model Images Vision

Graphics

Inverse problems: analysis and synthesis.

Page 13: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Related disciplines

Cognitive science

Algorithms

Image processing

Artificial intelligence

Graphics Machine learning

Computer vision

Page 14: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Object recognition (in mobile phones)

• This is becoming real: – Microsoft Research – Point & Find, Nokia – SnapTell.com (now amazon)

Page 15: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Smart cars

• Mobileye – Vision systems currently in high-end

BMW, GM, Volvo models – By 2010: 70% of car manufacturers. – Video demo – YouTube, TestMovie Slide content courtesy of Amnon Shashua

Page 16: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Modeling 3D Structure from Pictures or 3D Sensors

Page 17: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Modeling ctd.

Page 18: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Main topics

• Shape (and motion) recovery “What is the 3D shape of what I see?”

• Segmentation “What belongs together?”

• Tracking “Where does something go?”

• Recognition “What is it that I see?”

Page 19: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Why study Computer Vision?

• Images and movies are everywhere • Fast-growing collection of useful applications

– building representations of the 3D world from pictures

– automated surveillance (who’s doing what) – movie post-processing – CAM (computer-aided manufacturing – Robot navigation – face finding

• Various deep and attractive scientific mysteries – how does object recognition work?

• Greater understanding of human vision

Page 20: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Clothing

• Scan a person, custom-fit clothing

Page 21: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Forensics

Page 22: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

3D urban modeling

drive by modeling in Baltimore

Page 23: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Image from Microsoft’s Virtual Earth (see also: Google Earth)

Page 24: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Industrial inspection

• Verify specifications • Compare measured model with CAD

Page 25: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Scanning industrial sites

as-build 3D model of off-shore oil platform

Page 26: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Vision systems (JPL) used for several tasks • Panorama stitching • 3D terrain modeling • Obstacle detection, position tracking • For more, read “Computer Vision on Mars” by Matthies et al.

NASA'S Mars Exploration Rover Spirit captured this westward view from atop a low plateau where Spirit spent the closing months of 2007.

Page 28: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Architecture

Survey

Stability analysis

Plan renovations

Page 29: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Architecture

Survey

Stability analysis

Plan renovations

Page 30: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Cultural heritage

Stanford’s Digital Michelangelo

Digital archive

Art historic studies

Page 31: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

IBM’s pieta project Photometric stereo + structured light

more info: http://researchweb.watson.ibm.com/pieta/pieta_details.htm

Page 32: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Archaeology

accuracy ~1/500 from DV video (i.e. 140kb jpegs 576x720)

Page 33: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Visual Cues: Stereo and Motion

Page 34: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Disparity map from Stereo

image I(x,y) image I´(x´,y´) Disparity map D(x,y)

(x´,y´)=(x+D(x,y),y)

Page 35: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Dynamic Programming (Ohta and Kanade, 1985)

Reprinted from “Stereo by Intra- and Intet-Scanline Search,” by Y. Ohta and T. Kanade, IEEE Trans. on Pattern Analysis and Machine Intelligence, 7(2):139-154 (1985). 1985 IEEE.

Page 36: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Optical flow

Where do pixels move?

Page 37: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Optical flow

Where do pixels move?

Page 38: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Results

Page 39: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Active Vision: Structured Light

Page 40: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Active Vision: Structured Light

Page 41: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Binary Coding

Pattern 1

Pattern 2

Pattern 3

Projected over time

Example: 7 binary patterns

proposed by Posdamer & Altschuler

Codeword of this píxel: 1010010 identifies the corresponding pattern stripe

Page 42: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

“Cheap and smart” Solution

Example: Bouguet and Perona, ICCV’98

Page 44: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Structured Light Anuja Sharma, Abishek Kumar

Page 45: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Structured Light Anuja Sharma, Abishek Kumar

Page 46: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Range Sensor Data Processing to get 3D Shapes

Page 47: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Input Data: Depth Maps

Range Image (left) and gray level image (right)

Page 48: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

3D Shape Cues: Shape from Silhouettes

Page 50: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

3D shape from silhouettes: Two Mirrors and uncalibrated

camera

Forbes et al., ICCV2005

Christine Xu, Computer Vision Student Project

Page 51: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

3D shape from silhouettes

Build 3D model Visualize 3D model from arbitrary viewing angles

Page 52: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Example

• Compute visual hull with silhouette images from multiple calibrated cameras

• Compute Silhouette Image • Volumetric visual hull computation • Display the result

Page 53: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Shape from Shading

Page 54: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Photometric Stereo Christopher Bireley

Bandage Dog

Imaging Setup

Page 55: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Preprocessing

• Remove background to isolate dog • Filter with NL Means

Page 56: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Photometric Stereo Christopher Bireley

Albedo image Surface Normals

3D mesh

Page 57: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Results – Lord Buddha Images – Pre-Processed Images

Guozhen Fan and Aman Shah

Page 58: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Object Tracking

Page 59: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Object Tracking: Using Deformable Models in Vision

Page 60: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Object Tracking: Using Deformable Models in Vision: II

Page 61: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Object Tracking III

Page 62: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Computer Vision Systems

Page 63: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Webcam Based Virtual Whiteboard

Jon Bronson James Fishbaugh

Page 64: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Webcam Based Virtual Whiteboard

Jon Bronson James Fishbaugh

Page 65: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Real-Time 3D Glowstick Detection Computer Vision Project 2009

Andrei Ostanin

Detecting the 3D position of glowsticks in real-time using two cameras.

Page 66: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Realtime Glowstick Detection Andrei Ostanin

movie

Page 67: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Student Project: Playing Chess, Recognition and Simulation

• Track individual chess pieces

• Maintain state of board

• Graphically represent state changes and state

• D. Allen, D. McLaurin UNC

• Major ideas: – 3D from stereo – detect and describe

changes – Use world knowledge

(chess)

Page 69: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Goal and objectives

From Snapshots, a 3-D View NYT, August 21, 2008, Personal Tech http://www.nytimes.com/2008/08/21/technology/personaltech/21pogue.html

Stuart Goldenberg

Page 70: 3D Computer Vision Introductiontch/CS6320/lectures/week1.pdf · 3D Computer Vision Introduction Tom Henderson CS 6320 S2014 tch@cs.utah.edu Acknowledgements: slides from Guido Gerig

Next class: Image Formation Chapter 1: Cameras

• Please find pdf copies of Chapters 1&2, Forsyth&Ponce, on the website.

• Purchase the course book on your own.

Assignment:

• Read Chapter 1: Cameras, Lenses and Sensors: See Course home page