-------------------------------------------------------------------------------

		 CS 448 - Light and photography, April 4, 2002

-------------------------------------------------------------------------------

Metagoals for this lecture:
	o Consider abstract representations of light
	o Show natural ties to physics, mathematics, art, photography
	o Compare traditional photographic techniques to computer techniques
	o Show examples of great photographs

-------------------------------------------------------------------------------

			 *** What is a photograph? ***

Plenoptic function:
	o L(x,y,z,theta,phi,lambda,t)

Pinhole camera:
	o fixed x, y, and z
	o subset of theta and phi
	o planar projection

Camera with lens & film:
	o lens & aperture integrates locally over x and y
	o film grain sets resolution in theta and phi
	o shutter extracts an interval in t
	o colored filters extract three overlapping integrals over lambda

-------------------------------------------------------------------------------

		       *** Radiometry and photometry ***

Point light sources:
	o Kepler (1571-1630) - attenuation of point source is 1/d^2
		o light does not weaken with distance; it merely spreads out
		o twice the distance -> twice the height -> four times the area
		o total illumination on surface of a growing sphere is constant
		o area of sphere grows as radius squared (area = 4 pi r^2)

			-> Demonstration using photometer and desk lamp
			   (incident mode, with dome)

	o units of luminous intensity of a point source
		o candelas = lumens / sr (Cohen, p.27)
		o lumen (power) = talbot (energy) / sec  (optional)
		o originally defined by the intensity of Bouguer's candles

		o 1 sr = solid angle s.t. area subtended on sphere = radius^2
		o area of sphere = 4 pi r^2, so 1 sr = r^2 / (4 pi r^2) = ~1/12

		o radiometry versus photometry, luminous efficiency curve
		o radiant intensity is in watts / sr
		o watt (power) = joule (energy) / sec

Area light sources:
	o attenuation of an area light source

		-> Demonstration using photometer and white wall
		   (spot mode, through viewfinder)

		o as distance increases:
			o light from each point on wall drops as d^2,
			o but area seen increases as d^2,
			o so illuminance stays the same!

	o units of luminance of an area source
		o nits = candelas / m^2 = lumens / m^2 sr (projected)
		o projected area = area x cos theta
		o Examples:  (Minneart, p. 102)
			o disk of sun:  100,000 cd / cm^2
			o white surface illuminated by sun:  2 cd / cm^2
				(sun:surface = 50,000:1)
			o black surface illuminated by sun:  0.04 cd / cm^2
				(white:black = 50:1)
			o disk of moon: 0.3 cd / cm^2
				(sun:moon = 300,000:1)
				(moon's reflectivity is gray)
			o white surface illuminated by moon, black,...
			o cloud = 10 x blue sky

Illumination of surfaces:
	o Pierre Bouguer (1760) - illumination falls off as cos(theta)

	o units of illuminance on a surface
		o lux = lumens / m^2  (energy / sec / unit area)
		o British unit is footcandle = 1 candela at 1 foot
		o Example:  (Minneart, p. 100)
			o from bright star = 1 candle at 900m = 1/810,000 lux
			o luminance of disk of sun = 300,000 x of blue sky,
			  but sun takes up only a small fraction of the sky,
			  so illumination of a landscape on a sunny day =
			  80% from sun, 20% from blue sky

	o falloff of illumination by point source on nearby surface
		o of interest to lighting engineers (and photographers)
		o as distance increases:
			o light drops as cos(theta),
			o distance increases as cos(theta),
			o light drops as distance^2,
			o so light drops as cos^3(theta)
			o will also be relevant when we discuss sensing

-------------------------------------------------------------------------------

	      *** The plenoptic function and the light field ***

The plenoptic function:
	o radiance (or luminance) at a point (in space) in a given direction
		o parameterized by x,y,z,theta,phi, so 5D domain
		o same definition as an area source
		o watts (or lumens) / m^2 sr (projected)

	o irradiance (or illuminance) at a point in space
		o scalar or vector field over 3D domain
		o scalar field = amount of light impinging on each point
		o vector field = scalar value + resultant vector direction

	o no way to measure the 5D plenoptic function everywhere in a scene

Light fields:
	o radiance along an oriented line in free space
		o can be parameterized by:
			o intersections with 2 planes in arbitrary
			  position (one of which may be at infinity) [Levoy96]
			o intersections with 2 points on a sphere [Camahort98]
			o by a direction and a point on a plane [Camahort98],
			  parametric surface [Miller98], or mesh [Wood00]
			o Plucker coordinates [Stolfi91] (a quadric surf in 6D)
			o etc.

	o easy to measure, at least for the following canonical cases:
		o inward-looking: outside the convex hull of an object
		o outward-looking: inside a convex volume embedded in a scene

-------------------------------------------------------------------------------

			 *** Photographic lighting ***

Photographic lighting:
	o size (point versus area) and directionality
		-> taxonomy using light field position & direction into 0D-4D,
		   Langer and Zucker, What is a Light Source",
		   Proc. CVPR '97, p. 172, and illustrations

	o number and placement - lighting design is an art
		o key, fill, accent/rim, etc.
			-> portrait, London, p. 256

	o special problems
		o complex scenes, like architectural interiors
			-> parlor, Kodak, p. 96
		o lighting reflective objects
			-> trumpet, London, p. 259
		o long exposures using available light
			-> Big Ben, Frost, p. 73 (10-30 seconds)
		o using flash to turn day into night, by overwhelming the bkg
			-> old man in field, Hedgecoe, p. 101
		o using flash to turn night into day, i.e. painting with light
			-> railroad car, Frost, p. 178

	o brightness:
		o relative to human range
		o relative among lights, e.g. key:fill
			-> bust, London, p. 253

	o color - spectral variation
		-> Maxfield Parrish's yellow key and blue fill, slipcover
		-> the golden time, woman working on farm, Peterson, p. 127

Computational relighting:
	o light obeys superposition and scaling, hence linearity,
	  including reflections, shadows, interreflections, etc.
	o weighted sum of images captured under different lighting
		-> Debevec, Siggraph 2000, figs 2, 3, 6, pp. 147-150

	o difference of images to isolate components
		o without - with polarization to isolate specular reflections
			-> Debevec, Siggraph 2000, fig. 9, p. 151
			o use to improve flash photography?
		o with - without spotlight to eliminate ambient illumination
			-> stmatthew-ambient-elimination.jpg
		o with - without flash to isolate red-eye
			-> Georg Petschnigg's experiment

	o if diffuse, then two lightings -> photometric stereo algorithm ->
	  normal per pixel -> shape-from-shading algorithm -> depth per pixel

-------------------------------------------------------------------------------

			     *** Sources cited ***

Light and physics:

	Minnaert, M.G.J.,
	Light and Color in the Outdoors,
	translated and revised by L. Seymour,
	Springer-Verlag, 1993.

Photographic technique:

	Ansel Adams
	The Camera,
	Little, Brown, and Co., 1976.

	Barbara London and John Upton,
	Photography, fifth edition,
	HarperCollins, 1994.

	John Hedgecoe,
	The Photographer's Handbook, third edition,
	Alfred A. Knopf, 1993.

	Lee Frost,
	The Complete Guide to Night and Low-Light Photography,
	Watson-Guptill, 1999.

	Bryan Peterson,
	Learning to See Creatively,
	Watson-Guptill, 1988.

	Professional Photographic Illustration,
	Antonio LoSapio, ed., Kodak, 1994.

Plenoptic functions and light fields:

	Adelson, E.H., Bergen, J.R.,
	The Plenoptic Function and the Elements of Early Vision,
	In Computation Models of Visual Processing,
	M. Landy and J.A. Movshon, eds., MIT Press, Cambridge, 1991.

	* Langer, M.S., Zucker, S.W.,
	What is a light source?
	Proc. CVPR '97.

	* Debevec, P., Hawkins, T., Tchou, C., Duiker, H.-P.,
	Sarokin, W., Sagar, M.,
	Acquiring the Reflectance Field of a Human Face,
	Proc. Siggraph 2000.

* handed out in class

-------------------------------------------------------------------------------