cpsc 641 computer graphics image formation l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CPSC 641: Computer Graphics Image Formation PowerPoint Presentation
Download Presentation
CPSC 641: Computer Graphics Image Formation

Loading in 2 Seconds...

play fullscreen
1 / 91

CPSC 641: Computer Graphics Image Formation - PowerPoint PPT Presentation


  • 150 Views
  • Uploaded on

CPSC 641: Computer Graphics Image Formation. Jinxiang Chai. Are They Images?. Outline. Color representation Image representation Pin-hole Camera Projection matrix Plenoptic function. Outline. Color representation Image representation Pin-hole Camera Projection matrix

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CPSC 641: Computer Graphics Image Formation' - tatum


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
outline
Outline
  • Color representation
  • Image representation
  • Pin-hole Camera
  • Projection matrix
  • Plenoptic function
outline4
Outline
  • Color representation
  • Image representation
  • Pin-hole Camera
  • Projection matrix
  • Plenoptic function
color representation
Color Representation
  • Why do we use RGB to encode pixel color?
  • Can we use RGB to represent all colors?
  • What are other color representations?
human vision
Human Vision

Model of human vision

human vision7
Human Vision

Model of human vision

  • Vision components:
    • Incoming light
    • Human eye
electromagnetic spectrum
Electromagnetic Spectrum

Visible light frequencies range between:

  • Red: 4.3X1014 hertz (700nm)
  • Violet: 7.5X1014 hertz (400nm)
visible light
Visible Light

The human eye can see “visible” light in the frequency between 400nm-700nm

visible light10
Visible Light

The human eye can see “visible” light in the frequency between 400nm-700nm

400nm

700nm

visible light11
Visible Light

The human eye can see “visible” light in the frequency between 400nm-700nm

400nm

700nm

  • Not strict boundary
  • Some colors are absent (brown, pink)
spectral energy distribution
Spectral Energy Distribution

Three different types of lights

spectral energy distribution13
Spectral Energy Distribution

The six spectra below look the same purple to normal color-vision people

color representation14
Color Representation?

Why not all ranges of light spectrum are perceived?

So how to represent color?

- unique

- compact

- work for as many visible lights as possible

400nm

700nm

human vision15
Human Vision

Photoreceptor cells in the retina:

- Rods

- Cones

light detection rods and cones
Light Detection: Rods and Cones

Rods:

-120 million rods in retina

-1000X more light sensitive than Cones

- Discriminate B/W brightness in low illumination

- Short wave-length sensitive

Cons:

- 6-7 million Cones in the retina

- Responsible for high-resolution vision

- Discriminate Colors

- Three types of color sensors (64% red, 32%, 2% blue)

- Sensitive to any combination of three colors

tristimulus of color theory
Tristimulus of Color Theory

Spectral-response functions of each of the three types of cones

tristimulus of color theory18
Tristimulus of Color Theory

Spectral-response functions of each of the three types of cones

Can we use them to match any spectral color?

tristimulus of color theory19
Tristimulus of Color Theory

Spectral-response functions of each of the three types of cones

Color matching function based on RGB

- any spectral color can be represented as a linear combination of these primary colors

tristimulus of color theory20
Tristimulus of Color Theory

Spectral-response functions of each of the three types of cones

Color matching function based on RGB

- any spectral color can be represented as a linear combination of these primary colors

tristimulus of color theory21
Tristimulus of Color Theory

Spectral-response functions of each of the three types of cones

Color matching function based on RGB

- any spectral color can be represented as a linear combination of these primary colors

tristimulus color theory
Tristimulus Color Theory

So, color is psychological

- Representing color as a linear combination of red, green, and blue is related to cones, not physics

- Most people have the same cones, but there are some people who don’t – the sky might not look blue to them (although they will call it “blue” nonetheless)

- But many people (mostly men) are colorblind, missing 1,2 or 3 cones (can buy cheaper TVs)

additive and subtractive color
Additive and Subtractive Color

RGB color model

CMY color model

White: [0 0 0]T

Green: [1 0 1];

White: [1 1 1]T

Green: [0 1 0];

Complementary color models: R=1-C; G = 1-M; B=1-Y;

rgb color space
RGB Color Space

blue

green

red

RGB cube

  • Easy for devices
  • Can represent all the colors?
  • But not perceptual
  • Where is brightness, hue and saturation?
tristimulus
Tristimulus
  • Since 3 different cones, the space of colors is 3-dimensional.
  • We need a way to describe color within this 3 dimensional space.
  • We want something that will let us describe any visible color with additive combination…
the cie xyz system
The CIE XYZ system
  • CIE – Comission Internationale de l’Eclairage

- International Commission on Illumination

- Sets international standards related to light

  • Defined the XYZ color system as an international standard in 1931
  • X, Y, and Z are three Primary colors.

- imaginary colors

- all visible colors can be defined as an additive combination of these three colors.

- defines the 3 dimensional color space

chromaticity diagram
Chromaticity Diagram
  • Project the X+Y+Z=1 slice along the Z-axis
  • Chromaticity is given by the x, y coordinates
cie perceptual space
CIE Perceptual Space

Which colors can RGB monitor displays?

hsv color model
HSV Color Model

Perceptually appropriate:

- Hue: the color type (0-360 deg)

- Saturation: the intensity of the color (0-100%)

- Brightness: the brightness of color (0-100%)

Nonlinear transform between the HSV and RGB space

outline31
Outline
  • Color representation
  • Image representation
  • Pin-hole Camera
  • Projection matrix
  • Plenoptic function
image representation
Image Representation

An image is a 2D rectilinear array of Pixels

- A width X height array where each entry of the array stores a single pixel

image representation33
Image Representation

A pixel stores color information

Luminance pixels

- gray-scale images (intensity images)

- 0-1.0 or 0-255

- 8 bits per pixel

Red, green, blue pixels (RGB)

- Color images

- Each channel: 0-1.0 or 0-255

- 24 bits per pixel

image representation34
Image Representation

An image is a 2D rectilinear array of Pixels

- A width X height array where each entry of the array stores a single pixel

- Each pixel stores color information

(255,255,255)

outline35
Outline
  • Color representation
  • Image representation
  • Pin-hole Camera
  • Projection matrix
  • Plenoptic Function
how do we see the world
How Do We See the World?

Let’s design a camera:

idea 1: put a piece of film in front of camera

Do we get a reasonable picture?

pin hole camera
Pin-hole Camera
  • Add a barrier to block off most of the rays
    • This reduces blurring
    • The opening known as the aperture
    • How does this transform the image?
camera obscura
Camera Obscura
  • The first camera
    • Known to Aristotle
    • Depth of the room is the focal length
    • Pencil of rays – all rays through a point
camera obscura39
Camera Obscura

How does the aperture size affect the image?

shrinking the aperture
Shrinking the Aperture
  • Why not make the aperture as small as possible?
    • Less light gets through
    • Diffraction effects…
shrink the aperture diffraction
Shrink the Aperture: Diffraction

A diffuse circular disc appears!

adding a lens

“circle of

confusion”

Adding A Lens
  • A lens focuses light onto the film
    • There is a specific distance at which objects are “in focus”
      • other points project to a “circle of confusion” in the image
    • Changing the shape of the lens changes this distance
changing lenses
Changing Lenses

50 mm

28 mm

70 mm

210 mm

outline46
Outline
  • Color representation
  • Image representation
  • Pin-hole Camera
  • Projection matrix
  • Plenoptic Function
projection matrix
Projection Matrix
  • What’s the geometric relationship between 3D objects and 2D images?
modeling projection 3d 2d
Modeling Projection: 3D->2D

The coordinate system

  • We will use the pin-hole model as an approximation
  • Put the optical center (Center Of Projection) at the origin
  • Put the image plane (Projection Plane) in front of the COP
  • The camera looks down the negative z axis
modeling projection 3d 2d49
Modeling Projection: 3D->2D

Projection equations

  • Compute intersection with PP of ray from (x,y,z) to COP
  • Derived using similar triangles (on board)
modeling projection 3d 2d50
Modeling Projection: 3D->2D

Projection equations

  • Compute intersection with PP of ray from (x,y,z) to COP
  • Derived using similar triangles (on board)
  • We get the projection by throwing out the last coordinate:
homogeneous coordinates
Homogeneous Coordinates

Is this a linear transformation?

  • no—division by z is nonlinear
homogeneous coordinates52
Homogeneous Coordinates

Is this a linear transformation?

Trick: add one more coordinate:

  • no—division by z is nonlinear

homogeneous image

coordinates

homogeneous scene

coordinates

homogeneous coordinates53
Homogeneous Coordinates

Is this a linear transformation?

Trick: add one more coordinate:

  • no—division by z is nonlinear

homogeneous image

coordinates

homogeneous scene

coordinates

Converting from homogeneous coordinates

perspective projection
Perspective Projection

Projection is a matrix multiply using homogeneous coordinates:

divide by third coordinate

perspective projection55
Perspective Projection

Projection is a matrix multiply using homogeneous coordinates:

divide by third coordinate

This is known as perspective projection

  • The matrix is the projection matrix
  • Can also formulate as a 4x4

divide by fourth coordinate

perspective effects
Perspective Effects

Distant object becomes small

The distortion of items when viewed at an angle (spatial foreshortening)

perspective effects57
Perspective Effects

Distant object becomes small

The distortion of items when viewed at an angle (spatial foreshortening)

perspective effects58
Perspective Effects

Distant object becomes small

The distortion of items when viewed at an angle (spatial foreshortening)

parallel projection

Image

World

Parallel Projection

Special case of perspective projection

  • Distance from the COP to the PP is infinite
  • Also called “parallel projection”
  • What’s the projection matrix?
weak perspective projection
Weak-perspective Projection

Scaled orthographic projection

- object size is small as compared to the average distance from the camera z0 (e.g.σz < z0/20)

- d/z ≈ d/z0 (constant)

weak perspective projection61
Weak-perspective Projection

Scaled orthographic projection

- object size is small as compared to the average distance from the camera z0 (e.g.σz < z0/20)

- d/z ≈ d/z0 (constant)

Projection matrix:

λ

λ

z0

d

spherical projection
Spherical Projection

What if PP is spherical with center at COP?

In spherical coordinates, projection is trivial:

(q,f) = (q,f)

Note: it doesn’t depend on focal length d!

view transformation

P

View Transformation

From world coordinate to camera coordinate

view transformation64

P

View Transformation

From world coordinate to camera coordinate

viewport transformation
Viewport Transformation

From projection coordinate to image coordinate

y

u

x

v

u0, v0

viewport transformation66
Viewport Transformation

From projection coordinate to image coordinate

y

u

x

v

u0, v0

u

sx

0

u0

x

v

0

-sy

v0

y

1

0

0

1

1

putting it together
Putting It Together

From world coordinate to image coordinate

Perspective projection

View transformation

Viewport projection

u

sx

0

u0

v

0

-sy

v0

1

0

0

1

putting it together68
Putting It Together

From world coordinate to image coordinate

Perspective projection

View transformation

Viewport projection

u

sx

0

u0

v

0

-sy

v0

1

0

0

1

The relative position & orientation between camera and objects

Image resolution, aspect ratio

Focal length

camera parameters
Camera Parameters

Totally 11 parameters,

u

sx

0

u0

v

0

-sy

v0

1

0

0

1

camera parameters70
Camera Parameters

Totally 11 parameters,

u

sx

0

u0

v

0

-sy

v0

1

0

0

1

extrinsic camera parameters

Intrinsic camera parameters

outline72
Outline
  • Color representation
  • Image representation
  • Pin-hole Camera
  • Projection matrix
  • Plenoptic function
plenoptic function
Plenoptic Function

What is the set of all things that we can ever see?

- The Plenoptic Function (Adelson & Bergen)

plenoptic function74
Plenoptic Function

What is the set of all things that we can ever see?

- The Plenoptic Function (Adelson & Bergen)

Let’s start with a stationary person and try to parameterize everything that he can see…

plenoptic function75
Plenoptic Function

Any ray seen from a single view point can be parameterized by (θ,φ).

color image
Color Image

is intensity of light

  • Seen from a single view point (θ,φ)
  • At a single time t
  • As a function of wavelength λ

P(θ,φ,λ)

dynamic scene
Dynamic Scene

is intensity of light

  • Seen from a single view point (θ,φ)
  • Over time t
  • As a function of wavelength λ

P(θ,φ,λ,t)

moving around a static scene
Moving around A Static Scene

is intensity of light

  • Seen from an arbitrary view point (θ,φ)
  • At an arbitrary location (x,y,z)
  • At a single time t
  • As a function of wavelength λ

P(x,y,z,θ,φ,λ)

moving around a dynamic scene
Moving around A Dynamic Scene

is intensity of light

  • Seen from an arbitrary view point (θ,φ)
  • At an arbitrary location (x,y,z)
  • Over time t
  • As a function of wavelength λ

P(x,y,z,θ,φ,λ,t)

plenoptic function80
Plenoptic Function

Can reconstruct every possible view, at every moment, from every position, at every wavelength

Contains every photograph, every movie, everything that anyone has ever seen! it completely captures our visual reality!

An image is a 2D sample of plenoptic function!

P(x,y,z,θ,φ,λ,t)

how to capture orthographic images
How to “Capture” Orthographic Images

Rebinning rays forms orthographic images

how to capture orthographic images82
How to “Capture” Orthographic Images

Rebinning rays forms orthographic images

how to capture orthographic images83
How to “Capture” Orthographic Images

Rebinning rays forms orthographic images

how to capture orthographic images84
How to “Capture” Orthographic Images

Rebinning rays forms orthographic images

how to capture orthographic images85
How to “Capture” Orthographic Images

Rebinning rays forms orthographic images

multi perspective images
Multi-perspective Images

Rebinning rays forms multiperspective images

multi perspective images87
Multi-perspective Images

Rebinning rays forms multiperspective images

……

outline89
Outline
  • Color representation
  • Image representation
  • Pin-hole Camera
  • Projection matrix
  • Plenoptic Function
next lecture
Next lecture

Image sampling theory

Fourier Analysis