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

	CS 448 - Perspective, lighting, and photography, April 1, 2004

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

Metagoals for this lecture:
	o Consider the "raw materials" of photography:
		- perspective and lighting, or
		- geometry and radiometry
	o Look at some of the "problems of photography"
		- composing a shot, changing the perspective,
		- lighting a scene, difficult lighting situations
	o Compare traditional photographic techniques to computer techniques
	o Show examples of great photographs

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

		       *** Quick review of perspective ***

Common assumptions:
	1.  Light leaving an object travels in straight lines
	2.  These lines converge to a point (more or less) at the eye
		o both can be verified from simple observation
		o known by ancients

"Natural perspective":
	3a. More distant objects subtend smaller visual angles
		-> drawing from Euclid (3c BC), in Kemp, fig 31, p. 27

"Linear perspective":
	3b. A perspective image is formed by the intersection of these
	    lines with a "picture plane" (the surface of the painting)
		-> drawing from Piero (1474), Kemp, fig. 32, p. 28

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

		       *** Perspective drawing aids ***

Perspective drawing aids:

1525	Durer's compendium of devices

	-> Cole, p. 26-27 (or Kemp, p. 171-2)

		o artist's glass
		o draftsman's net (grid) -
		  allows drawing on paper instead of glass
		o Jacob de Keyser's gun-style eyepiece -
		  allows viewpoint to be far from glass
		o Durer's ruling pen -
		  combines advantages of two previous devices

Fully mechanical devices: ("perspectographs")

1631	Scheiner's pantograph
	o same, but can also enlarge or reduce
	-> Kemp, p. 181

Cameras (in the general sense, i.e. imaging devices):

medieval	camera obscura
1500s		introduction of a lens
1685		Zahn's portable Camera Obscura with built-in screen
			-> Kemp, p. 190

		o images the geometry, but also light, shadow, and color
		o used by Vermeer (1632-1675)?
			-> Gregory's The Artful Eye, pl. 20,21
			-> isometric of his room, p. 363

1806		Wollaston's Camera Lucida
			-> Kemp, p. 200
			o not half-silvered, so had to alternate
			  between real world and paper
			o hard to equalize brightness and focus
			  between real world and paper

1811		Varley's Graphic Telescope
			-> Kemp, p. 202
			o real world superimposed on paper
			o solves focus problem, I'm not sure about brightness

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

		      *** Perspective in photography ***

Viewpoint versus field of view:
	o definition parts #1 and #2 say nothing about the lens;
	  for a given viewpoint, all lenses observe the same lines of sight;
	  lenses only narrow the field of view; we'll come back to #3 shortly
	o zooming versus dollying
		-> Monterey plaza and fountain, Ansel Adams, p. 103
	o extreme wide-angle versus extreme telephoto
		-> compression in telephoto shots, postcard of MemChu and hills
		-> fields of grain, Peterson, p. 16, or
		-> workers on Golden Gate Bridge, Peterson, p. 57

Perspective, lenses, and apertures:
	o a lens actually performs a 3D perspective transform, not just 2D
	o Where is the center-of-projection in a lens?
		- for a thin lens: at the optical center
		- for a thick lens: at the first principle point,
		  equal to the first nodal point for a lens in air
			-> Hecht, p. 212
	o aperture stop
		- ideally, placed on first principle plane
		- in practice, placed immediately in front or behind lens,
		  or somewhere in the middle for a complicated lens system
			-> Hecht, p. 201
	o telecentric stops 
		- located at front (object) or back (image) focal point
		- object: no change in magnification with changes in focus
		- image: orthographic view of the world
			-> Kingslake, Optical System Design, p. 88

The view camera:
	o rotating the back parallel to a scene plane ("swing back")
		= eliminates a vanishing point
		= oblique projection
			-> Adams, p. 144
			-> London, p. 294
		o we can replace this with a perspective warp after-the-fact

	o sliding the back parallel to the front ("rising front")
		= off-axis projection
			-> Adams, p. 143
		o we can replace this with a larger field of view,
		  but we sacriface sensor resolution

	o tilting the lens relative to the back rotates the plane of focus
		o Scheimpflug condition: back, lens, and focus planes intersect
			-> Adams, fig. 10-10, p. 153
		o e.g. to keep ground plane in focus
			-> Adams, p. 152 and fig. 10-9, p. 153
		o or a page of text
			-> London, p. 293
		o we *can't* replace this adjustment with post-processing!

	o tilting the lens or sliding the back also causes vignetting,
	  because light falling on the sensor drops off away from its center
		- apparent area of aperture drops as cos(theta),
		- illumination on an oblique surface drops as cos(theta),
		- distance to that surface increases as cos(theta) and
		- light drops as distance^2,
		- so light drops as cos^4(theta)

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

	      *** 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. 246
			-> dynamic range of film, prints

	o special problems
		o complex scenes, like architectural interiors
			-> parlor, Kodak, p. 96
		o lighting reflective objects
			-> trumpet, London, p. 249
		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. 235, and face on p. 234

	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
		-> Ramesh Raskar's multi-flash work (Sig04)

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

			     *** Sources cited ***

Perspective:

	Martin Kemp,
	The Science of Art,
	Yale University Press, 1990.

	Allison Cole,
	Perspective,
	Dorling Kindersley, 1992.

Optics for photography:

	* Ansel Adams
	The Camera,
	Little, Brown, and Co., 1976.
	(chapter on view-camera adjustments handed out in class)

	Eugene Hecht,
	Optics, second edition,
	Addison-Wesley, 1987.

	Rudolph Kingslake,
	Optics in Photography,
	SPIE Press, 1992.

	Rudolph Kingslake,
	Optical System Design,
	Academic Press, 1983.

Photographic technique:

	Barbara London and John Upton,
	Photography, sixth edition,
	HarperCollins, 1997.

	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

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