54
Introduction to Computer Vision Image Formation Light (Energy) Source Surface Pinhole Lens Imaging Plane World Optics Sensor Signal B&W Film Color Film TV Camera Silver Density Silver density in three color layers Electrical

Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Image Formation

Light (Energy) Source

Surface

Pinhole Lens

Imaging Plane

World Optics Sensor Signal

B&W Film

Color Film

TV Camera

Silver Density

Silver densityin three colorlayers

Electrical

Page 2: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Today

■  Optics: ●  Pinhole cameras (last time). ●  Lenses

■  Artificial sensors ●  1 sensor array vs. 3 sensor arrays ●  Bayer patterns

Page 3: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision

f

IMAGE PLANE

OPTIC AXIS

LENS

i o

1 1 1 f i o = + ‘THIN LENS LAW’

Thin Lens Model

■  Rays entering parallel on one side converge at focal point."■  Rays diverging from the focal point become parallel."

PARALLEL���rays converge���at f. RAY

NON-PARALLEL���rays converge at i. RAY

Page 4: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Time of exposure

■  Artificial cameras typically have a shutter that is opened and closed to let in light.

■  The signal produced by the film or CCD array is typically linear in the exposure time.

■  The more light that is let in, the less exposure time needed: ●  Bright light -> short exposure time ●  Low light -> long exposure time ●  Large aperture/lens -> short exposure time ●  Pinhole camera -> long exposure time.

Page 5: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Exposure

http://en.wikipedia.org/wiki/File:Shutter_speed_in_Greenwich.jpg

Page 6: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Lenses

■  Lenses allow the capture of more light. ■  Suppose a pinhole camera with pinhole 1mm^2 needs

an exposure time of 10 seconds to take a photo of a certain brightness?

■  Consider a lens with diameter 2cm. How long would a photo need to be exposed using this lens?

Page 7: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Lenses: practice

■  Calculate “i” for objects at a certain distance. ■  How much faster can we take a picture with a lens of

diameter 2cm compared to a 1mm pinhole?

Page 8: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Image Formation

Light (Energy) Source

Surface

Pinhole Lens

Imaging Plane

World Optics Sensor Signal

B&W Film

Color Film

TV Camera

Silver Density

Silver densityin three colorlayers

Electrical

Page 9: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Photometry

■  Photometry: Concerned with mechanisms for converting light energy

into electrical energy.

World Optics Sensor Signal Digitizer Digital Representation

Page 10: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision B&W Video System

.

OpticsImage Plane

A/D Converterand Sampler

E(x,y) : Electricalvideo signal

Image L(x,y)

VideoCamera

I(i,j) Digital Image

22 34 22 0 18 •••

••••••

Grayscale Image Data

Computer Memory

Page 11: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Color Video System

.

Blue ChannelA/D ConverterGreen Channel

A/D Converter

OpticsImage Plane

Digital Image

E(x,y) : Electricalvideo signal

Image L(x,y)

Computer Memory

22 3422 0 18 •••

••••••

Red ChannelA/D Converter

VideoCamera

B(i,j)G(i,j)

R(i,j)

Page 12: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Beam Splitter

Page 13: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Trichroic Beam splitter

Page 14: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision 3CCD cameras

http://en.wikipedia.org/wiki/File:A_3CCD_imaging_block.jpg

Page 15: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Sony 6 MegaPixel CCD

Page 16: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision CCD mounted on circuit board

http://en.wikipedia.org/wiki/File:2.1_MP_CCD_Close_Up.JPG

Page 17: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision

Human Eye CCD Camera

Spectral Sensitivity

■  Figure 1 shows relative efficiency of conversion for the eye (scotopic and photopic curves) and several types of CCD cameras. Note the CCD cameras are much more sensitive than the eye.

■  Note the enhanced sensitivity of the CCD in the Infrared and Ultraviolet (bottom two figures)

■  Both figures also show a handrawn sketch of the spectrum of a tungsten light bulb

Tungsten bulb

Page 18: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Building a camera with 1 CCD

■  CCDs are expensive, and so are beam splitters. ■  How do we build a camera with one CCD array?

Page 19: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Bayer Filters

Page 20: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Bayer Filters

Page 21: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Bayer Filters

Page 22: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Bayer Filters

http://en.wikipedia.org/wiki/Bayer_filter

Traditional design Recent Kodak design

Page 23: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Bayer Filter Example

http://upload.wikimedia.org/wikipedia/commons/f/f2/Colorful_spring_garden_Bayer.png

Page 24: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Bayer Filter Example

http://upload.wikimedia.org/wikipedia/commons/f/f2/Colorful_spring_garden_Bayer.png

Page 25: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Bayer Filter Example

http://upload.wikimedia.org/wikipedia/commons/f/f2/Colorful_spring_garden_Bayer.png

Page 26: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Bayer Filter Example

http://upload.wikimedia.org/wikipedia/commons/f/f2/Colorful_spring_garden_Bayer.png

Page 27: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Bayer Filter

http://upload.wikimedia.org/wikipedia/commons/f/f2/Colorful_spring_garden_Bayer.png

Page 28: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Interpolation techniques

http://upload.wikimedia.org/wikipedia/commons/f/f2/Colorful_spring_garden_Bayer.png

Page 29: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Interpolation

1.  Copy pixel value to your left 2.  Bilinear interpolation within one color channel.

1.  Between 4 pixels: ■  Take average of the 4.

2.  Between 2 pixels: ■  Take average of the 2.

3.  Many more sophisticated methods.

Page 30: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Photometry

■  Photometry: Concerned with mechanisms for converting light energy

into electrical energy.

World Optics Sensor Signal Digitizer Digital Representation

Page 31: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Pre-digitization image

■  What is an image before we digitize it? ●  Continuous range of wavelengths. ●  2-dimensional extent ●  Continuous range of power at each point.

Page 32: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Brightness images

■  To simplify, consider only a brightness image: ●  Two-dimensional (continuous range of locations) ●  Continuous range of brightness values.

■  This is equivalent to a two-dimensional function over the plane.

Page 33: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision An image as a surface

Page 34: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision An image as a surface

Page 35: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Discretization

■  Sampling strategies: ●  Spatial sampling

■  How many pixels? ■  What arrangement of pixels?

●  Brightness sampling ■  How many brightness values? ■  Spacing of brightness values?

●  For video, also the question of time sampling.

Page 36: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Projection through a pixel

Central Projection RayCentral Projection Ray

Image irradiance is the average of the scene radiance over the area of the surface intersecting the solid angle!

Digitized 35mm Slide or Film

Page 37: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Signal Quantization

■  Goal: determine a mapping from a continuous signal (e.g. analog video signal) to one of K discrete (digital) levels.

I(x,y) = .1583 volts

= ???? Digital value

Page 38: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Quantization

■  I(x,y) = continuous signal: 0 ≤ I ≤ M ■  Want to quantize to K values 0,1,....K-1 ■  K usually chosen to be a power of 2:

■  Mapping from input signal to output signal is to be determined. ■  Several types of mappings: uniform, logarithmic, etc.

K: #Levels #Bits 2 1 4 2 8 3 16 4 32 5 64 6 128 7 256 8

Page 39: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Choice of K

Original

Linear Ramp

K=2 K=4

K=16 K=32

Page 40: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Digital X-rays

Page 41: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision How many bits do we need?

Page 42: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Digital X-rays: 1 bit

Page 43: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Digital X-rays: 2 bits

Page 44: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Digital X-rays: 3 bit

Page 45: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Digital X-rays: 8 is enough?

Page 46: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision

Gray Levels-Resolution Trade Off

■  More gray levels can be simulated with more resolution.

■  A “gray” pixel:

■  Doubling the resolution in each direction adds at least 3 new gray levels. But maybe more?

Page 47: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Pseudocolor

Page 48: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Digital X-rays: 8 is enough?

Page 49: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision MRI

Page 50: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Choice of K

K=2 (each color)

K=4 (each color)

Page 51: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Choice of Function: Uniform

■  Uniform sampling divides the signal range [0-M] into K equal-sized intervals.

■  The integers 0,...K-1 are assigned to these intervals. ■  All signal values within an interval are represented by

the associated integer value. ■  Defines a mapping:

Qua

ntiz

atio

n Le

vel

3

M

21

0

K-1

0Signal Value

•••

Page 52: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Logarithmic Quantization

■  Signal is log I(x,y). ■  Effect is:

Qua

ntiz

atio

n Le

vel

3

M

21

0

K-1

0Signal Value

•••

■  Detail enhanced in the low signal values at expense of detail in high signal values.

Page 53: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision Logarithmic Quantization

Original

Logarithmic Quantization

Quantization Curve

Page 54: Light (Energy) Source Surface Imaging Plane Pinhole Lenselm/Teaching/ppt/370/370_5.pptx.pdf · Introduction to Computer Vision Time of exposure Artificial cameras typically have a

Introduction to Computer Vision End