colors and visual system 09
play

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


  1. Principles of Computer Graphics and Image Processing Colors and Visual System (09) RNDr. Martin Madaras, PhD. martin.madaras@stuba.sk

  2. Computer Graphics - Image Processing - Modeling - Rendering - Animation - Advanced Techniques 2

  3. Computer Graphics - Image Processing Image Representation - - Modeling - Rendering - Animation - Advanced Techniques 3

  4. Image Processing - Raster Graphics Image devices - Image representation - Human vision system - Colors - 4

  5. Raster Graphics - 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? - 5

  6. Raster Graphics - 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? - 6

  7. How the lectures should look like #1 Ask questions, please!!! - Be communicative - www.slido.com #PPGSO09 - More active you are, the better for you! - 7

  8. Frame Buffer 8

  9. Color Mixing - Mixture of Red, Green and Blue 9

  10. Color Display 10

  11. Modern Displays LCD - liquid crystal display 11

  12. Pixel PIxEL - Picture Element 12

  13. Color Frame Buffer Each color intensity needs to be stored separately 13

  14. Color Depth Bits per pixel determine image color depth 14

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

  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 16

  17. Double Buffering - Q: What happens if we write directly to the framebuffer ? - We need a second buffer to solve this problem 17

  18. Aspect Ratio - Display aspect ratio TV 4:3 - HDTV 16:9 - 35mm film 3:2 - - Pixel aspect ratio - Nowadays, almost always 1:1 18

  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 - 19

  20. What is an image? Rectilinear 2D array of pixels - Reality Digital Image 20

  21. What is an image? Rectilinear 2D array of pixels - Reality Digital Image 21

  22. What is an image? Pixels are NOT little squares! Pixels are samples! - Reality Digital Image 22

  23. What is an image? - 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 23

  24. How to capture images? - Pixels are samples of a continuous function Photoreceptors in eye - CCD chips in digital cameras - Rays in virtual scene - 24

  25. How to display images? - Re-create continuous signal from samples i.e. CRT monitor - 25

  26. Image resolution - 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 - 26

  27. Raster Graphics - 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? - 27

  28. What is color? - Distribution of energies amongst frequencies of visible light range 28

  29. Visible light - 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 29

  30. How do we perceive color? - Color as perceived reflectance of the light source 30

  31. How do we perceive color? - Color as perceived reflectance of the light source 31

  32. Color Perception - The density of cones is not linear - Fovea contains most color cones 32

  33. Color Perception - The density of cones is not linear - Fovea contains most color cones 33

  34. Color representation by computers - Common color models - RGB - CMY - XYZ - HSV - HLS - etc… - Tristimulus / Trichomatic color theory 34

  35. RGB color model - Additive color model - Combining colors will produce white 35

  36. CMY color model - Subtractive color model - Combining colors will cover white, absorbing light 36

  37. RGB and CMY Conversion: R=I-C, G=I-M, B=I-Y 37

  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 38

  39. HSV - Hue, Saturation and Value - More natural to manipulate for humans 39

  40. HSL - Hue, Saturation and Lightness - Maximum saturation is at L=0.5 40

  41. Gamma correction - Color intensities are considered linear - Most display devices are non-linear - Intensity(voltage) ~= 2 x Intensity(voltage / 2) y = 𝑦 1/𝛿 41

  42. Color Matching 42

  43. Color Matching 43

  44. Color Matching 44

  45. Color Matching Functions 45

  46. CIE XYZ colors 46

  47. CIE XYZ colors 47

  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) 48

  49. CIE xyY chromaticity diagram - Defines color gamut of displays - Mapped on to 2D - x +y + z = 1 49

  50. RGB color gamut - Devices are usually not capable to display all colors 50

  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 51

  52. Image Processing - Image Filtering - Pixel operations Filtering - Warping - Composition - Morphing - - Image Manipulation - Sampling and Reconstruction - Quantization and Aliasing 52

  53. Summary  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 53

  54. How the lectures should look like #2 Ask questions, please!!! - Be communicative - www.slido.com #PPGSO09 - More active you are, the better for you! - 54

  55. Next Week Image Processing 55

  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 56

  57. Questions ?! www.slido.com #PPGSO09 martin.madaras@stuba.sk 57

Recommend


More recommend