Colors and Visual System (09) RNDr. Martin Madaras, PhD. - - PowerPoint PPT Presentation

colors and visual system 09
SMART_READER_LITE
LIVE PREVIEW

Colors and Visual System (09) RNDr. Martin Madaras, PhD. - - PowerPoint PPT Presentation

Principles of Computer Graphics and Image Processing Colors and Visual System (09) RNDr. Martin Madaras, PhD. martin.madaras@stuba.sk Computer Graphics - Image Processing - Modeling - Rendering - Animation - Advanced Techniques 2 Computer


slide-1
SLIDE 1

Principles of Computer Graphics and Image Processing

Colors and Visual System (09)

  • RNDr. Martin Madaras, PhD.

martin.madaras@stuba.sk

slide-2
SLIDE 2

2

  • Image Processing
  • Modeling
  • Rendering
  • Animation
  • Advanced Techniques

Computer Graphics

slide-3
SLIDE 3

3

  • Image Processing
  • Image Representation
  • Modeling
  • Rendering
  • Animation
  • Advanced Techniques

Computer Graphics

slide-4
SLIDE 4

4

  • Raster Graphics
  • Image devices
  • Image representation
  • Human vision system
  • Colors

Image Processing

slide-5
SLIDE 5

5

  • Images
  • What is an image?
  • How to capture images?
  • How to display images?
  • Color
  • What is a color?
  • How do we perceive the color?
  • How computers represent the color?

Raster Graphics

slide-6
SLIDE 6

6

  • Images
  • What is an image?
  • How to capture images?
  • How to display images?
  • Color
  • What is a color?
  • How do we perceive the color?
  • How computers represent the color?

Raster Graphics

slide-7
SLIDE 7

7

  • Ask questions, please!!!
  • Be communicative
  • www.slido.com #PPGSO09
  • More active you are, the better for you!

How the lectures should look like #1

slide-8
SLIDE 8

8

Frame Buffer

slide-9
SLIDE 9

9

Color Mixing

  • Mixture of Red, Green and Blue
slide-10
SLIDE 10

10

Color Display

slide-11
SLIDE 11

11

Modern Displays

LCD - liquid crystal display

slide-12
SLIDE 12

12

Pixel

PIxEL - Picture Element

slide-13
SLIDE 13

13

Color Frame Buffer

Each color intensity needs to be stored separately

slide-14
SLIDE 14

14

Color Depth

Bits per pixel determine image color depth

slide-15
SLIDE 15

15

8-bit Palette

Each pixel points to a color number in palette Palette is 24bit but contains only 256 colors

slide-16
SLIDE 16

16

Display Resolution and Memory

  • Frame-buffer memory size and speed as limiting factor
  • 1024x768 24bit - 2.25 MB - 0.79 megapixels
  • 1920x1080 24bit - 5.94 MB - 2 megapixels
  • 4096x2160 30bit - 31.64 MB - 8.84 megapixels
  • For animated displays we need to read the frame buffer at

least 24 times per second

slide-17
SLIDE 17

17

Double Buffering

  • Q: What happens if we write directly to the framebuffer ?
  • We need a second buffer to solve this problem
slide-18
SLIDE 18

18

Aspect Ratio

  • Display aspect ratio
  • TV 4:3
  • HDTV 16:9
  • 35mm film 3:2
  • Pixel aspect ratio
  • Nowadays, almost always 1:1
slide-19
SLIDE 19

19

Frame-buffer Manipulation

  • Direct memory access
  • Limited by OS security policies
  • Various graphical toolkits and libraries
  • Often slow for complex geometry and 3D graph
  • OpenGL and DirectX
  • Fast but requires hardware
slide-20
SLIDE 20

20

  • Rectilinear 2D array of pixels

Reality Digital Image

What is an image?

slide-21
SLIDE 21

21

  • Rectilinear 2D array of pixels

Reality Digital Image

What is an image?

slide-22
SLIDE 22

22

  • Pixels are NOT little squares! Pixels are samples!

Reality Digital Image

What is an image?

slide-23
SLIDE 23

23

  • For a programmer it is a memory structure
  • Usually represented as sequence of pixels
  • Typically line after line, left to right
  • Pixels have their own structure

What is an image?

slide-24
SLIDE 24

24

  • Pixels are samples of a continuous function
  • Photoreceptors in eye
  • CCD chips in digital cameras
  • Rays in virtual scene

How to capture images?

slide-25
SLIDE 25

25

  • Re-create continuous signal from samples
  • i.e. CRT monitor

How to display images?

slide-26
SLIDE 26

26

  • Spatial resolution
  • Image has “Width” x “Height” pixels
  • DPI (dots per inch) is more representative
  • Intensity resolution
  • Each pixel has limited “Depth” bits per color
  • Temporal resolution
  • Image is updated at “Rate” Hz in case of a video sequence

Image resolution

slide-27
SLIDE 27

27

  • Images
  • What is an image?
  • How to capture images?
  • How to display images?
  • Color
  • What is a color?
  • How do we perceive the color?
  • How computers represent the color?

Raster Graphics

slide-28
SLIDE 28

28

  • Distribution of energies amongst frequencies of visible light

range

What is color?

slide-29
SLIDE 29

29

  • The perceived color of light is characterized by
  • Hue = dominant frequency (peak)
  • Lightness = luminance (area under curve)
  • Saturation = excitation purity (ratio of highest to rest)

White light Orange light

Visible light

slide-30
SLIDE 30

30

  • Color as perceived reflectance of the light source

How do we perceive color?

slide-31
SLIDE 31

31

  • Color as perceived reflectance of the light source

How do we perceive color?

slide-32
SLIDE 32

32

  • The density of cones is not linear
  • Fovea contains most color cones

Color Perception

slide-33
SLIDE 33

33

  • The density of cones is not linear
  • Fovea contains most color cones

Color Perception

slide-34
SLIDE 34

34

  • Common color models
  • RGB
  • CMY
  • XYZ
  • HSV
  • HLS
  • etc…
  • Tristimulus / Trichomatic color theory

Color representation by computers

slide-35
SLIDE 35

35

  • Additive color model
  • Combining colors will produce white

RGB color model

slide-36
SLIDE 36

36

  • Subtractive color model
  • Combining colors will cover white, absorbing light

CMY color model

slide-37
SLIDE 37

37

Conversion: R=I-C, G=I-M, B=I-Y

RGB and CMY

slide-38
SLIDE 38

38

CMYK

  • CMY used in printing can be expensive
  • Black is cheap
  • K = Key or blacK
  • K = min(C,M,Y)
  • CMY amount is then reduced by K
slide-39
SLIDE 39

39

HSV

  • Hue, Saturation and

Value

  • More natural to manipulate for humans
slide-40
SLIDE 40

40

HSL

  • Hue, Saturation and Lightness
  • Maximum saturation is at L=0.5
slide-41
SLIDE 41

41

Gamma correction

  • Color intensities are considered linear
  • Most display devices are non-linear
  • Intensity(voltage) ~= 2 x Intensity(voltage / 2)

y = 𝑦1/𝛿

slide-42
SLIDE 42

42

Color Matching

slide-43
SLIDE 43

43

Color Matching

slide-44
SLIDE 44

44

Color Matching

slide-45
SLIDE 45

45

Color Matching Functions

slide-46
SLIDE 46

46

CIE XYZ colors

slide-47
SLIDE 47

47

CIE XYZ colors

slide-48
SLIDE 48

48

CIE XYZ colors

  • Commission Internationale de l’Éclarige 1931
  • Device independent, CIE 1931
  • Based on three standardized colors X,Y,Z

x = X/(X+Y+Z) y = Y/(X+Y+Z) z = Z/(X+Y+Z)

slide-49
SLIDE 49

49

CIE xyY chromaticity diagram

  • Defines color gamut of displays
  • Mapped on to 2D
  • x +y + z = 1
slide-50
SLIDE 50

50

RGB color gamut

  • Devices are usually not capable to display all colors
slide-51
SLIDE 51

51

Color representation in code

  • 32bit per channel
  • Normalized colors: floating point <0,1> for each channel
  • 8bit per channel
  • <0,255> range
  • OpenGL “GLUByte”
  • C++ uint8_t
slide-52
SLIDE 52

52

  • Image Filtering
  • Pixel operations
  • Filtering
  • Warping
  • Composition
  • Morphing
  • Image Manipulation
  • Sampling and Reconstruction
  • Quantization and Aliasing

Image Processing

slide-53
SLIDE 53

53

 Images

 Pixels are samples  Images are 2D arrays  Images have limited resolution

 Colors

 Visible light spectrum  Anatomy of eye and perception  Basic color models and their applications  CIE chromaticity diagram  Gamma correction

Summary

slide-54
SLIDE 54

54

  • Ask questions, please!!!
  • Be communicative
  • www.slido.com #PPGSO09
  • More active you are, the better for you!

How the lectures should look like #2

slide-55
SLIDE 55

55

Image Processing

Next Week

slide-56
SLIDE 56

56

Acknowledgements

 Thanks to all the people, whose work is shown here and whose

slides were used as a material for creation of these slides:

Matej Novotný, GSVM lectures at FMFI UK Peter Drahoš, PPGSO lectures at FIIT STU

slide-57
SLIDE 57

57

www.slido.com #PPGSO09 martin.madaras@stuba.sk

Questions ?!