50
Computer Vision with Kinect CS 7670 Zhaoyin Jia Fall, 2011 1

Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

  • Upload
    vophuc

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Computer Vision with Kinect

CS 7670

Zhaoyin Jia

Fall, 2011

1

Page 2: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Kinect

• $150 color image and 3D sensor

• An Infrared projector

• A color camera

• An Infrared sensor

2

Page 3: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Kinect

3

Page 4: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Kinect • Official SDK from Microsoft released on Jun 16th

• Better depth image and alignment, Skeleton tracking

– Real-time Human Pose Recognition in Parts from Single Depth Images. Jamie Shotton, et.al, CVPR 2011, (Best paper award).

• Online hacks: OpenNI, open-kinect

4

Page 5: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Resources

• Real time capturing depth and color image

• Microsoft SDK gives better alignment.

• Online calibration toolbox available

– http://www.ee.oulu.fi/~dherrera/kinect/

5

Page 6: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Topics

• RGB-D Mapping

• Robotics grasping

• Object recognition

• Human tracking

6

Page 7: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

RGB-D Mapping

• Align the “frames” from a Kinect to create a single 3D map (or model) of the environment

7

RGB-D Mapping: Using depth cameras for dense 3D modeling of indoor environments. Henry, Krainin, Herbst, Ren, Fox. ISER 2010.

Page 8: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

RGB-D Mapping

8

640x480, 30Hz, color + dense depth

Page 9: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

System Overview

• Frame-to-frame alignment

• Global Optimization (SBA for Loop Closure)

• Map representation

9 *Slide from Peter Henry

Page 10: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

SIFT matching • Visual features (from image) in 3D (from depth)

• Figure out how the camera moved by matching these feature

10 *Slide from Peter Henry

Page 11: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

RANSAC • For each feature point, find the most similar

descriptor in the other frame

• Find largest set of consistent matches

• Move the new frame to align these matches

11 *Slide from Peter Henry

Page 12: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Using ICP

12

• Low light / Lack of visual “texture” or features

• Kinect still provides depth or “shape” information

Page 13: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Joint Optimization (RGBD-ICP)

13

Page 14: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Resulting Map

14

Page 15: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

15 [Henry-Krainin-Herbst-Ren-Fox]

Page 16: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

3D mapping

• Our implementation on SIFT only

• Kinect fusion

16

Page 17: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Topics

• RGB-D Mapping

• Robotics grasping

• Object recognition

• Human tracking

17

Page 18: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Robot manipulation: Big Picture

• Personal robots should learn incrementally from experience

• Robots can later perform useful actions with models:

– Recognition

– Pose estimation

– Reliable grasping

18

Autonomous Generation of Complete 3D Object Models Using Next Best View Manipulation Planning. Krainin, Curless, Fox, ICRA 2011

Page 19: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

IJRR 11

19

Page 20: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

View Selection Algorithm

• Conceptually similar to Planetarium Algorithm [Connolly ’85]

• Procedure: – Extract object isosurface with

confidences – Generate kinematically

achievable viewpoints – Compute information gain

(quality) for each viewpoint – Select view as tradeoff

between quality and cost

20

Page 21: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Manipulation Planning

21

Page 22: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Multiple Grasp Results

• Evaluated regrasping on four objects

• Includes box with three grasps

22

Page 23: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Topics

• RGB-D Mapping

• Robotics grasping

• Object recognition

• Human tracking

23

Page 24: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Object recognition

• List of papers:

24

"Object Recognition with Hierarchical Kernel Descriptors" ,Liefeng Bo,et al . CVPR 11 "A Large-Scale Hierarchical Multi-View RGB-D Object Dataset“, Kevin Lai et al. ICRA 11 "Sparse Distance Learning for Object Recognition Combining RGB and Depth Information" , Kevin Lai et al. ICRA 11 “Depth Kernel Descriptors for Object Recognition”, Liefeng Bo et al. IROS 11 “RGB-D Object Discovery via Multi-Scene Analysis.” Evan Herbst et al. IROS 11 “A Scalable Tree-based Approach for Joint Object and Pose Recognition”, Kevin Lai et al. AAAI 11 “Kernel Descriptors for Visual Recognition”, Liefeng Bo et al. NIPS 10

Page 25: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

25

RGB-D Object Dataset

300 objects from 51 categories, 250,000 RGB-D views

Cluttered scenes

[Lai-Bo-Ren-Fox; ICRA 2011]

Page 26: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

RGB-D Object Dataset

26

Page 27: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Classifier Shape (Depth) Vision (RGB) RGB-D

Linear SVM 51.71.8 72.73.2 80.52.9

Kernel SVM 63.52.3 72.93.2 83.03.7

RandomForest 65.52.4 73.13.7 78.54.1

Kernel Desc. +Linear SVM

75.72.2 76.12.6 84.12.2

27

Benchmarking RGB-D Recognition

Classifier Shape (Depth) Vision (RGB) RGB-D

Linear SVM 29.40.5 90.40.5 89.60.5

Kernel SVM 50.10.9 90.80.5 90.40.6

RandomForest 51.61.1 89.60.7 90.20.3

Category-Level Recognition (51 categories)

Instance-Level Recognition (303 instances)

[Lai-Bo-Ren-Fox; ICRA 2011]

Slides from Ren. 1% Lowered than number reported in the paper

Page 28: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

28

RGB-D Object Recognition

Image Patch features Image features

Recognition

Your favorite model

Bag-of-Words Sparse Coding (LLC,LCC)

Spatial Pyramid Matching (SPM) Efficient Match Kernel (EMK)

Feed-forward Networks

SIFT (or HOG) ?

*Slide from Ren Xiaofeng

Page 29: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

A Kernel view of SIFT/HoG

29 [Bo-Ren-Fox; CVPR 10 ;NIPS 2010; IROS 11;]

u

( )u

( )m u

orientation

magnitude

1. Find the corresponding histogram bin (suppose each bin contains 45 degree)

( ) mod( ( ),45 )o

i u u i

2. Compute normalize term

2( ) ( )u P

m P m u

P

1 2 8( ), ( ),..( ) . ])[ , (u u u u

Page 30: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

A Kernel view of SIFT/HoG

• Suppose we have trained linear SVM classifier

• Have support vectors

• With one testing

• Decision

30 [Bo-Ren-Fox; CVPR 10 ;NIPS 2010; IROS 11;]

, ),( 1,...,i iy i NF

tF

t i i i t

i

y wF b y bF F

1( ) ( )

( )( )

u P

F P m um

uP

(( )) u

u

u

P

F P m sv

Some vector

Page 31: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

A Kernel view of SIFT/HoG

• When two SIFT/HoG meet

31

(( () ))u P

uF P m sv u

( ) ( )F P F Q

(( () ))v

v Q

F Q m sv v

( () )u v u

u v Q

v

P

m m ssv v

( ),u v o u

u P

v

v Q

m Km

How well these orientations match each other

P

Q

Page 32: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Soft Binning/Considering the position

• Add another kernel considering the position of the pixel

32

Some vector orientation sv

Give the same sv and thus the same matching

2( )( , ) u v

pK u v e

Page 33: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Kernel Descriptors

• Propose several other kernel feaetures (Color, Shape etc) in NIPS

• Propose hierarchy kernel (kernel of kernel) in CVPR

(treat Depth as gray image)

• Propose depth kernel in IROS (PCA, shape, edge)

33

Pu Qv

pvuovu vukkmmQPK ),(),(),(grad Gradient Match Kernel

gradient

orientation

image patch

pixel

coordinates

kernels

normalized

gradient magnitude

[Bo-Ren-Fox; CVPR 10 ;NIPS 2010; IROS 11;]

Page 34: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Experiment: on RGB-D dataset (average accuracy)

34

IROS 11, table 8 IROS 11, table 9

Category Instance

ICRA 10, Fig 8 ICRA 10, Fig 8

ICRA 10, Fig 4

CVPR 11, table 4 CVPR 11, table 4

Page 35: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Scalable and Hierarchical Recognition

35

[Lai-Bo-Ren-Fox; AAAI 2011]

8 discrete views

continuous angles

*Slide from Ren Xiaofeng

Page 36: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

36

Application: Interactive LEGO

RGB-D used for object recognition and hand tracking

[Ziola-Harrison-Powledge-Lai-Bo-Ren-Fox]

Page 37: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

37

Application: Chess Playing Robot

Page 38: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Topics

• RGB-D Mapping

• Robotics grasping

• Object recognition

• Human tracking

38

Page 39: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Kinect: Real time human tracking

39

* Real-Time Human Pose Recognition in Parts from Single Depth Images. Shotton, et al, CVPR 2011.

Page 40: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Synthesizing Training data • Motion capture to 100 k poses

• Retargeting to different models

• Render depth and body parts

• Use the real and synthetic training data (1m)

40

Page 41: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Training data

41

Page 42: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Features • dI(x): depth at pixel x

42

Two offset from x

Page 43: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Decision Tree

• P(c|I,x): distribution of pixel x over labels c

43

Page 44: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Training decision tree • Randomly select a set of and

(a set of splits)

• Split training examples by each split

• Choose the split with maximum information gain

• Move into next layer

• 3 trees to depth 20 from 1 million images

=1 day training on 1000 cores

44

Page 45: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Speed

• Each feature computation:

– read 3 image pixels

– 5 arithmetic operations

– Straight forward to implemented on GPU

• Decision trees:

– Fast computing

– Can be parallel between trees

45

Page 46: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Experiment

• Use mean-shift to find the joint.

46

Page 47: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Experiment

• demo

47

Page 48: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Conclusion

• Kinect is helpful

– 3D modeling

– Robotics

• Kinect introduces new data and features

– Object recognition/scene understanding

• Many interesting applications on-going

48

Page 49: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

Future Will RGB-D have a deep impact on vision applications?

Yes. It’s already happening, faster than we can track.

Will RGB-D start a revolution in vision applications?

No. We still need to solve recognition, segmentation, tracking, scene understanding, etc. etc.

Yes. RGB-D helps address two issues in computer vision: loss of 3D from projection; lighting conditions.

RGB-D helps “abstract away” many low-level problems.

49 *Slide from Ren Xiaofeng

Page 50: Computer Vision with Kinect - Cornell · PDF fileComputer Vision with Kinect CS 7670 Zhaoyin Jia Fall, ... Ren, Fox. ISER 2010. RGB-D Mapping 8 640x480, 30Hz, color + dense ... •Visual

THANKS Zhaoyin Jia

50