伊利诺伊州立大学计算机视觉PPT第2章-LightandShading-VisionFall
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
������ = albedo ������ = directional source ������ = surface normal I = reflected intensity
������ ������ = ������ ������ ������ ⋅ ������(������)
Slide: Forsyth
surface normal
( i ,i , e ,e ; )
Le ( e , e ) Le ( e , e ) E i ( i , i ) Li ( i , i ) cos i d
Slide credit: S. Savarese
Application: photometric stereo
01/19/12
Light and Shading
“Empire of Light”, Magritte
Computer Vision Derek Hoiem, University of Illinois
Administrative stuff
• Some people waiting to get in • Tentative office hours
������ ������ = ������ ������ ������ ������
And the albedo (shown here) is given by: (the normal is a unit vector)
������ ������ =
������ ������ ⋅ ������ ������
Today’s class: Light and Shading
• What determines a pixel’s intensity? • What can we infer about the scene from pixel intensities?
How does a pixel get its value?
specular reflection Θ Θ
Other possible effects
transparency
light source refraction
light source
light source fluorescence phosphorescence
light source t=1
• Diffuse: light scatters in all directions
– E.g., brick, cloth, rough wood
diffuse reflection incoming light
Lambertian reflectance model
• Some light is absorbed (function of albedo ������) • Remaining light is scattered (diffuse reflection) • Examples: soft cloth, concrete, matte paints
Slide by Steve Seitz
Sensor Array
CMOS sensor
Each sensor cell records amount of light coming in at a small range of orientations
The raster image (pixel matrix)
Dynamic range and camera response
• Typical scenes have a huge dynamic range
• Camera response is roughly linear in the mid range (15 to 240) but non-linear at the extremes
light source light source
diffuse reflection absorption ������
(1 − ������)
Diffuse reflection: Lambert’s cosine law
Intensity does not depend on viewer angle.
• Assume:
– a set of point sources that are infinitely distant – a set of pictures of an object, obtained in exactly the same camera/object configuration but using different sources – A Lambertian object (or the specular component has been identified and removed)
– Derek: Wed 4pm, 8pm (skype only) – Ruiqi: Mon 7pm, Thurs 4pm
• Homework 1 released soon
• Any questions?
How light is recorded
Digital camera
A digital camera replaces film with a sensor array
The raster image (pixel matrix)
0.92 0.95 0.89 0.96 0.71 0.49 0.86 0.96 0.69 0.79 0.91 0.93 0.89 0.72 0.95 0.81 0.62 0.84 0.67 0.49 0.73 0.94 0.94 0.82 0.51 0.88 0.81 0.60 0.74 0.54 0.56 0.90 0.89 0.97 0.89 0.55 0.94 0.87 0.58 0.58 0.85 0.66 0.67 0.49 0.62 0.56 0.51 0.56 0.57 0.50 0.51 0.48 0.43 0.33 0.41 0.37 0.31 0.42 0.46 0.37 0.60 0.39 0.37 0.42 0.61 0.78 0.85 0.75 0.57 0.91 0.80 0.58 0.73 0.88 0.77 0.69 0.78 0.97 0.92 0.41 0.87 0.88 0.50 0.92 0.90 0.73 0.79 0.77 0.93 0.81 0.49 0.90 0.89 0.61 0.91 0.94 0.71 0.73 0.89 0.92 0.95 0.91 0.97 0.79 0.45 0.49 0.82 0.90 0.93 0.99 0.99 0.91 0.92 0.95 0.85 0.33 0.74 0.93 0.99 0.97 0.93
Specular Reflection
• Reflected direction depends on light orientation and surface normal
– E.g., mirrors are fwk.baidu.comlly specular – Most surfaces can be modeled with a mixture of diffuse and specular components
Typically, specular component is small
Photo: northcountryhardwoodfloors.com
Intensity and Surface Orientation
Intensity depends on illumination angle because less light comes in at oblique angles.
Flickr, by suzysputnik
light source
specular reflection
Flickr, by piratejohnny
Θ
Θ
Most surfaces have both specular and diffuse components
• Specularity = spot where specular reflection dominates (typically reflects light source)
• Independent of viewing direction
diffuse reflection
– Some light is reflected specularly
• Light bounces off (like a mirror), depends on viewing direction
Light emitted Light reflected to camera
Sensor
Basic models of reflection
• Specular: light bounces off at the incident angle
– E.g., mirror
specular reflection Θ Θ incoming light
1
2
Recap
• When light hits a typical surface
– Some light is absorbed (1-������)
• More absorbed for low albedos
absorption
– Some light is reflected diffusely
– Amount of reflected light proportional to cos(������) – Visible solid angle also proportional to cos(������)
http://en.wikipedia.org/wiki/Lambert%27s_cosine_law
•
• •
Each cell in the array is light-sensitive diode that converts photons to electrons Two common types: Charge Coupled Device (CCD) and CMOS http://electronics.howstuffworks.com/digital-camera.htm
λ1
λ2
t>1
light source
subsurface scattering λ
BRDF: Bidirectional Reflectance Distribution Function
• Model of local reflection that tells how bright a surface appears when viewed from one direction when light falls on it from another
Photometric stereo slides by Forsyth
Each image is:
������������ ������ = ������������ ⋅ (������ ������ ������ ������ )
albedo times 3D normal
So if we have enough images with known sources, we can solve for ������ ������ = ������ ������ ������ ������
Light emitted
Fraction of light reflects into camera
Lens Sensor
How does a pixel get its value?
• Major factors
– Illumination strength and direction – Surface geometry – Surface material – Nearby surfaces – Camera gain/exposure