Compsci 372 – Tutorial
Total Page:16
File Type:pdf, Size:1020Kb
CompSci 372 – Tutorial Part 10 Colour 20/10/2008 CompSci 372 - Tutorial 10 1 Electromagnetic Radiation 20/10/2008 CompSci 372 - Tutorial 10 2 Spectrum ● Spectral Density Function (SDF) Energy Energy 400nm Wavelength 700nm 400nm Wavelength 700nm Energy Energy 400nm Wavelength 700nm 400nm Wavelength 700nm 20/10/2008 CompSci 372 - Tutorial 10 3 Spectrum Energy 400nm Wavelength 700nm ● Hue: Dominant wavelength ● Luminance: Sum of energy, Brightness ● Saturation: Ratio Hue part/Luminance 20/10/2008 CompSci 372 - Tutorial 10 4 Spectrum Energy 400nm Wavelength 700nm ● Hue High S High S Med L Low L ● Luminance ● Saturation 20/10/2008 CompSci 372 - Tutorial 10 5 Spectrum Energy 400nm Wavelength 700nm ● Hue Low S Low S High L Low L ● Luminance ● Saturation 20/10/2008 CompSci 372 - Tutorial 10 6 Interaction with Materials ● Absorption ● Transmission ● Reflection ● (Combination) ● Preservation of Energy 20/10/2008 CompSci 372 - Tutorial 10 7 Spectrum ● Spectral Response Function (SRF) Energy Energy 400nm Wavelength 700nm 400nm Wavelength 700nm Energy Energy 400nm Wavelength 700nm 400nm Wavelength 700nm 20/10/2008 CompSci 372 - Tutorial 10 8 Result ● SDF · SRF = Result SDF Energy 400nm Wavelength 700nm Energy 400nm Wavelength 700nm Energy 400nm Wavelength 700nm 20/10/2008 CompSci 372 - Tutorial 10 9 Result ● Light sources defined by their SDF ● Materials defined by their SRF – Absorbed Light SRF ● Surfaces, Eye, CCD chip, ... – Reflected Light SRF ● Mirror, polished surface,... – Transmitted Light SRF ● Glass, water, ... 20/10/2008 CompSci 372 - Tutorial 10 10 Human Eye ● Receptors for – Long/Medium/Short wavelengths (Cone cell, high intensity) – “At night, Gray value/Intensity all cats are gray” (Rod cell, low intensity) Amplified by neurons 20/10/2008 CompSci 372 - Tutorial 10 11 Human Eye ● We can perceive different SDF's as the same colour! Energy 400nm Wavelength 700nm 20/10/2008 CompSci 372 - Tutorial 10 12 Colour Spaces ● RGB, sRGB, CMYK, YIQ, ypbPr, xvYCC, HSV, HSL ● CIE 1931 XYZ – First attempt to produce a colour space based on human perception ● Most common: tristimulus colour space – Each dimension a primary colour – Values [0...1] 20/10/2008 CompSci 372 - Tutorial 10 13 RGB Colour Space ● Components: – Red Additive – Green – Blue ● Easy to understand ● Difficult to handle – What is “Brown”? – Interpolation problems 20/10/2008 CompSci 372 - Tutorial 10 14 CMYK Colour Space ● Components: – Cyan Subtractive – Magenta – Yellow – (Black/Key) ● Used in Print ● Also not trivial to handle 20/10/2008 CompSci 372 - Tutorial 10 15 HSL Colour Space ● Components: – Hue – Saturation – Lightness ● Interpolation is easier and intuitive 20/10/2008 CompSci 372 - Tutorial 10 16 HSL Colour Space ● Components: – Hue – Saturation – Lightness 20/10/2008 CompSci 372 - Tutorial 10 17 HSV Colour Space ● Components: – Hue – Saturation – Value 20/10/2008 CompSci 372 - Tutorial 10 18 CIE XYZ Colour Space (1931) ● Mother of all colour spaces ● Chromacity Diagram: – Normalised coordinates: X x= X Y Z Y y= X Y Z 20/10/2008 CompSci 372 - Tutorial 10 19 CIE XYZ Colour Space (1931) ● Easy to interpolate ● Gamut of human perception (average person) ● Gamuts of devices are subsets 20/10/2008 CompSci 372 - Tutorial 10 20.