1 / 29

Understanding Colour Science & Models

Explore how colour is represented using mathematical models & the physics and biology behind how we perceive colour. Learn about different colour models like RGB, HSB, CMYK, and techniques like dithering and antialiasing in image processing.

samuellewis
Download Presentation

Understanding Colour Science & Models

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. G6DPMM - Lecture 6 Colour Science & Colour Models

  2. Colour Representation • Colour is represented as a number • Indexed Colour (<24 bit) • Each number is an index into a lookup table (palette)For example (a 2-bit palette): • 0 – black • 1 – white • 2 – red • 3 – green • Implemented in hardware (obsolete) • True colour definition • Colourmapping • True Colour (25 bit) • Each number represents a colour using a mathematical model known as a “colour model”

  3. 0.00001nm 10nm 0.03m 0.00003m 0.001nm 1nm 0.3m 5,500km 30m Cosmic Rays Gamma Rays Visible Light X-Rays TV Radio Electricity IR Microwaves UV 700nm 400nm The Physics of Colour • Light is an EM wave in the “visible” part of the spectrum (400-700nm) • Frequency represents colour • Amplitude represents brightness

  4. The Biology of Colour • The human eye • Light is focused onto the retina • The retina contains rods and cones • Rods • Very sensitive – can detect amplitude of light • No mechanism for colour detection • Cones • Less sensitive • Three types – Red, Green & Blue • Each can detect the amplitude of one “primary” colour • Additive colours • Cognition not physics! • Approximately 10-20 million additive colours can be distinguished

  5. Primary / Additive Colours Red Green Blue Red & Green Red & Blue Green & Blue Red, Green & Blue None  Red  Green  Blue  Yellow  Purple  Cyan  White  Black Primary Additive

  6. RGB Colour Model • 3 Colour Channels • RGB - 1 byte each - 0-255 • Encodes 256 x 256 x 256 = 16,777,216 Colours • True colour (24 bit colour) • Notation is 3 integers (often written as hex) • Examples • 255, 255, 255 (FF FF FF) - White • 255, 0, 0 (FF 00 00) - Red • 255, 0, 255 (FF 00 FF) - Magena • 100, 100, 50 (64 64 32) - Olive

  7. 0% 0% 100% 100% HSB Colour Model • Hue, Saturation & Brightness • Hue is an angle (0-360)specifying the position on a colour wheel. • Saturation is a percentage representing the difference from a neutral grey. • Brightness is a percentage representing the continuum from black to white.

  8. Other Colour Models • CMYK • Used mostly for printing, based on cyan, magenta, yellow and black inks used for colour separation. • YIQ & YUV • Used for broadcast TV, an analogue system based upon luminance, chrominance of wave phases. • YCC • Developed by Kodak for Photo CD • Pantone • Colour “catalogue” used by printing industry.

  9. Colour Management • “Perceived” colour is hard to keep exactly constant. • Many factors affect this • Colour model • Monitor • Ambient lighting • Platform (eg Macintosh is typically “brighter” than Windows) • Major problem in multimedia

  10. Image Processing • Processing techniques can create an illusion of colour and detail that is not really present. • Dithering • When reducing colour depth each pixel must be replaced with a corresponding pixel in the target palette. • Antialiasing • When resizing each pixel may be replaced by intermediate colours to avoid “pixelation”

  11. Dithering • Each pixel must be replaced with a corresponding pixel in the target palette. • Adjacent pixels are examined and intermediate colours may be used • Dithering software is built into most bitmap editing/processing software • Algorithms: • Random • Average • Ordered • Floyd-Steinberg

  12. Random Dither • Generate a random (0-255) number for each pixel • If greater than the number pixel=white otherwise black • Crude and “noisy”. • Almost never used

  13. Random Dither

  14. Average Dither • Calculate an average pixel value • If each pixel is above this then white, else black. • Crude and “contrasty”. • Almost never used.

  15. Average Dither

  16. Ordered Dither (pattern) • Divide the image into ordered cells - ie matrices. • Uses matrix arithmetic to compare each pixel with the average “threshold”. • Generate a block of pixels to represent each cell. • Widely used by the printing industry - rare in multimedia.

  17. Ordered Dither

  18. Floyd-Steinberg Dither • Error diffusion, diffusion, dispersion. • For each pixel the closest colour is found • The difference between this and the original is the error for that pixel. • The error is then “diffused” over adjacent pixels that have not yet been processed. • When these pixels are processed, the error is added to the newly calculated colour. • Widely used in multimedia. • Many minor variants.

  19. Floyd-Steinberg Dither

  20. Original (24-bit) Image

  21. 8 Colour - No Dither

  22. 8 Colour - Ordered Dither

  23. 8 Colour - Diffusion Dither

  24. Antialiasing • Resampling • Avoids pixellation (“jaggies”) on resizing. • Creates intermediate colour pixels around edges.

  25. Original Image

  26. Scaled Image

  27. Scaled Image (detail)

  28. Scaled Image (antialiased)

  29. Antialiased image - detail

More Related