CS488 Vision and Light Luc R ENAMBOT 1 Outline We talked about - - PowerPoint PPT Presentation

cs488 vision and light
SMART_READER_LITE
LIVE PREVIEW

CS488 Vision and Light Luc R ENAMBOT 1 Outline We talked about - - PowerPoint PPT Presentation

CS488 Vision and Light Luc R ENAMBOT 1 Outline We talked about how to take 2D and 3D scenes and draw them on a 2D surface We will be discussing how to make these images more interesting Topics light, illumination, colour,


slide-1
SLIDE 1

CS488 Vision and Light

Luc RENAMBOT

1

slide-2
SLIDE 2

Outline

  • We talked about how to take 2D and 3D scenes

and draw them on a 2D surface

  • We will be discussing how to make these images

more interesting

  • Topics
  • light, illumination,
  • colour, shading,
  • occlusion

2

slide-3
SLIDE 3

Plan

  • We are going to talk about light and colour,

and the nature of human vision

  • In future weeks we will deal with the more

sophisticated concepts of illumination and shading

3

slide-4
SLIDE 4

Human Vision

  • Light is focused by the cornea and

the lens onto the retina at the back of the eye

  • Vitreous humor - liquid inside the

cornea is close to water, and has the same index of refraction as

  • water. If we are under water the

light is not refracted, but it is refracted if we are not in water

4

slide-5
SLIDE 5

Reflection

  • Reflection is the change in

direction of a wave front at an interface between two dissimilar media so that the wave front returns into the medium from which it

  • riginated

5

slide-6
SLIDE 6

Refraction

  • Refraction is the change in

direction of a wave due to a change in its velocity

  • This is most commonly seen

when a wave passes from one medium to another

6

slide-7
SLIDE 7

Eye

  • Light passing through the center of the cornea and

lens hits the fovea (or Macula).

  • Human eye has 2 types of photosensitive receptors
  • Cones
  • operate at higher illumination levels
  • provide better spacial resolution and contrast

sensitivity

  • provide colour vision
  • Rods
  • operate at lower illumination levels

7

slide-8
SLIDE 8

Cones

  • The cones are highly concentrated at the fovea

and quickly taper off around the retina

  • For colour vision we have the greatest acuity at

the fovea, or approximately at the center of out field of vision

  • Visual acuity drops off as we move away from the

center of the field of view. However, we are very sensitive to motion on the periphery of our vision, so we can see movement even if we can't see what is moving

8

slide-9
SLIDE 9

Rods

  • The rods are highly concentrated 10-20

degrees on both sides of the fovea, but almost none are at the fovea itself

  • Which is why if you are stargazing and want

to see something dim you can not look directly at it

9

slide-10
SLIDE 10

Optic Nerve

  • There is also the optic nerve which is 10-20

degrees away from the fovea which connects your eye to your brain

  • This is the blind spot where there are no

cones and no rods. We can not see anything at this point though we are so used to this that we do not notice it unless we try to see the blind spot

10

slide-11
SLIDE 11

Blind Spot

11

slide-12
SLIDE 12

Test it !

http://serendip.brynmawr.edu/bb/blindspot1.html

12

slide-13
SLIDE 13

Adaptation

  • What happens when we walk from a bright area into

a dark area, say into a movie theatre?

  • When we are outside the rods are saturated from the
  • brightness. The cones which operate better at high

illumination levels provide all the stimulous

  • When we walk into the darkened theatre the cones

don't have enough illumination to do much good, and the rods take time to desaturate before they can be useful in the new lower illumination environment

13

slide-14
SLIDE 14

Sensitivity

  • It takes about 20 minutes for the rods to become

very sensitive, so dark adjust for about 20 minutes before going stargazing

  • Since the cones do not operate well at low light

intensities, we can not see colour in dim light as

  • nly the rods are capable of giving us information
  • The rods are also more sensitive to the blue end
  • f the spectrum so it is especially hard to see red

in the dark (it appears black)

14

slide-15
SLIDE 15

Illusion

  • Computer graphics is based
  • n illusion
  • From the R, G, and B dots of

a LCD screens to creating an illusion of 3D on a flat screen

15

slide-16
SLIDE 16

16

slide-17
SLIDE 17

17

slide-18
SLIDE 18

18

slide-19
SLIDE 19

19

slide-20
SLIDE 20

Achromatic Light

  • No color, only grayscale with 0 as black, and

1 as white

  • Quantity of light or intensity of light is the
  • nly parameter
  • To human beings, brightness (perceived

intensity) has a logarithmic scale, not a linear scale

20

slide-21
SLIDE 21

Achromatic Light

  • LCDs can not get completely black due to

backlight

  • CRTs can not get completely black due to

light reflection within the tube

  • Minimum values range from 0.005 to 0.025
  • f the maximum intensity
  • Ration of maximum to minimum intensity is

the dynamic range

21

slide-22
SLIDE 22
  • For (n+1) intensities and a minimum intensity of Io

and a maximum intensity of 1, the ratio of succeeding intensities is

  • For 10 intensities from 0.1 to 1 r = 1.292 and the 10

intensities are:

0.1 0.13 0.17 0.21 0.28 0.36 0.46 0.59 0.77 1.0

  • whereas a linear scale would be:

0.1 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.0

Logarithmic Scale

22

r = ( 1 Io )

1 n

Ij = (Io)

n−j n

slide-23
SLIDE 23
  • The number of distinct intensities needed for

smooth continuous tone depends on the dynamic range of the device. The human eye can not distinguish intensities with a ratio of less than 1.01.

  • so with 1/Io as the dynamic range, w set r = 1.01

and want to find n:

Dynamic Range

23

1.01 = ( 1 Io )

1 n

slide-24
SLIDE 24

Dynamic Range

  • Through the magic of logarithms, we can find the

following

  • For a CRT with dynamic range of 50 to 200
  • 400-530 intensities are needed
  • For a photographic print with range 100
  • 465 intensities are needed
  • For a photographic slide with range 1000
  • 700 intensities are needed

24

slide-25
SLIDE 25

Chromatic Color

  • Hue
  • distinguishes between colors
  • Saturation
  • how far is the color from a grey of equal intensity
  • vivid colors (bright red, royal blue) are highly saturated, further

from grey

  • pastel colors (pink, sky blue) are lightly saturated, closer to grey
  • Lightness
  • perceived intensity of a reflecting object
  • Brightness
  • perceived intensity of a luminous object

25

slide-26
SLIDE 26

Chromatic Color

  • Why do CRTs have red, green, and blue phosphors?
  • Currently believed there are three kinds of cones

in the human eye, one attuned to red, one to green, and one to blue (Young and Helmholtz)

  • Light is electromagnetic energy with wavelengths

from 400nm - 700nm

  • peak red response at 580nm (reddish-yellow)
  • peak green response at 545nm (greenish-yellow)
  • peak blue response at 440nm

26

slide-27
SLIDE 27

Chromatic Color

27

slide-28
SLIDE 28

Color Gamut

  • We can not generate all the colors that the

eye can see using an RGB display

  • We also can not generate all the colors that

the eye can see using photographic film (though it can display a larger part of the visible spectrum than a monitor)

  • Need for a standard

28

slide-29
SLIDE 29

C.I.E Diagram

  • This is the CIE Chromaticity diagram

developed in 1931

  • If luminance is included this becomes a 3D

cone, by normalizing we reduce the cone to a plane (the X + Y + Z = 1 plane)

  • Chromaticity depends on dominant wavelength

(hue) and saturation only

  • As with homogeneous coordinates, different

luminances are mapped onto the same point

  • n the plane
  • So this plane DOES NOT contain all the

possible colors as color also depends on luminance (lightness or brightness)

29

slide-30
SLIDE 30

C.I.E Diagram

  • Unfortunately you can’t mix positive amounts
  • f the three primary colors (red, green, and

blue) to create all of the possible colors that we can see

  • So for the diagram above there are three

primary colors X, Y, and Z are defined so that you can add X and Y and Z together to get all

  • f the possible colors
  • By definition X,

Y, and Z are not be red, green, and blue and the color matching functions (the curves) of X, Y, and Z are not the curves of red, green, and blue.

  • For a thorough explanation of the x,y axis, you

should see section 13.2.2 (p579)

30

X Y R G B

slide-31
SLIDE 31

31

Y R G B W

slide-32
SLIDE 32

Various Gamuts

32

slide-33
SLIDE 33

C.I.E. Diagram

  • Given 2 points within the region the colors on the line

between those 2 points are mixtures of those two colors.

  • Complementary colors exist on opposite sides of the

white-light center, whose mixture yields the white-light center.

  • The triangle shows the colors we can make by adding

R, G, and B

  • Different hardware has different triangles allowing us to

compare the gamuts of different devices on the same diagram

33

slide-34
SLIDE 34

Color Models

  • Various models exist
  • RGB
  • CMY
  • YIQ,

YUV

  • HSV (HSB)

34

slide-35
SLIDE 35

RGB

  • RGB has three primary

colours Red Green Blue

  • Each of which ranges from

0 to 1

  • Which are added together

to form the final color

  • Black is at the origin (0,0,0)
  • White (1,1,1)

35

(0,0,0) -> black (1,1,1) -> white (1,0,0) -> red (0,1,0) -> green (0,0,1) -> blue (1,1,0) -> yellow (1,0,1) -> magenta (0,1,1) -> aqua

slide-36
SLIDE 36

Example

36

slide-37
SLIDE 37

CMY

  • CMY has three primary colors Cyan Magenta

Yellow each of which ranges from 0 to 1, which are subtracted from white to form the final color

  • cyan is white minus red, leaving only green and blue
  • magenta is white minus green, leaving only red and

blue

  • yellow is white minus blue, leaving only red and

green

37

slide-38
SLIDE 38

CMY

  • White is at the origin (0,0,0)
  • (1,1,1) -> black
  • (0,0,0) -> white
  • (0,1,1) -> red

(1,0,1) -> green (1,1,0) -> blue

  • (0,0,1) -> yellow

(0,1,0) -> magenta (1,0,0) -> aqua

38

slide-39
SLIDE 39

Color Conversion

  • To convert between RGB and CMY

39

  C M Y   =   1 1 1   −   R G B     R G B   =   1 1 1   −   C M Y  

slide-40
SLIDE 40

CMYK

  • CMYK adds black as a fourth parameter to

CMY

  • K = min(C, M,

Y)

  • C = Ccmy - K
  • M = Mcmy - K
  • Y =

Ycmy - K

40

slide-41
SLIDE 41

YIQ

  • Recoding of RGB for US television

broadcasts

  • Y = luminance, and is the component

shown on black and white TVs

  • I and Q represent the chrominance

information

  • Coding

41

  Y I Q   =   0.299 0.587 0.114 0.596 −0.275 −0.321 0.212 −0.528 0.311   ∗   R G B  

slide-42
SLIDE 42

YUV etc

  • Similar to YIQ
  • NTSC now uses the

YUV color space

  • YPbPr color space used in

analog component video and its digital child

  • YCbCr used in digital video

42

YUV

slide-43
SLIDE 43

HSV etc

  • HSV (HSB)
  • Hue

Saturation Value (Brightness)

  • HLS
  • Hue, Lightness, Saturation
  • There is a lot of research out there on how to

effectively use color, and many, many examples of how not to use color

43

slide-44
SLIDE 44

Color Blindness

  • 8 percent of men
  • 0.5 percent of women

44

slide-45
SLIDE 45

Example

45

Normal Deuteranopia (Daltonism) Tritanopia Protanopia

slide-46
SLIDE 46

Appropriate Use of Color

  • Color is a very powerful tool - and therefor a

dangerous tool

  • Aside from issues of color blindness and other

physiological issues we looked at with the optical illusions, there is a lot of cultural baggage associated with color

  • If color is important in the computer graphics that

you are doing (e.g.. scientific visualizations) you need to learn about color or work with someone who knows about color

  • Book: Interaction of Color by Josef Albers

46

slide-47
SLIDE 47

2D Cues to Depth

  • We determine depth through a combination
  • f 2D and 3D cues, which is how many of

the optical illusions at the beginning work, and how we can play 'Doom' and get a sense

  • f 3D space and motion
  • Some people do not have stereo vision so all
  • f their depth cues are 2D, and they do very

well with only these 2D cues

47

slide-48
SLIDE 48

Depth Cues

  • Overlap
  • Apparent Size (size consistency)
  • Differential Size
  • Linear Perspective
  • Motion Parallax
  • Aerial Perspective
  • Texture
  • Shading and Lighting

48

slide-49
SLIDE 49

Depth Cues

  • Overlap: Closer objects cover parts of objects

that are further away

  • Apparent Size: As an object moves towards

us it gets larger in our retina but we do not perceive it getting bigger. We understand that it isn't changing its size as it moves

  • Differential Size: If we know that two objects

are the same size and one appears to be smaller than the other then the smaller one is further away

49

slide-50
SLIDE 50

Depth Cues

  • Linear Perspective: Parallel lines converge to

the vanishing point as they go off in the distance

  • Motion Parallax: Objects that are closer will

move 'more' or 'faster' than objects that are further away.

  • Aerial Perspective: Fog/Smog/Dust/Dirt in

the air make objects that are further away appear less distinct

50

slide-51
SLIDE 51

Depth Cues

  • Texture:

You can only discern textures when an

  • bject is near, otherwise the surface appears

uniform

  • Shading and Lighting: for a lot of small

reasons

51

slide-52
SLIDE 52

Depth Cues

  • The dominant cue at long distances is

differential size

  • The dominant cue at intermediate distances is

motion parallax

  • The dominant cue within 12" is stereo vision

52

slide-53
SLIDE 53

Next Time...

  • Visible-Surface Determination

53