What is Color?Human perception; depends on light source.. What is Color?Human perception; depends on light source.. What is Color?Human perception; depends on light source... of light, s
Trang 1nick.higham@manchester.ac.uk http://www.manchester.ac.uk/~higham/
Trang 2What is Color?
Human perception; depends on light source
Retina has 3 types of cones ⇒ trichromatic theory
Why does yellow appear so bright?
Trang 3What is Color?
Human perception; depends on light source
Retina has 3 types of cones ⇒ trichromatic theory
Why does yellow appear so bright?
Trang 4What is Color?
Human perception; depends on light source
Retina has 3 types of cones ⇒ trichromatic theory
Trang 5Colour Blindness
John Dalton (1766–1844)
Described his own c.b in
lecture to M/cr Lit & Phil
Soc, 1794
He was a deuteranope
Trang 6Vector Space Model of Colour
Model responses of the 3 cones as
ci =
Z λ max
λ min
si(λ)f (λ)d λ, i = 1 : 3,where f = spectral distrib of light, si =sensitivity of ith
cone, [λmin, λmax] =wavelengths of visible spectrum
Discretizinggives
c = STf , c ∈ R3, S ∈ Rn×3, f ∈ Rn.For standardized S, c is the tristimulusvector
Trang 7Vector Space Model of Colour
Model responses of the 3 cones as
ci =
Z λ max
λ min
si(λ)f (λ)d λ, i = 1 : 3,where f = spectral distrib of light, si =sensitivity of ithcone, [λmin, λmax] =wavelengths of visible spectrum
Discretizinggives
c = STf , c ∈ R3, S ∈ Rn×3, f ∈ Rn.For standardized S, c is the tristimulusvector
Trang 8Commission Internationale de l’Éclairage (CIE) definedstandardcolour matching functionssi(λ)(1931, 1964).CIE RGB space
CIE XYZ space: nonnegative si(λ), Y corresponds toperceived brightness
Trang 9Projective Transformation
Trang 10CIE Chromacity Coordinates
X + Y + Z, y =
Y
X + Y + Z (z = 1 − x − y ).(x , y ) chromacity diagram:
Trang 12Perceptual Uniformity: LAB Space
XYZ and RGB far from perceptually uniform
Search for (non)linear transformations that give moreuniform colour spaces
CIE L*a*b*(LAB, 1976) is more uniform:
L = lightness, A = green–magenta, B = blue–yellow
LAB supported by Adobe Photoshop, MATLAB ImageProcessing Toolbox
Trang 13Dan Margulis on LAB (2006)
Trang 14Printers usesubtractive colour model: dyes absorb power
from spectrum To produce wide range of colours needcyan,
yellow,magentaprimaries
But C + M + Y = K = black : why do we need K?
Printing 3 layers makes the paper very wet.Black as 3 layers requires accurate registration
C + M + Y will not give a true, deep black due toimperfections
Coloured ink is more expensive
Trang 15Printers usesubtractive colour model: dyes absorb powerfrom spectrum To produce wide range of colours needcyan,
yellow,magentaprimaries
But C + M + Y = K = black : why do we need K?
Printing 3 layers makes the paper very wet
Black as 3 layers requires accurate registration
C + M + Y will not give a true, deep black due to
imperfections
Coloured ink is more expensive
Trang 16Bayer Filter
Sensor has 2green filters foreach red andblue
Raw files are the unprocessed data off the sensor
Trang 17Converts toRGB colourimage by
Trang 19Compressed RGB file
Filesizes reduced by orders of magnitude
Used by all digital cameras and imaging software
tif (LZW) 12111 kjpg 12 1892 kjpg 8 917 kjpg 0 221 k
Trang 20Jpeg 200 × 200 px
Trang 22Discrete Cosine Transform
Algorithm breaks image into 8 × 8 blocks
For each block luminance values expressed as linear
combination of cosine functions of increasing frequency
`x ,y =
7X
i=0
7X
j=0
fijcos (2x + 1)iπ
16
cos (2y + 1)iπ
16
,
where fij computed by a discrete cosine transform:
y =0
`x ,ycos (2x + 1)iπ
16
cos (2y + 1)iπ
16
Trang 24
Panoramic Stitching
Nonlinear least squares, Levenberg–Marquardt:(JTJ + λD)d = JTr , J ∈ R3200×32 for 8 images
Trang 25Panoramic Stitching
Nonlinear least squares, Levenberg–Marquardt:(JTJ + λD)d = JTr , J ∈ R3200×32 for 8 images
Trang 26Panoramic Stitching
Nonlinear least squares, Levenberg–Marquardt:(JTJ + λD)d = JTr , J ∈ R3200×32 for 8 images
Trang 27Panoramic Stitching
Nonlinear least squares, Levenberg–Marquardt:
(JTJ + λD)d = JTr , J ∈ R3200×32 for 8 images
Trang 30Transformations to improve images
Trang 40UoM turquoise is (L, A, B) ≈ (85, −12, −3).Convert to LAB then A ← −A.
Trang 49Mean
Trang 50Median
Trang 51Max
Trang 52Min
Trang 53Variance
Trang 54Mathematics is intrinsic to digital imaging: modelling theeye’s response to colour, colour spaces, capturing
images, storing and processing them
Modern developments in Photoshop, Lightroom, etc., rely
on clever mathematical algorithms as well as exploitingfaster processors—and, increasingly, GPUs
Most of the relevant mathematics is covered in our
honours degree programme
Talk, including references, available at
http://www.maths.manchester.ac.uk/~higham/talks/
Trang 55Acknowledgements for Graphics
compvis/ColourIntro/ColourIntro.htm
Fraser [4]
Trang 58References III
N J Higham
Color spaces and digital imaging
In N J Higham, M R Dennis, P Glendinning, P A
Martin, F Santosa, and J Tanner, editors, The PrincetonCompanion to Applied Mathematics, pages 808–813.Princeton University Press, Princeton, NJ, USA, 2015
A R Hill
How we see colour
In R McDonald, editor, Colour Physics for Industry, pages211–281 Society of Dyers and Colourists, Bradford,
England, 1987
Trang 59Photoshop LAB Color: The Canyon Conundrum and
Other Adventures in the Most Powerful Colorspace
Peachpit Press, Berkeley, CA, USA, 2006
C Poynton
A guided tour of color space, 1997
www.poynton.com/PDFs/Guided_tour.pdf
Trang 60References V
G Sharma and H J Trussell
Digital color imaging
IEEE Trans Image Processing, 6(7):901–932, 1997
S Westland and C Ripamonti
Computational Colour Science Using MATLAB
Wiley, New York, 2004