32
Computer Vision TP1 Image Formation Miguel Tavares Coimbra

Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Computer Vision – TP1

Image Formation

Miguel Tavares Coimbra

Page 2: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Outline

• ‘Computer Vision’?

• The Human Visual System

• Image Capturing Systems

Computer Vision - TP1 - Image Formation 2

Page 3: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Topic: Computer Vision?

• ‘Computer Vision’?

• The Human Visual System

• Image Capturing Systems

Computer Vision - TP1 - Image Formation 3

Page 4: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Computer Vision

“The goal of Computer Vision is to make useful

decisions about real physical objects and

scenes based on sensed images”, Shapiro and Stockman, “Computer Vision”, 2001

Computer Vision - TP1 - Image Formation 4

Page 5: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Lighting

Scene

Camera

Computer

Scene Interpretation

Components of a Computer Vision System

Computer Vision - TP1 - Image Formation 5

Page 6: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Topic: The Human Visual System

• ‘Computer Vision’?

• The Human Visual System

• Image Capturing Systems

Computer Vision - TP1 - Image Formation 6

Page 7: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Our Eyes

Iris is the diaphragm that changes the aperture (pupil)

Retina is the sensor where the fovea has the highest resolution

Cornea

ScleraIris Pupil

Computer Vision - TP1 - Image Formation 7

Page 8: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Focusing

Changes the focal length of the lens

shorter focal length

Computer Vision - TP1 - Image Formation 8

Page 9: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Myopia and Hyperopia

(myopia)(myopia)

Computer Vision - TP1 - Image Formation 9

Page 10: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Blind Spot in the Eye

Close your right eye and look directly at the “+”

Computer Vision - TP1 - Image Formation 10

Page 11: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Colour

• Our retina has:– Cones – Measure the

frequency of light (colour)

• 6 to 7 millions

• High-definition

• Need high luminosity

– Rods – Measure the intensity of light (luminance)

• 75 to 150 millions

• Low-definition

• Function with low luminosity

Gonzalez & Woods

We only see colour in the

centre of our retina!

Computer Vision - TP1 - Image Formation 11

Page 12: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Topic: Image Capturing Systems

• ‘Computer Vision’?

• The Human Visual System

• Image Capturing Systems

Computer Vision - TP1 - Image Formation 12

Page 13: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

A Brief History of Images

1544

Camera Obscura, Gemma Frisius, 1544

Computer Vision - TP1 - Image Formation 13

Page 14: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

A Brief History of Images

15441568

Lens Based Camera Obscura, 1568

Computer Vision - TP1 - Image Formation 14

Page 15: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

A Brief History of Images

1544

1837

1568

Still Life, Louis Jaques Mande Daguerre, 1837

Computer Vision - TP1 - Image Formation 15

Page 16: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

A Brief History of Images

1544

1837

1568

1970

Silicon Image Detector, 1970

Computer Vision - TP1 - Image Formation 16

Page 17: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

A Brief History of Images

1544

1837

1568

19701995Digital Cameras

Computer Vision - TP1 - Image Formation 17

Page 18: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Lighting

Scene

Camera

Computer

Scene Interpretation

Components of a Computer Vision System

Computer Vision - TP1 - Image Formation 18

Page 19: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Pinhole and the Perspective

Projection

(x,y)

screen

scene

Is an image being formed

on the screen?

YES! But, not a “clear” one.

image plane

effective focal length, f’optical

axis

y

x

z

pinhole

),,( zyx=r

z

y

f

y

z

x

f

x==

'

'

'

'

zf

rr=

'

')',','(' fyx=r

Computer Vision - TP1 - Image Formation 19

Page 20: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Pinhole Camera

• Basically a pinhole camera is a box,

with a tiny hole at one end and film

or photographic paper at the other.

• Mathematically: out of all the light

rays in the world, choose the set of

light rays passing through a point

and projecting onto a plane.

Computer Vision - TP1 - Image Formation 20

Page 21: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Image Size inversely proportional to Distance

Reading: http://www.pinholeresource.com/

©Charlotte Murray Untitled, 4" x 5" pinhole photograph, 1992

Pinhole Photography

Computer Vision - TP1 - Image Formation 21

Page 22: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Magnification

image plane

f’optical

axis

y

x

z

Pinhole

planar scene

A

B

A’

B’

d

d’

z

yy

f

yy

z

xx

f

xx

z

y

f

y

z

x

f

x

+=

++=

+

==

'

''

'

''

'

'

'

'

From perspective projection: Magnification:

z

f

yx

yx

d

dm

'

)()(

)'()'('

22

22

=+

+==

),,(

),,(

zyyxxB

zyxA

++

)','',''('

)',','('

fyyxxB

fyxA

++

2mArea

Area

scene

image=

Computer Vision - TP1 - Image Formation 22

Page 23: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Image Formation using Lenses

• Lenses are used to avoid problems with pinholes.

• Ideal Lens: Same projection as pinhole but gathers more light!

i o

foi

111=+• Gaussian Thin Lens Formula:

• f is the focal length of the lens – determines the lens’s ability to refract light

P

P’

f

Computer Vision - TP1 - Image Formation 23

Page 24: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Focus and Defocus

foi

111=+

• In theory, only one scene plane is in focus

d

aperture

diameter

aperture

foi

1

'

1

'

1=+

• Gaussian Law:

Blur Circle, b

)'()()'(

)'( oofo

f

fo

fii −

−−=−

i

'i

o

'o

Computer Vision - TP1 - Image Formation 24

Page 25: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Depth of Field

• Range of object distances

over which image is

sufficiently well focused

• Range for which blur circleis less than the resolution

of the sensor

http://images.dpchallenge.com/images_portfolio/27920/print_preview/116336.jpg

Computer Vision - TP1 - Image Formation 25

Page 26: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Image Sensors

• Considerations

• Speed

• Resolution

• Signal / Noise Ratio

• Cost

Computer Vision - TP1 - Image Formation 26

Page 27: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

CCD (charge coupled device)

Higher dynamic range

High uniformity

Lower noise

CMOS (complementary metalOxide semiconductor)

Lower voltage

Higher speed

Lower system complexity

Image Sensors

• Convert light into an electric charge

Computer Vision - TP1 - Image Formation 27

Page 28: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Sensing Brightness

Incoming light has a spectral distribution ( )p

So the pixel intensity becomes

( ) ( )

= dpqkI

Computer Vision - TP1 - Image Formation 28

Page 29: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

How do we sense colour?

• Do we have infinite number of filters?

rod

cones

Three filters of different spectral responses

Computer Vision - TP1 - Image Formation 29

Page 30: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Sensing Colour

• Tristimulus (trichromatic) values

( ) ( )

= dphkI RR

( ) ( )

= dphkI GG

( ) ( )

= dphkI BB

( )Rh

( )Gh( )Bh

( )BGR III ,,

( ) ( ) ( ) BGR hhh ,,Camera’s spectral response functions:

Computer Vision - TP1 - Image Formation 30

Page 31: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Sensing Colour

beam splitter

light

3 CCD

Bayer pattern

Foveon X3TM

Computer Vision - TP1 - Image Formation 31

Page 32: Computer Vision TP1 Image FormationImage Formation using Lenses • Lenses are used to avoid problems with pinholes. • Ideal Lens: Same projection as pinhole but gathers more light!

Resources

• Szeliski, “Computer Vision: Algorithms and

Applications”, Springer, 2011

– Chapter 1 – “Introduction”

– Chapter 2 – “Image Formation”

Computer Vision - TP1 - Image Formation 32