CS计算机代考程序代写 [06-30213][06-30241][06-25024]

[06-30213][06-30241][06-25024]
Computer Vision and Imaging &
Robot Vision
Dr Hyung Jin Chang Dr Yixing Gao
h.j.chang@bham.ac.uk y.gao.8@bham.ac.uk
School of Computer Science

Photometric Image Formation
Hyung Jin Chang, Yixing Gao
08/02/2021

• Some slides are from
Hyung Jin Chang, Yixing Gao
08/02/2021

Photometric Image Formation
• Images are not composed of 2D features.
• Instead, they are made up of discrete color or intensity values.
• How do they relate to the lighting in the environment, surface
properties and geometry, camera optics, and sensor properties (Figure 2.14 )?
Hyung Jin Chang, Yixing Gao
08/02/2021

Today is about calculating the color of objects
The incident light
• Position of light source
• Direction
• Colour
The object
• Reflectance
Viewer
• Position
Taku Komura
Computer Graphics

Radiometry-the science of measuring light
Basic ideas describing the behavior of light.
• Questions:
– what is “brightness”?
• measuring light
• interactions between light and surfaces
– how “bright” will surfaces be?
• Core idea – think about light arriving at a surface around any point is a hemisphere of directions
• Simplest problems can be dealt with by reasoning about this hemisphere
Computer Vision – A Modern Approach Set: Introduction to Vision
Slides by D.A. Forsyth
Hyung Jin Chang, Yixing Gao
08/02/2021

Light at surfaces
• Manyeffectswhenlight strikes a surface – could be:
– absorbed
– transmitted
• skin
– reflected
• mirror
– scattered
• Milk
• Diffusereflection(Lambertian,matte) • Specularreflection
• Assumethat
– surfaces don’t fluoresce
– surfaces don’t emit light (i.e. are cool)
– all the light leaving a point is due to that arriving at that point
Computer Vision – A Modern Approach Set: Introduction to Vision
Slides by D.A. Forsyth
Hyung Jin Chang, Yixing Gao
08/02/2021

Illumination
l Simple 3 parameter model

The sum of 3 illumination terms:
• Ambient : ‘background’ illumination
• Diffuse : non-shiny illumination and shadows • Specular : bright, shiny reflections
surface normal (specifies surface orientation)
Light source
(here point light source)
Object
‘Virtual’ camera
Taku Komura
Computer Graphics

– – – –
Ambient Lighting
Light from the environment
light reflected or scattered from other objects
simple approximation to complex ‘real-world’ process Result: globally uniform colour for object
— I = resulting intensity
— Ia = light intensity
— ka = reflectance
Uniform Light source
Example: sphere
NI
camera
Light Intensity = Ia reflectance = ka
Object
Taku Komura
Computer Graphics
I =kaIa

Lambertian surfaces and albedo
• Lambertian surfaces or ideal diffuse surfaces
– cotton cloth, carpets, matte paper, matte paints, etc.
• Forsuchsurfaces,radianceleavingthesurfaceis independent of angle
– scatters light uniformly in all directions
• Diffusereflectance,oralbedo
– selective absorption and re-emission of light inside the object’s material
Computer Vision – A Modern Approach Set: Introduction to Vision
Slides by D.A. Forsyth
Hyung Jin Chang, Yixing Gao
08/02/2021

Diffuse (Lambertian reflection)
Slide credit: Tom Thorne
Hyung Jin Chang, Yixing Gao
08/02/2021

Diffuse Lighting
• AlsoknownasLambertianreflection
– considerstheangleofincidenceoflightonsurface
(angle between light and surface normal)
– Result:lightingvariesoversurfacewithorientation
to light
Infinite point Ln light source
Example: sphere (lit from left)
qNI
Light Intensity = I p !
cosq =(N•-Ln)
kd : diffuse reflectivity
I=Ipkd cosq Taku Komura
Object
No dependence on camera angle!
Computer Graphics

Specular (or mirror-like) Lighting
• Directreflectionsoflightsourceoff shiny object
– specularintensityn=shinyreflectanceofobject – Result:specularhighlightonobject
Ln Infinite point
light source
N
qq Object
R (Reflection)
α
𝐼 = 𝐼!𝑘”𝑐𝑜𝑠#𝛼
I = output color
Rn = camera position
α : angle between Rn and R
No dependence on object colour.
Taku Komura
Computer Graphics
Light Intensity = Ip

Specular Light
Taku Komura
Computer Graphics


Combined Lighting Models
Summing it altogether : Phong Illumination Model
I =I k +I [k cosq+k cosna] laapds
Ambient (colour)
Specular (highlights)
Rc Computer Graphics
++
Diffuse (directional)
=
Taku Komura

When you implement it…
Use dot product of the vectors instead of calculating
the angles
N Ln
qq
Object
q,a lights
R
V N
R L
: Vector from the surface to the viewer : Normal vector at the colored point
: Reflection vector
I l = I a k a +
å p =1
I [ k ( N • L ) + k (V • R ) n ] pds
α
V
: Vector from the light source towards the colored point
Taku Komura
Computer Graphics

IR =IRkR + laa
å p=1
IR[kR(N•L)+kR(V•R)n] pds
IG =IGkG + laa
å p=1
IG[kG(N•L)+kG(V•R)n] pds
lights
lights
låights
p=1
• You do the above computation for Red,
Green and Blue color
• Finally color the pixel by the RGB color
Color
Taku Komura
Computer Graphics
IB =IBkB + laa
IB[kB(N•L)+kB(V•R)n] pds

Lambertian + specular
• Widespread model
– all surfaces are Lambertian plus specular component
• Advantages
– easy to manipulate
– very often quite close true
• Disadvantages
– some surfaces are not
• e.g. underside of CD’s, feathers of many birds, blue spots on many marine crustaceans and fish, most rough surfaces, oil films (skin!), wet surfaces
– Generally, very little advantage in modeling behavior of light at a surface in more detail – it is quite difficult to
understand behavior of L+S surfaces
Computer Vision – A Modern Approach Set: Introduction to Vision
Slides by D.A. Forsyth
Hyung Jin Chang, Yixing Gao
08/02/2021

Bidirectional Reflectance Distribution Function (BRDF)
l The reflectance of an object can be represented by a function of the incident and reflected angles
l This function is called the Bidirectional Reflectance Distribution Function (BRDF)
where E is the incoming irradiance and L is the reflected radiance
Taku Komura
Computer Graphics

What affects the BRDF?
l The way light reflecting over the surface
l The smoothness/roughness of the surface
– Single reflection: if smooth, specular – Multiple reflections: diffusive
l The shadowing effect
Taku Komura
Computer Graphics

Isotropic and Anisotropic BRDFs l Isotropic:
– Can model by diffuse + specular reflection
l Anisotripic
– –
Brushed metal
Cannot model by diffuse + specular reflection
Taku Komura
Computer Graphics

l Measure Data
l Use Analytical models
– Empirical models – Microfacet
How to get the BRDF?
Taku Komura Computer Graphics

Measuring the BRDF
l Measured using a device called Gonioreflectometer
– Casting light from various directions to the object, and capturing the light reflected back
Taku Komura
Computer Graphics

Problems with Measured BRDF
l Includes a lot of error
l Huge amount of time to capture
l The data size is enormous
– 18 hours acquisition time, 30GB raw data
-> Fitting the acquired data into analytical models
Taku Komura Computer Graphics

Analytical models l Empirical models
– Gouraud, Phong models or more complex models l Microfacet models
– –
Assuming the surface is composed of a large number of micro mirrors Each reflect light back to the specular direction
Taku Komura
Computer Graphics

Microfacet Theory
l [Torrance & Sparrow 1967]
– –
Surface modeled by tiny mirrors Value of BRDF at
— # of mirrors oriented halfway between and
where is the incoming direction, is the out going direction
— Modulated by Fresnel, shadowing/masking
Taku Komura
[Shirley 97] Computer Graphics

Examples : Satin
Taku Komura
Computer Graphics

Examples : velvet
Taku Komura
Computer Graphics

Summary
• Light at surfaces – Diffuse reflection – Specular reflection – Phong model
– BDRF (bi-directional reflectance function)
Hyung Jin Chang, Yixing Gao
08/02/2021