IST06 ImageFormationx4
IST06 ImageFormationx4
Color Signal
Image Formation
Radiometric Units Photometric Units Image Formation Model Illuminant Linear Approximations Surface Linear Approximations
Reflectance
1 0.75 0.5 0.25 0 400 500 600 700
Cone Sensitivities
1 0.75 0.5 0.25 0 400 500 600 700
Cone Absorbtions
1 0.75 0.5 0.25 0 L M S
Radiometric Units
Radiant Flux Joules/Sec = Watt
Light emitted from a source (in all directions) .
Radiometric Units
Irradiance Watt/m2
Light density incident on a plane (from all directions).
(How many photons reach a given surface area in a given amount of time).
Radiance Watt/m2/sr
Power per unit solid angle per unit area.
(Radiance is independent of distance).
Radiometry Photometry
Source Radiance
Symbol: L Units: W/(sr m2)
SI Unit
Source Luminance
Symbol: Lv Units: lm/(sr m2)
Q F= t
I= F
watt
watt /sr
0.8 0.6
E=
F Ar
watt /m2
Radiance
L=
I As cos( )
watt
/sr/m2
400
500
600
700
800
- wavelength [nm]
Q = energy (joules) t = time (sec) = solid angle (steradian) A = area (meter 2 ) = angle incident to plane
watt=joule/sec
http://www.calculator.org/properties/luminance.prop
Courtesy P. Catrysse
Radiometry Photometry
X v = K m X l ( ) V ( )d
Photometric term Radiometric term
Radiometry Photometry
X v = K m X l ( ) V ( )d
For X, we can pair the Radiometric and Photometric pairs:
QUANTITY
RADIOMETRIC
PHOTOMETRIC
power power per unit solid angle power per unit area power per area per solid angle
Radiant Intensity Luminous Intensity W/sr lm/sr = candela (cd) Irradiance W/m2 Radiance W/m2/sr Illuminance lm/m2 = lux (lx) Luminance lm/m2/sr = cd/m2 = nit
Basic Unit in Photometry is the Lumen and the Candela Monochromatic light 555nm with radiant intensity of 1 Watt = 683 Lumens. Monochromatic light 555nm with radiant intensity of 1 Watt/sr = 683 Candela.
Iv = Ev =
Fv Lv Ar
Total quantity of light emitted from a point in a given solid angle Light density incident on a plane Light emitted or reflected from an extended source in a given direction
Luminance
Lv =
I As cos( )
cd/m2
Q = energy (joules) t = time (sec) = solid angle (steradian) A = area (meter 2 ) = angle incident to plane
watt=joule/sec
http://www.electro-optical.com/whitepapers/candela.htm
Courtesy P. Catrysse
Luminance of interior scenes (cd/m2) Interior room (fluorescent lighting) floor/walls 90 in shadow 10 Interior room (no lighting) floor/walls in shadow in closet door
30 5 1
Color Signal
Reflectance
1 0.75 0.5 0.25 0 400 500 600 700
Cone Sensitivities
1 0.75 0.5 0.25 0 400 500 600 700
400
500
600
700
Cone Absorbtions
1 0.75 0.5 0.25 0 L M S
Surface Reflectances
Yellow Red
1 0.8 0.6 0.4 0.2 400 1 0.8 0.6 0.4 0.2 400
Incident light
Body reflection
500 600 700
500
600
700
Blue
Gray
500
600
700
400
Wavelength (nm)
(Shafer 85)
Reflection Model
Incident light Interface reflection Body reflection
Interface reflection - mirror like reflection at the surface Body reflection - reflected randomly between color particles. Reflection is equal in all directions
Types of Surfaces: Specular surface = Interface reflection is non-zero object appears glossy. Lambertian surface (matte) = surface with no interface reflection, only body reflection. Interface reflection - reflects all wavelengths equally and in the same direction, thus this reflection takes on the same color as the illuminant (and the same SPD).
Color Signal
Reflectance
1 0.75 0.5 0.25 0 400 500 600 700
Cone Sensitivities
1 0.75 0.5 0.25 0 400 500 600 700
L = l( )e( )s( )
Output
Cone Absorbtions
1 0.75 0.5 0.25 0 L M S
Sensors
L M = S L l ( ) L L m( ) L L s ( ) L
Illuminant
O 0 0 e( ) O
Surface
M s ( ) M
Output
Affects of Illumination
1 0.8 0.6 0.4 0.2 0 400 1 0.8 0.6 0.4 0.2 0 400 550 700 550 700
Yellow
Red
Blue
Affects of Illumination
Illuminant 1 Illuminant 2
550
700
550
700
Tungsten
0 400
550
700
0 400
550
700
Blue Sky
L M S
1 0.8 0.6 0.4 0.2 1 0.8 0.6 0.4 0.2 550 700 0 400
L M S
1 0.8 0.6 0.4 0.2 550 700 0 400
L M S
0 400
550
700
0 400
550
700
L M S
L M S
L M S
Color Constancy
There was a farmer haf a dog and Bingo was his name - oh.... The big brown fox jumped over the lazy black dog. Roses are red Violets are blue sugar is sweet and so are you
White paper - reflects 90% Black ink reflects 2% Indoor: 100 units illumination Outdoor: 10,000 units illumination.
Outdoors, black ink reflects more than white paper indoors yet the ink still looks black.
Color Constancy
Absolute level of cone responses does not define an objects color appearance.
Camera vs Perceived
Camera sensors Camera output
The level of sensor responses relative to responses to other objects in the scene defines the color appearance of an object..
Scene
L M S L M S
Color Correction
Known illuminant
Visual responses
Estimate
Reflectance functions
Derive
Color Correction
Assume camera sensors are known
Acquired Image
Estimate Reflectance
Estimate Illuminance
c() = e()s()
Problems: 1) There is no way to distinguish between the following illuminant-surface pairs: e() = e() f() s() = s() / f() c() = e()s() = [e() f() ][s() /f()]= c()
Corrected Image
Linear Models
2) Visual systems receives LMS cone absorption values (or sensor output values) and not SPDs, thus metameric pairs add to the confusion:
Judd et al 64 Cohen 64 Maloney 86 Marimont & Wandell 93
Assume: Likely Illuminants and Surfaces
ri = R () C()
i
Metameric pair
c1() = e()s1()
c2() = e()s2()
Ri() C1()
Ri() C2()
Sensor response
Relative intensity
0.8
0.6
such that a linear combination gives a good approximation for every illuminant. Chose a linear model that minimizes:
0.4
0.2
0 400
500
600
700
[ e() - i ei() ]2
i=1
Wavelength (nm)
Matrix representation:
e0
e1 e2 e3
1 2 3
e0 = mean(pi) Minimizes (pi e0)2
i
e = Be
e1 e0
e1 = ?
e1
e1
e2
e2
C = pi pit
Diagonalize using Singular Value Decomposition (SVD) : C = UDVt Where D is a diagonal matrix of eigen values and U,V are matrices of eigenVectors. U = V = [ e1() e2() e3() .]
140 120
Relative power
e1() = mean
r1 r2 = r3
R1 R2 R3
r=Re
Wavelength (nm)
r = R(Be) = (RBe)
estimate : estimate e :
= (RBe)-1r e = Be
Where s is the surface reflectance function = surface coefficients n = dimension of linear model (# of basis functions)
s1 s2 . . . sn
1 . . .
reflectance
Matrix notation:
s = Bs
wavelength
s1()
0.1 0.05 0 -0.05 700 -0.1 400 0.1 0.05 0 -0.05 600 700 -0.1 400 500 500
s2()
600
700
s ()
s4()
600 700
Macbeth Chart
n=1
n=4
Problem: assuming a 3D linear model for surface reflection and for illuminants, find 3 surface reflection coefficients for each of the p points in the scene. Case 1: Illuminant is known
If the illuminant e is given, then there are 3p measurements and 3p unknowns. For every point :
n=2
n=5
n=3
n=6
r2 = R2()e() jsj()
r3 = R3()e() jsj()
As a matrix equation:
r = e
where the (i,j) entry of matrix e is
As a matrix equation:
Ri ( )e( )s ( )
j
r = s
where the (i,j) entry of matrix s is
1 e r
R i ( )e ( )s( )
j
= e r
(e is the pseudo-inverse)
= s r
Calculate the illuminant:
e( ) = i ei( )
i= 1
Proceed as in Case 1.
Option 2: Uniform perfect reflector brightest surface in scene has a flat SPD. (McCann et al 77)
Calculate brightness of every surface (RGB -> Y) Find surface (pixel) rbright of maximum brightness. Calculate s for brightest surface (flat SPD), then :
Option 1: Gray world assumption average of all surface in scene is gray. (Buchsbaum 80, Land 86)
Using linearity: if s1 under e produces response r1 and s2 under e produces response r2 then s1+s2 under e produces response r1+r2 Thus, under gray world assumption, p if
rbright = s
Calculate :
1 = sr
As in Case 2
s
i=1
then
r
i=1
averages to gray
i
Calculate illuminant:
e( ) = i ei( )
i= 1
Calculate illuminant:
e( ) = i ei( )
i= 1
Option 3: Variations on Gray world assumption Average of all surface in scene is not exactly gray. The more colors in scene and larger std - the more likely to average to gray.
(Lee 01, Lam 04)
Dichromatic Surface Model Color signal at any location is a linear combination of Interface reflectance and Body reflectance. 0.8 0.6 0.4 0.2 0
Body Reflectance Interface Reflectance
1
0.8
0.6
g
0.4
0.2
0 0
0.2
0.4
0.6
0.8
0.2
0.4
0.6
0.8
1 0.8 0.6
1 0.8 0.6
g
0.4 0.2 0 0
g
0.4 0.2 0 0
0.2
0.4
0.6
0.8
0.2
0.4
0.6
0.8
Illuminants
Classic approach
500
600
700
Wavelength (nm)
0.008
Illuminants
0.006 0.004
Mahanalobis Distances
0.002 0.000 400
500
600
700
Wavelength (nm)
Illumination Correction
Change image acquired under one illumination, to appear as if taken under a different illumination.
color correction for images normalization of images computer graphics - computer generated images.
Using linear models:
3
ri = Ri ( )e( )s( )
using s() = si ( )i we have: Illumination Classification Clusters under 8 Illuminants: Munsell Surfaces vs Skin Surfaces
i =1
r = e
r = e r = e
r = e ( e )1 r
ie a linear transformation of sensor responses.
Illumination Correction
Examples: Tungsten Blue Sky 0.8119 0.2271 0.0550 -0.0803 1.1344 0.1282 0.0429 -0.0755 1.8091
Illumination Correction
Given two images, find the illuminant transformation M between them.
r =
Assume ri and ri are sensor outputs in the two images corresponding to same surface reflectance.
Notice diagonal elements are dominant. X1 0 0 0 X2 0 0 0 X3 Compensation for illuminants using pure diagonal transformation = scaling of sensor responses = Von Kries Coefficient Law
ri = M ri
Build sensor response matrixes:
r1 r2 . . . rn
r1 r2 . . . rn
Solve *
= r1 r2 . . . rn
r1 r2
. . . r n
Illumination Correction
White Balance
RGB = (215,253,178)
Apply transformation:
253/215 0
0 0
0 1 0 0 253/178
RGB = (253,253,253)
Columns 1-3, 5-7 and 9-11 have 108 standardized CIELAB values Accuracy to 10 Eab Produced by Kodak, Agfa, others
ftp://ftp.kodak.com/gastds/Q60DATA/TECHINFO.PDF
Altona TestSuite1.2a
test
match
ftp://ftp.kodak.com/gastds/Q60DATA/TECHINFO.PDF
Bg
Bg + green
To make match patch appear equal to test, more green must be added. Color Constancy says added green must equal green (as if adding illuminant to patch). In practice: compensation for illuminant is not complete.