cmsc 426: image processing (computer vision)djacobs/cmsc427/kinect.pdf · 2015. 4. 30. · cmsc...

32
Kinect

Upload: others

Post on 04-Mar-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Kinect

Page 2: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Kinect

• RGBD sensor

• Frame rate

• Active sensing.

Page 3: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Motorized base

Slides from Larry Zitnick, Microsoft

Page 4: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Why Stereo Vision? • 2D images project 3D points into 2D:

O

P’=Q’

P

Q

• 3D Points on the same viewing line have the same 2D image: – 2D imaging results in depth information loss

(Camps)

Page 5: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Stereo

• Assumes (two) cameras.

• Known positions.

• Recover depth.

Page 6: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Recovering Depth Information:

O2

P’2=Q’2

P

Q

O1

P’1 Q’1

Depth can be recovered with two images and triangulation.

(Camps)

Page 7: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

So Stereo has two steps

• Finding matching points in the images

• Then using them to compute depth.

Page 8: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Epipolar Constraint

• Most powerful correspondence

constraint.

• Simplifies discussion of depth recovery.

Page 9: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Stereo correspondence

• Determine Pixel Correspondence

– Pairs of points that correspond to same

scene point

• Epipolar Constraint

– Reduces correspondence problem to 1D

search along conjugate epipolar lines

epipolar plane epipolar line epipolar line

(Seitz)

Page 10: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Matching

Page 11: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

(Varshney)

Page 13: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015
Page 14: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Reconstruction

Z

T

fZ

xxTrl

Ol Or

P

pl pr

T

Z

xl xr

f

T is the stereo baseline d measures the difference in retinal position between corresponding points

(Camps)

Then given Z, we can compute X

and Y.

lrxx

TfZ

lrxxd Disparity:

Page 16: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Postprocessing

• Holes

– Occlusion

– Specularity

– Transparency

– Scattering (hair, skin)

• Filtering

– Fill in missing data from neighbors.

– Use RGB data to get segments

Page 17: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Filtering

Page 18: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Pose Recognition

Page 19: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Pose Recognition

• Depth image segmented into per-pixel

labels for body parts.

• Then generate 3D locations for joints.

Page 20: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Finding body parts

• What should we use for a feature?

– Difference in depth

• What should we use for a classifier?

– Random Decision Forests

Page 21: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Pixel Classification with

Machine Learning

• Get lots of training examples.

• Extract features for each pixel

• Train classifier that maps features to

class (body part).

Page 22: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Synthetic data

Page 23: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Synthetic training/testing

Page 24: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Real test

Page 25: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Features

Page 26: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Classification

Learning:

1. Randomly choose a set of thresholds and features for splits.

2. Pick the threshold and feature that provide the largest

information gain.

3. Recurse until a certain accuracy is reached or depth is

obtained.

Page 27: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Implementation details

• 3 trees (depth 20) (why so few?)

• 300k unique training images per tree.

• 2000 candidate features, and 50

thresholds

• One day on 1000 core cluster.

Page 28: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Results

Page 29: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Joint estimation

• Apply mean-shift clustering to the

labeled pixels.

• “Push back” each mode to lie at the

center of the part.

Page 30: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Results

Page 31: CMSC 426: Image Processing (Computer Vision)djacobs/CMSC427/Kinect.pdf · 2015. 4. 30. · CMSC 426: Image Processing (Computer Vision) Author: David Jacobs Created Date: 4/30/2015

Failures

• Why would the system fail?