Skip to Content
CSE559AComputer Vision (Lecture 6)

CSE559A Lecture 6

Continue on Light, eye/camera, and color

BRDF (Bidirectional Reflectance Distribution Function)

ρ(θi,ϕi,θo,ϕo)\rho(\theta_i,\phi_i,\theta_o,\phi_o)

Diffuse Reflection

  • Dull, matte surface like chalk or latex paint

  • Most often used in computer vision

  • Brightness does depend on direction of illumination

Diffuse reflection governed by Lambert’s law: Id=kdNLIiI_d = k_d N\cdot L I_i

  • NN: surface normal
  • LL: light direction
  • IiI_i: incident light intensity
  • kdk_d: albedo
ρ(θi,ϕi,θo,ϕo)=kdcosθi\rho(\theta_i,\phi_i,\theta_o,\phi_o)=k_d \cos\theta_i

Photometric Stereo

Suppose there are three light sources, L1,L2,L3L_1, L_2, L_3, and we have the following measurements:

I1=kdNL1I_1 = k_d N\cdot L_1 I2=kdNL2I_2 = k_d N\cdot L_2 I3=kdNL3I_3 = k_d N\cdot L_3

We can solve for NN by taking the dot product of NN and each light direction and then solving the system of equations.

Will not do this in the lecture.

Specular Reflection

  • Mirror-like surface
Ie={Iiif V=R0if VRI_e=\begin{cases} I_i & \text{if } V=R \\ 0 & \text{if } V\neq R \end{cases}
  • VV: view direction
  • RR: reflection direction
  • θi\theta_i: angle between the incident light and the surface normal

Near-perfect mirror have a high light around RR.

common model:

Ie=ks(VR)nsIiI_e=k_s (V\cdot R)^{n_s}I_i
  • ksk_s: specular reflection coefficient
  • nsn_s: shininess (imperfection of the surface)
  • IiI_i: incident light intensity

Phong illumination model

  • Phong approximation of surface reflectance
    • Assume reflectance is modeled by three compoents
      • Diffuse reflection
      • Specular reflection
      • Ambient reflection
Ie=kaIa+Ii[kd(NL)+ks(VR)ns]I_e=k_a I_a + I_i \left[k_d (N\cdot L) + k_s (V\cdot R)^{n_s}\right]
  • kak_a: ambient reflection coefficient
  • IaI_a: ambient light intensity
  • kdk_d: diffuse reflection coefficient
  • ksk_s: specular reflection coefficient
  • nsn_s: shininess
  • IiI_i: incident light intensity

Many other models.

Measuring BRDF

Use Gonioreflectometer.

  • Device for measuring the reflectance of a surface as a function of the incident and reflected angles.
  • Can be used to measure the BRDF of a surface.

BRDF dataset:

  • MERL dataset
  • CURET dataset

Camera/Eye

DSLR Camera

  • Pinhole camera model
  • Lens
  • Aperture (the pinhole)
  • Sensor

Digital Camera block diagram

Digital Camera block diagram

Scanning protocols:

  • Global shutter: all pixels are exposed at the same time
  • Interlaced: odd and even lines are exposed at different times
  • Rolling shutter: each line is exposed as it is read out

Eye

  • Pupil
  • Iris
  • Retina
  • Rods and cones

Eye Movements

  • Saccade
    • Can be consciously controlled. Related to perceptual attention.
    • 200ms to initiation, 20 to 200ms to carry out. Large amplitude.
  • Smooth pursuit
    • Tracking an object
    • Difficult w/o an object to track!
  • Microsaccade and Ocular microtremor (OMT)
    • Involuntary. Smaller amplitude. Especially evident during prolonged fixation.

Contrast Sensitivity

  • Uniform contrast image content, with increasing frequency
  • Why not uniform across the top?
  • Low frequencies: harder to see because of slower intensity changes
  • Higher frequencies: harder to see because of ability of our visual system to resolve fine features

Color Perception

Visible light spectrum: 380 to 780 nm

  • 400 to 500 nm: blue
  • 500 to 600 nm: green
  • 600 to 700 nm: red

HSV model

We use Gaussian functions to model the sensitivity of the human eye to different wavelengths.

  • Hue: color (the wavelength of the highest peak of the sensitivity curve)
  • Saturation: color purity (the variance of the sensitivity curve)
  • Value: color brightness (the highest peak of the sensitivity curve)

Color Sensing in Camera (RGB)

  • 3-chip vs. 1-chip: quality vs. cost

Bayer filter:

  • Why more green?
    • Human eye is more sensitive to green light.

Color spaces

Images in python:

As matrix.

import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from skimage import io def plot_rgb_3d(image_path): image = io.imread(image_path) r, g, b = image[:,:,0], image[:,:,1], image[:,:,2] fig = plt.figure() ax = fig.add_subplot(111, projection='3d') ax.scatter(r.flatten(), g.flatten(), b.flatten(), c=image.reshape(-1, 3)/255.0, marker='.') ax.set_xlabel('Red') ax.set_ylabel('Green') ax.set_zlabel('Blue') plt.show() plot_rgb_3d('image.jpg')

Other color spaces:

  • YCbCr (fast to compute, usually used in TV)
  • HSV
  • L*a*b* (CIELAB, perceptually uniform color space)

Most information is in the intensity channel.

Last updated on