cmput412 3d vision and sensing 3d modeling from images can be complex 90 horizon 3d measurements...

34
Cmput412 3D vision and sensing 3D modeling 3D modeling from images from images can be can be complex 90 horizo n 3D 3D measurements measurements from images from images can be wrong can be wrong

Upload: veronica-hubbard

Post on 29-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Cmput4123D vision and sensing

3D modeling 3D modeling from images can from images can

be complexbe complex

90

horizon

3D measurements 3D measurements

from images can from images can be wrongbe wrong

Page 2: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Previous lectures: 2D machine vision and image

processingSo far 2D vision for measurements on a 2D world plane:So far 2D vision for measurements on a 2D world plane:

Usually Usually overhead camera pointing straight down on a work tableoverhead camera pointing straight down on a work table

Adjust cam position so pixel Adjust cam position so pixel [u,v] = s[u,v] = s[X,Y].[X,Y]. s s = scalefactor (pix/mm)= scalefactor (pix/mm)

Pixel coordinates are scaled world coordPixel coordinates are scaled world coord

XX

YY

uu

vv

Camera

Robot sceneThresholded image

Page 3: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

A camera projects the 3D world to 2D images in a complex way

3D points project by rays of light that cross the camera's center of projection

Page 4: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

A camera projects the 3D world to 2D images in a complex way

Shigeo Fukuda

Page 5: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

A camera projects the 3D world to 2D images in a complex way

Shigeo Fukuda

Page 6: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

The structure of ambient light

Page 7: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

The structure of ambient light

Page 8: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

We focus on Camera Geometry

center of projection

focal length

image plane

image

object

Each point is projected along a ray through the center of projection.

pinhole camera

3d 2d transformation: perspective projection

Page 9: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Perspective Projection

center of projection

focal length: f

image plane

image

object

image

Add coordinate systems in order to describe feature points...

We can save conscious mental gyrations by placing the image plane in front of the center.

Page 10: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Coordinate Systems

canonical axes

f

pixel coordinates

optical axis

z

x

y

uv

object coordinates

v (row)

u (col)

principal point

Z

x

y

at the C.O.P.

X

Y

Z

X =

Scene structure

xx

y

Image structure

=

(X,Y,Z)

(x,y)

how are these related?

Page 11: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Points between 2d and 3d

X

Y

Z

HZ

X =

Scene structure

x

X

xx

y

Image structure

= =X

YfZ

nonlinear!

But this is only an ideal approximation...

Page 12: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Points between 2d and 3d

X

Y

Z

HZ

X =

Scene structure

x

X

xx

y

Image structure

= =X

YfZ

nonlinear!

But this is only an ideal approximation...

Page 13: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

It could be worse... (and often is!)

Real cameras don’t create exactly a pinhole projection...

But good cameras come close!

Focus

Lens distorsion: Lines -> curves

Page 14: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

CAMERA INTERNAL CALIBRATION

Knowndistanced

known regular offset r

xii

xxii

sxxd

r

soxd

rk

)(

)(

1

A simple way to get scale parameters; we can compute the optical center as the numerical centerand therefore have the intrinsic parameters

Compute Sx

Focal length = 1/ Sx

Page 15: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Stereo Vision

• GOAL:GOAL: Passive 2- Passive 2-camera system for camera system for triangulating 3D triangulating 3D position of points in position of points in space to generate a space to generate a depth map of a depth map of a world scene.world scene.

• Humans use stereo Humans use stereo vision to obtain vision to obtain depthdepth

Page 16: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Stereo depth calculation:Simple case, aligned cameras

Z

X(0,0) (d,0)

fXL XR

Z = (f/XL) XZ= (f/XR) (X-d)

(f/XL) X = (f/XR) (X-d)X = (XL d) / (XL - XR)

Z = d*f

(XL - XR)

DISPARITY= DISPARITY= (XL - XR)(XL - XR)

Similar triangles:

Solve for X:

Solve for Z:

Page 17: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Your basic stereo algorithm

For each epipolar line

For each pixel in the left image• compare with every pixel on same epipolar line in right image

• pick pixel with minimum match cost

Improvement: match windows• This should look familar...

Page 18: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Commercial Stereo Systems

•PointGrey PointGrey BumblebeeBumblebee– Two camerasTwo cameras– SoftwareSoftware

•Real-timeReal-time

•““Infinite” rangeInfinite” range

http://vimeo.com/12713979

Page 19: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

SVM Stereo Head Mounted on an All-terrain Robot

•Stereo CameraStereo Camera– Vider DesingVider Desing– www.videredesign.comwww.videredesign.com

•RobotRobot– Shrimp, EPFLShrimp, EPFL

•Application of Stereo VisionApplication of Stereo Vision– Traversability calculation based on Traversability calculation based on

stereo images for outdoor navigationstereo images for outdoor navigation– Motion trackingMotion tracking

Page 20: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

For not aligned cameras:Match along epipolar lines

Special case: parallel cameras – epipolar lines are parallel and aligned with rows

Page 21: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Structured light method

•Replace one camera with a light strip projectorReplace one camera with a light strip projector

•Calculate the shape by how the strip is distorted.Calculate the shape by how the strip is distorted.

•Same depth disparity equation as for 2 camerasSame depth disparity equation as for 2 cameras

http://www.laserfocusworld.com/articles/2011/01/lasers-bring-gesture-recognition-to-the-home.htmlMachine vision setup

Page 22: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Real time Virtual 3D Scanner - Structured Light Technology

•DemoDemo

http://www.youtube.com/watch?v=a6pgzNUjh_s

Page 23: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Kinect

•Another structure light Another structure light methodmethod

•Use dost rather than Use dost rather than strips strips

http://www.laserfocusworld.com/articles/2011/01/lasers-bring-gesture-recognition-to-the-home.html

Page 24: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Kinect Hardware

Page 25: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

See the IR-dots emitted by KINECT

http://www.youtube.com/watch?v=-gbzXjdHfJA

http://www.youtube.com/watch?v=dTKlNGSH9Po&feature=related

Page 26: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Time of flight laser method

•Send the IR-laser light to Send the IR-laser light to different directions and different directions and sense how each beam is sense how each beam is delayed.delayed.

•Use the delay to calculate Use the delay to calculate the distance of the object the distance of the object point point

http://www.laserfocusworld.com/articles/2011/01/lasers-bring-gesture-recognition-to-the-home.html

Page 27: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

http://www.swissranger.ch/index.phphttp://www.advancedscientificconcepts.com

Time of flight laser camera

Page 28: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

LIDAR light detection and ranging scanner

http://hodcivil.edublogs.org/2011/11/06/lidar-%E2%80%93-light-detection-and-ranging/http://commons.wikimedia.org/wiki/File:Lidar_P1270901.jpg

Leica terrestrial lidar (light detection and ranging) scanner

http://www.youtube.com/watch?v=MuwQTc8KK44

Page 29: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

3D Laser Scanning - Underground Mine Mapping

•Demo Demo

http://www.youtube.com/watch?v=BZbvz8fePeQ

Page 30: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Motion capture for film production (MOCAP)

http://upload.wikimedia.org/wikipedia/commons/7/73/MotionCapture.jpghttp://www.naturalpoint.com/optitrack/products/s250e/indepth.html

IR light emitterand camera

http://www.youtube.com/watch?v=IxJrhnynlN8

Page 31: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

3D body scanner

http://www.cyberware.com/products/scanners/ps.htmlhttp://www.cyberware.com/products/scanners/wbx.html

http://www.youtube.com/watch?v=86hN0x9RycM

Page 32: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

3-D Face capture

http://www.captivemotion.com/products/

http://www.youtube.com/watch?v=-TTR0JrocsI&feature=related

Page 33: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Dimensional Imaging 4D Video Face Capture with Textures

Dimensional Imaging 4D Video Face Capture with Textures

http://www.youtube.com/watch?v=XtTN7tWaXTM&feature=related

Page 34: Cmput412 3D vision and sensing 3D modeling from images can be complex 90 horizon 3D measurements from images can be wrong

Vision and range sensing

• The past:The past:– Mobile robots used ring of ultrasound or IR dist5ance sensors for obstacle Mobile robots used ring of ultrasound or IR dist5ance sensors for obstacle

avoidance or crude navigationavoidance or crude navigation– Robot arms used VGA cameras to track a few pointsRobot arms used VGA cameras to track a few points

• Now:Now:– Full camera pose tracking and 3D scene reconstruction possible with Full camera pose tracking and 3D scene reconstruction possible with

inexpensive cameras and processing (e.g. PTAM on RaspberryPI+cam = $50 inexpensive cameras and processing (e.g. PTAM on RaspberryPI+cam = $50 and 20gramand 20gram

– Can track hundreds of interest points for image based visual control.Can track hundreds of interest points for image based visual control.

• The next yearsThe next years– Active range sensing RGBD with Kinect growing in popularity indoorsActive range sensing RGBD with Kinect growing in popularity indoors– Passive camera vision still important. Especially outdoors and on UAV.Passive camera vision still important. Especially outdoors and on UAV.