Professional Documents
Culture Documents
Sergi Pujades
• An image is a 2D signal
▪ Usually this image depicts a 3D scene
becomes
becomes
Image as pixel matrix
Diffuse
reflection
Specular
reflection
Shadow
Light source
• Characteristics
▪ Point light source or extended light source
▪ Spectrum : amplitude (photons) for each wavelength
Source : Wikimedia
Light source :
some spectrums
Two Honda Fits under low-pressure sodium lamps. Both appear black,
even though the car on the left is bright red, while the car on the right is actually black.
“Sodium-vapor lamp” Wikipedia article
Light sources
• Ray characterisation
▪ One direction
▪ Amount of energy + spectrum
Surface reflectance
Surface reflectance
( 𝑥 𝑦 )
^ , 𝑑^ , 𝑛^
𝑑
𝑓𝑟(𝜃𝑖, 𝜙𝑖, 𝜃𝑟, 𝜙𝑟, 𝜆)
BRDF - reciprocity
( 𝑥 𝑦 )
^ , 𝑑^ , 𝑛^
𝑑
BRDF - isotropy
( 𝑥 𝑦 )
^ , 𝑑^ , 𝑛^
𝑑
BRDF - isotropy
Foreshortening
BRDF - energy
𝑓𝑑(𝑣^𝑖, 𝑣^𝑟, 𝑛, )
^ 𝜆 = 𝑓𝑑(𝜆)
BRDF classic 2 : specular
) {
^𝑟 = 𝑠^𝑖
𝑓𝑟(𝑣^𝑖, 𝑣^𝑟, 𝑛,
^ 𝜆 = 1 if 𝑣
0 else
BRDF classique 2 : specular
▪ Torrence-Sparrow
• Visual perception
Source : Wikimedia
Image acquisition
• Rayleigh
▪ Ideal diameter d
▪ Focal distance f
▪ Wavelength 𝜆
𝑑 = 1.9 𝑓𝜆
Source : Leica
Optical system
Source : diglloyd.com
Optical system
1 1 1
+ =
𝑧𝑜 𝑧𝑖 𝑓
Descartes relationship
Optical system
Source : wikimedia
Optical system: classic challenges
Szeliski
• Vignetting chap. 2.2
▪ energy = fonction of the ray length
4(𝑓)
2
𝜋 𝑑
𝐸=𝐿 𝑐𝑜𝑠4𝛼
Optical system: classic challenges
• Geometric Distorsion
Barrel
Pincushion
• Analog
▪ Television (Baird, Farnsworth, Zworykin, 1920s)
• Digital
▪ CCD (1970s)
▪ CMOS (1980s)
Point de vue du Gras, Saint-Loup de Varenne, 1826
• Array of photo-sites
• Electric charge is proportional to the number of received photons
• Received charge is transferred towards a bus
• CMOS : circuit with amplification and obturation per photo-site: “more
intelligent sensor”
Source : gatan.com
CCD / CMOS
Source : Sony
Rolling shutter
• Rods:
▪ Achromatic perception of lights
▪ Peripheral retina
▪ Pigmentation: rhodopsin, sensitive to all visible spectrum (pic on green)
• Cones
▪ Chromatic vision
▪ Located on the fovea
▪ 3 types de cônes/pigmentation
• Cyanolabe (pic 445nm)
• Chlorolabe (pic 535nm)
• Erytholabe (pic 570nm)
Color perception: the mantis shrimp
(most complex visual system ever discovered)
• 16 types of cones :
▪ 12 for the color (6 in UV range)
▪ 4 for the polarisation (among circular)
• Trinocular eye: depth perception
Source : wikimedia
Color specification
• This is the base for all “standard” color spaces: RGB, YUV...
Color specification
• Chromatic coordinates
▪ Coordinates without intensity
▪ Only chromatic component
𝑋
𝑥 = 𝑋+𝑌+𝑍
𝑌
𝑦 = 𝑋+𝑌+𝑍
𝑍
𝑧 = 𝑋+𝑌+𝑍
Color perception in a camera
Source : wikimedia
Color perception in a camera
• Bayer filter
▪ Individual filter for each pixel (RGGB, RGCB)
▪ Photo- sites not co-localized
▪ Color in each pixel: interpolation (demosaicing)
Source : wikimedia
Color perception in a camera
𝑅 = ∫ 𝐿(𝜆)𝑆𝑅(𝜆)𝑑𝜆
𝐺 = ∫ 𝐿(𝜆)𝑆𝐺(𝜆)𝑑𝜆
𝐵 = ∫ 𝐿(𝜆)𝑆𝐵(𝜆)𝑑𝜆
• Noise
▪ Salt and pepper
▪ Thermic noise: Gauss, Poisson
▪ Amplified by ISO gain
• Aliasing
Pipeline in a digital camera
Gamma transformation
▪ Gamma correction allows to have more bits in the dark areas and
less in the bright areas
Gamma transformation
By X-romix 10:00, 7 June 2008 (UTC), Updated by --Rubybrian (talk) 14:25, 14 September 2010 (UTC);
Photographer: Toni Frissell - This file was derived from: Weeki Wachee spring 10079u.jpg, CC BY-SA 4.0, https://
commons.wikimedia.org/w/index.php?curid=4176109
JPEG compression
Cyan
(0,255,255)
White
Magenta (255,255,255)
Blue (255,0,255)
(0,0,255)
Yellow
Green (255,255,0)
Black (0,255,0)
(0,0,0)
Red
(255,0,0)
Color models: RGB
• Additive model
▪ Mixing wavelengths
▪ Designed for graphical screens
Source : wikimedia
Color models: CMY
Cyan
White
(0,0,0)
Magenta
Blue
Yellow
Green
Black
Red
Color models: CMY
• Subtractive model
▪ Mixing of pigments
▪ Used in printers (CMYK)
• Why K (key) ?
▪ Opacity of black
Source : wikimedia
Color models: YUV / YIQ
Source : wikimedia
Application:
histogram based object detection
• Histogram h(R,G,B)
▪ Number of occurrences of a R,G,B triplet
▪ example : 32 x 32 x 32 = 32k cells
Object color
1
• P(R,G,B | objet) ~ N h(R, G, B)
pixels
hobject(U, V)
• P(object | U, V ) = himage(U, V)
Application: robotic detection
• Exercise
▪ Suggest a protocol and algorithm to detect the ball
• Segmentation HSV
balle
sol
Hue
robot bleu
blanc ...
Saturation
Application: robotic detection
• Segmentation YUV
sol
V
robot bleu
balle
blanc ...