1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D...

25
1 Digital Images World Camera Digitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how bright that image point is? Reflectance, radiometry geometry
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    215
  • download

    2

Transcript of 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D...

Page 1: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

1

Digital Images

World Camera Digitizer DigitalImage

(i) What determines where the image of a 3D point appears on the 2D image?

(ii) What determines how bright that image point is?

Reflectance, radiometry

geometry

Page 2: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

2

1100

110

201

11

2

1

2y

x

y

x

y

x

y

x

yy

xx

21),( eejixx yxyxyx T

• change of coordinate system: the same pt in two different systems oxy and ox’y’• point transfomation: a point (x,y) is transformed (translated) into (x’,y’) within the same coordinate frame

Two different interpretations:

Review of some basic geometry(compulsary for vision, graphics and robotics)

Page 3: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

3

y

x

tyxy

tyxx

cossin

sincos

y

x

t

t

y

x

y

x22R

110

1

1222 y

x

y

xtR

R is a rotation matrix=orthonormal = orthogonal and unit vectors, 2*2 matrix (only 1 d.o.f.) such that

222222 IRR T

2D general Euclidean transformation:

Page 4: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

4

1

10

1

1333

z

y

x

z

y

x

tR333333 IRR T

cossin0

sincos0

001

cos0sin

010

sin0cos

100

0cossin

0sincos

)()()(33 xyz RRRR

One example of R might be:

3D Euclidean transformation:

Different sign

Page 5: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

5

prod.dot with nn AE nA nR

Naturally everything starts from the known vector space

• add two vectors• multiply any vector by any scalar• zero vector – origin • finite basis

One step further …vector, affine, and Euclidean spaces

Page 6: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

6

21),( eexx yxyx T

Affine geometry and affine coordinates:

E1 and e2 are any noncolinear vectors, not necessarily orthogonal unit ones

No more rotation as no perpendicularity (as no dot prod.)

fydxcy

eybxax

f

e

y

x

dc

ba

y

x

110

1

1222 y

x

y

xtA

Page 7: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

7

• Distances -- eucl. Coord

• Angles, ortho

• Ratios – affine coord.• parallelism

Dot product Linear dependency

Page 8: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

8

Given 3 points (2 vectors) on the plane, we can define an affine coordinate frame (affine basis),Any 4th point can be expressed in terms of affine coordinates …

Page 9: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

9

Geometric modeling of a camera

u

v

X

u

O

X’

u’

P3

P2

How to relate a 3D point X (in oxyz) to a 2D point in pixels (u,v)?

Page 10: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

10

Pinhole cameras

• Abstract camera model - box with a small hole in it

• Pinhole cameras work in practice

Page 11: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

11

Distant objects are smaller:

Page 12: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

12

Parallel lines meet:

Page 13: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

13

• each set of parallel lines (=direction) meets at a different point– The vanishing point for

this direction

• Sets of parallel lines on the same plane lead to collinear vanishing points. – The line is called the

horizon for that plane

• Good ways to spot faked images– scale and perspective

don’t work

– vanishing points behave badly

– supermarket tabloids are a great source.

Vanishing points:

Page 14: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

14

Page 15: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

15

• Vector space to affine: isomorph, one-to-one (pt=vector)

• vector to Euclidean as an enrichment: scalar prod.

Pts, lines, parallelism

Angle, distances, circles

Page 16: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

16

Z

Y

f

y

Z

X

f

x ,

X

Y

Z

xy

u

v

X

x

O

f

Camera coordinate frame

Page 17: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

17

10100

0010

0001

Z

Y

X

f

y

x

Z

Y

X

f

y

x

In more familiar matrix form:

Page 18: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

18

xo

y

u

v

X

Y

Z

x y

u

v

X

xO

f

Image coordinate frame

Page 19: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

19

Image coordiante frame: intrinsic parameters

mm

pixels,

mm

pixels 00

y

vvk

x

uuk vu

0

0

vykv

uxku

v

u

1100

v0

u0

10v

0u

y

x

k

k

v

u

If u not perpendicular to v, but an angle alpha:

1100

v0

u)s(

10v

0u

y

x

k

k

v

u

Page 20: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

20

Camera calibration matrix

100

v0

u)s(

100

v0

u)s(

0v

0u

0v

0u

kf

kf

K

f

y

x

f

y

x

f

f

k

k

v

u

K

100

00

00

100

v0

u)s(

10v

0u

Page 21: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

21

• Focal length in horizontal/vertical pixels (2) (or focal length in pixels + aspect ratio)• the principal point (2)• the skew (1)

5 intrinsic parameters

one rough example: 135 film

In practice, for most of CCD cameras:

• alpha u = alpha v i.e. aspect ratio=1• alpha = 90 i.e. skew s=0• (u0,v0) the middle of the image• only focal length in pixels?

Page 22: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

22

Xw Yw

Zw

Xw

X

Y

Z

xy

u

v

X

x

O

f

World (object) coordinate frame

Page 23: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

23

World coordinate frame: extrinsic parameters

1

1

1w

w

w

c

c

c

Z

Y

X

Z

Y

X

0

tR

Relation between the abstract algebraic and geometric models is in the intrinsic/extrinsic parameters!

6 extrinsic parameters

Page 24: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

24

Finally, we should count properly ...

11

11

4333 Z

Y

X

Z

Y

X

v

u

pixel

C0

tR0IK

Finally, we have a map from a space pt (X,Y,Z) to a pixel (u,v) by

Page 25: 1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.

25

Summary of camera modelling

• 3 coordinate frame• projection matrix• decomposition• intrinsic/extrinsic param