Light Field Rendering - Marc Levo y and Pat Hanrahan Computer Science Department
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
Proc. ACM SIGGRAPH ’96. (with corrections, July, 1996) Light Field Rendering Marc Levoy and Pat Hanrahan Computer Science Department Stanford University Abstract • The display algorithms for image-based rendering require A number of techniques have been proposed for flying modest computational resources and are thus suitable for real- through scenes by redisplaying previously rendered or digitized time implementation on workstations and personal computers. views. Techniques have also been proposed for interpolating • The cost of interactively viewing the scene is independent of between views by warping input images, using depth information scene complexity. or correspondences between multiple images. In this paper, we • The source of the pre-acquired images can be from a real or describe a simple and robust method for generating new views virtual environment, i.e. from digitized photographs or from from arbitrary camera positions without depth information or fea- rendered models. In fact, the two can be mixed together. ture matching, simply by combining and resampling the available The forerunner to these techniques is the use of environ- images. The key to this technique lies in interpreting the input ment maps to capture the incoming light in a texture map images as 2D slices of a 4D function - the light field. This func- [Blinn76, Greene86]. An environment map records the incident tion completely characterizes the flow of light through unob- light arriving from all directions at a point. The original use of structed space in a static scene with fixed illumination. environment maps was to efficiently approximate reflections of We describe a sampled representation for light fields that the environment on a surface. However, environment maps also allows for both efficient creation and display of inward and out- may be used to quickly display any outward looking view of the ward looking views. We have created light fields from large environment from a fixed location but at a variable orientation. arrays of both rendered and digitized images. The latter are This is the basis of the Apple QuickTimeVR system [Chen95]. In acquired using a video camera mounted on a computer-controlled this system environment maps are created at key locations in the gantry. Once a light field has been created, new views may be scene. The user is able to navigate discretely from location to constructed in real time by extracting slices in appropriate direc- location, and while at each location continuously change the view- tions. Since the success of the method depends on having a high ing direction. sample rate, we describe a compression system that is able to The major limitation of rendering systems based on envi- compress the light fields we have generated by more than a factor ronment maps is that the viewpoint is fixed. One way to relax this of 100:1 with very little loss of fidelity. We also address the issues fixed position constraint is to use view interpolation [Chen93, of antialiasing during creation, and resampling during slice extrac- Greene94, Fuchs94, McMillan95a, McMillan95b, Narayanan95]. tion. Most of these methods require a depth value for each pixel in the CR Categories: I.3.2 [Computer Graphics]: Picture/Image Gener- environment map, which is easily provided if the environment ation — Digitizing and scanning, Viewing algorithms; I.4.2 [Com- maps are synthetic images. Given the depth value it is possible to puter Graphics]: Compression — Approximate methods reproject points in the environment map from different vantage points to warp between multiple images. The key challenge in Additional keywords: image-based rendering, light field, holo- this warping approach is to "fill in the gaps" when previously graphic stereogram, vector quantization, epipolar analysis occluded areas become visible. Another approach to interpolating between acquired 1. Introduction images is to find corresponding points in the two [Laveau94, Traditionally the input to a 3D graphics system is a scene McMillan95b, Seitz95]. If the positions of the cameras are consisting of geometric primitives composed of different materials known, this is equivalent to finding the depth values of the corre- and a set of lights. Based on this input specification, the rendering sponding points. Automatically finding correspondences between system computes and outputs an image. Recently a new approach pairs of images is the classic problem of stereo vision, and unfor- to rendering has emerged: image-based rendering. Image-based tunately although many algorithms exist, these algorithms are rendering systems generate different views of an environment fairly fragile and may not always find the correct correspon- from a set of pre-acquired imagery. There are several advantages dences. to this approach: In this paper we propose a new technique that is robust and allows much more freedom in the range of possible views. The Address: Gates Computer Science Building 3B levoy@cs.stanford.edu major idea behind the technique is a representation of the light Stanford University hanrahan@cs.stanford.edu Stanford, CA 94305 http://www-graphics.stanford.edu field, the radiance as a function of position and direction, in regions of space free of occluders (free space). In free space, the light field is a 4D, not a 5D function. An image is a two dimen- sional slice of the 4D light field. Creating a light field from a set of images corresponds to inserting each 2D slice into the 4D light field representation. Similarly, generating new views corresponds to extracting and resampling a slice.
Generating a new image from a light field is quite different Although restricting the validity of the representation to than previous view interpolation approaches. First, the new image free space may seem like a limitation, there are two common situ- is generally formed from many different pieces of the original ations where this assumption is useful. First, most geometric input images, and need not look like any of them. Second, no models are bounded. In this case free space is the region outside model information, such as depth values or image correspon- the convex hull of the object, and hence all views of an object dences, is needed to extract the image values. Third, image gener- from outside its convex hull may be generated from a 4D light ation involves only resampling, a simple linear process. field. Second, if we are moving through an architectural model or This representation of the light field is similar to the epipo- an outdoor scene we are usually moving through a region of free lar volumes used in computer vision [Bolles87] and to horizontal- space; therefore, any view from inside this region, of objects out- parallax-only holographic stereograms [Benton83]. An epipolar side the region, may be generated. volume is formed from an array of images created by translating a The major issue in choosing a representation of the 4D camera in equal increments in a single direction. Such a represen- light field is how to parameterize the space of oriented lines. tation has recently been used to perform view interpolation There are several issues in choosing the parameterization: [Katayama95]. A holographic stereogram is formed by exposing Efficient calculation. The computation of the position of a line a piece of film to an array of images captured by a camera moving from its parameters should be fast. More importantly, for the sideways. Halle has discussed how to set the camera aperture to purposes of calculating new views, it should be easy to compute properly acquire images for holographic stereograms [Halle94], the line parameters given the viewing transformation and a and that theory is applicable to this work. Gavin Miller has also pixel location. recognized the potential synergy between true 3D display tech- nologies and computer graphics algorithms [Miller95]. Control over the set of lines. The space of all lines is infinite, but only a finite subset of line space is ever needed. For exam- There are several major challenges to using the light field ple, in the case of viewing an object we need only lines inter- approach to view 3D scenes on a graphics workstation. First, secting the convex hull of the object. Thus, there should be an there is the choice of parameterization and representation of the intuitive connection between the actual lines in 3-space and line light field. Related to this is the choice of sampling pattern for the parameters. field. Second, there is the issue of how to generate or acquire the light field. Third, there is the problem of fast generation of differ- Uniform sampling. Given equally spaced samples in line ent views. This requires that the slice representing rays through a parameter space, the pattern of lines in 3-space should also be point be easily extracted, and that the slice be properly resampled uniform. In this sense, a uniform sampling pattern is one where to avoid artifacts in the final image. Fourth, the obvious disadvan- the number of lines in intervals between samples is constant tage of this approach is the large amount of data that may be everywhere. Note that the correct measure for number of lines required. Intuitively one suspects that the light field is coherent is related to the form factor kernel [Sbert93]. and that it may be compressed greatly. In the remaining sections The solution we propose is to parameterize lines by their we discuss these issues and our proposed solutions. intersections with two planes in arbitrary position (see figure 1). By convention, the coordinate system on the first plane is (u, v) 2. Representation and on the second plane is (s, t). An oriented line is defined by We define the light field as the radiance at a point in a connecting a point on the uv plane to a point on the st plane. In given direction. Note that our definition is equivalent to the practice we restrict u, v, s, and t to lie between 0 and 1, and thus plenoptic function introduced by Adelson and Bergen [Adel- points on each plane are restricted to lie within a convex quadrilat- son91]. The phrase light field was coined by A. Gershun in his eral. We call this representation a light slab. Intuitively, a light classic paper describing the radiometric properties of light in a slab represents the beam of light entering one quadrilateral and space [Gershun36]. 1 McMillan and Bishop [McMillan95b] dis- exiting another quadrilateral. cuss the representation of 5D light fields as a set of panoramic A nice feature of this representation is that one of the images at different 3D locations. planes may be placed at infinity. This is convenient since then However, the 5D representation may be reduced to 4D in lines may be parameterized by a point and a direction. The latter free space (regions free of occluders). This is a consequence of will prove useful for constructing light fields either from ortho- the fact that the radiance does not change along a line unless graphic images or images with a fixed field of view. Furthermore, blocked. 4D light fields may be interpreted as functions on the if all calculations are performed using homogeneous coordinates, space of oriented lines. The redundancy of the 5D representation the two cases may be handled at no additional cost. is undesirable for two reasons: first, redundancy increases the size of the total dataset, and second, redundancy complicates the reconstruction of the radiance function from its samples. This reduction in dimension has been used to simplify the representa- tion of radiance emitted by luminaires [Levin71, Ashdown93]. v t For the remainder of this paper we will be only concerned with L(u,v,s,t) 4D light fields. 1 u s For those familiar with Gershun’s paper, he actually uses the term light field to mean the irradiance vector as a function of position. For this reason P. Moon in a lat- Figure 1: The light slab representation. er book [Moon81] uses the term photic field to denote what we call the light field. 2
y θ +π θ x r r −π Figure 2: Definition of the line space we use to visualize sets of light rays. Each oriented line in Cartesian space (at left) is represented in line space (at right) by a point. To simplify the visualizations, we show only lines in 2D; the extension to 3D is straightforward. Figure 4: Using line space to visualize sampling uniformity. (a) shows a light slab defined by two lines at right angles. (c) shows a light slab where one defining line is at infinity. This arrangement generates rays passing through the other defining line with an angle between -45° and +45°. (b) and (d) show the corresponding line space visualizations. Our use of (r, ) to parameterize line space has the property that equal areas in line space correspond to equally dense sampling of position and orientation in Carte- sian space; ideally the density of points in line space should be uniform. As these figures show, the singularity at the corner in (a) leads to a highly nonuniform and therefore inefficient sampling pattern, indicated by dark areas in (b) at angles of 0 and − /2. (c) generates a more uniform set of lines. Although (c) does not provide full coverage of , four rotated copies do. Such an arrangement is suitable for outward-looking views by an observer standing near the origin. It was used to generate the hallway light field in figure 14c. Figure 3: Using line space to visualize ray coverage. (a) shows a single light slab. Light rays (drawn in gray) connect points on two defining lines (drawn in red and green). (c) shows an arrangement of four rotated copies of (a). (b) and (d) show the corresponding line space visualizations. For Many properties of light fields are easier to understand in any set of lines in Cartesian space, the envelope formed by the correspond- line space (figures 2 through 4). In line space, each oriented line ing points in line space indicates our coverage of position and direction; is represented by a point and each set of lines by a region. In par- ideally the coverage should be complete in and as wide as possible in r. ticular, the set of lines represented by a light slab and the set of As these figures show, the single slab in (a) does not provide full coverage lines intersecting the convex hull of an object are both regions in in , but the four-slab arrangement in (c) does. (c) is, however, narrow in line space. All views of an object could be generated from one r. Such an arrangement is suitable for inward-looking views of a small light slab if its set of lines include all lines intersecting the convex object placed at the origin. It was used to generate the lion light field in hull of the object. Unfortunately, this is not possible. Therefore, figure 14d. it takes multiple light slabs to represent all possible views of an object. We therefore tile line space with a collection of light slabs, as shown in figure 3. An important issue related to the parameterization is the A big advantage of this representation is the efficiency of sampling pattern. Assuming that all views are equally likely to be geometric calculations. Mapping from (u, v) to points on the plane generated, then any line is equally likely to be needed. Thus all is a projective map and involves only linear algebra (multiplying regions of line space should have an equal density of samples. by a 3x3 matrix). More importantly, as will be discussed in sec- Figure 4 shows the density of samples in line space for different tion 5, the inverse mapping from an image pixel (x, y) to arrangements of slabs. Note that no slab arrangement is perfect: (u, v, s, t) is also a projective map. Methods using spherical or arrangements with a singularity such as two polygons joined at a cylindrical coordinates require substantially more computation. corner (4a) are bad and should be avoided, whereas slabs formed 3
from parallel planes (3a) generate fairly uniform patterns. In addi- tion, arrangements where one plane is at infinity (4c) are better than those with two finite planes (3a). Finally, because of symme- try the spacing of samples in uv should in general be the same as Field of view st. However, if the observer is likely to stand near the uv plane, then it may be acceptable to sample uv less frequently than st. Focal plane (st) 3. Creation of light fields In this section we discuss the creation of both virtual light fields (from rendered images) and real light fields (from digitized images). One method to create a light field would be to choose a Camera plane 4D sampling pattern, and for each line sample, find the radiance. (uv) This is easily done directly for virtual environments by a ray tracer. This could also be done in a real environment with a spot Figure 5: The viewing geometry used to create a light slab from an radiometer, but it would be very tedious. A more practical way to array of perspective images. generate light fields is to assemble a collection of images. location on the uv plane. The only issue is that the xy samples of 3.1. From rendered images each image must correspond exactly with the st samples. This is easily done by performing a sheared perspective projection (figure For a virtual environment, a light slab is easily generated 5) similar to that used to generate a stereo pair of images. Figure simply by rendering a 2D array of images. Each image represents 6 shows the resulting 4D light field, which can be visualized either a slice of the 4D light slab at a fixed uv value and is formed by as a uv array of st images or as an st array of uv images. placing the center of projection of the virtual camera at the sample Figure 6: Two visualizations of a light field. (a) Each image in the array represents the rays arriving at one point on the uv plane from all points on the st plane, as shown at left. (b) Each image represents the rays leaving one point on the st plane bound for all points on the uv plane. The images in (a) are off- axis (i.e. sheared) perspective views of the scene, while the images in (b) look like reflectance maps. The latter occurs because the object has been placed astride the focal plane, making sets of rays leaving points on the focal plane similar in character to sets of rays leaving points on the object. 4
Two other viewing geometries are useful. A light slab may be formed from a 2D array of orthographic views. This can be modeled by placing the uv plane at infinity, as shown in figure 4c. In this case, each uv sample corresponds to the direction of a par- Camera plane Focal plane allel projection. Again, the only issue is to align the xy and st (uv) (st) samples of the image with the st quadrilateral. The other useful geometry consists of a 2D array of outward looking (non-sheared) perspective views with fixed field of view. In this case, each Film plane Aperture image is a slice of the light slab with the st plane at infinity. The fact that all these cases are equally easy to handle with light slabs attests to the elegance of projective geometry. Light fields using each arrangement are presented in section 6 and illustrated in fig- ure 14. As with any sampling process, sampling a light field may lead to aliasing since typical light fields contain high frequencies. Fortunately, the effects of aliasing may be alleviated by filtering before sampling. In the case of a light field, a 4D filter in the Figure 8: Prefiltering using an aperture. This figure shows a cam- space of lines must be employed (see figure 7). Assuming a box era focused on the st plane with an aperture on the uv plane whose filter, a weighted average of the radiances on all lines connecting size is equal to the uv sample spacing. A hypothetical film plane is sample squares in the uv and st planes must be computed. If a drawn behind the aperture. Ignore the aperture for a moment (con- camera is placed on the uv plane and focussed on the st plane, sider a pinhole camera that precisely images the st plane onto the then the filtering process corresponds to integrating both over a film plane). Then integrating over a pixel on the film plane is pixel corresponding to an st sample, and an aperture equal in size equivalent to integrating over an st region bounded by the pixel. to a uv sample, as shown in figure 8. The theory behind this filter- Now consider fixing a point on the film plane while using a finite ing process has been discussed in the context of holographic stere- sized aperture (recall that all rays from a point on the film through ograms by Halle [Halle94]. the aperture are focussed on a single point on the focal plane). Then integrating over the aperture corresponds to integrating all Note that although prefiltering has the desired effect of rays through the uv region bounded by the aperture. Therefore, by antialiasing the light field, it has what at first seems like an unde- simultaneously integrating over both the pixel and the aperture, the sirable side effect — introducing blurriness due to depth of field. proper 4D integral is computed. However, this blurriness is precisely correct for the situation. Recall what happens when creating a pair of images from two adjacent camera locations on the uv plane: a given object point will project to different locations, potentially several pixels apart, The necessity for prefiltering can also be understood in line in these two images. The distance between the two projected space. Recall from our earlier discussion that samples of the light locations is called the stereo disparity. Extending this idea to mul- field correspond to points in line space. Having a finite depth of tiple camera locations produces a sequence of images in which the field with an aperture equal in size to the uv sample spacing object appears to jump by a distance equal to the disparity. This insures that each sample adequately covers the interval between jumping is aliasing. Recall now that taking an image with a finite these line space points. Too small or too large an aperture yields aperture causes points out of focus to be blurred on the film plane gaps or overlaps in line space coverage, resulting in views that are by a circle of confusion. Setting the diameter of the aperture to either aliased or excessively blurry, respectively. the spacing between camera locations causes the circle of confu- sion for each object point to be equal in size to its stereo disparity. This replaces the jumping with a sequence of blurred images. 3.2. From digitized images Thus, we are removing aliasing by employing finite depth of field. Digitizing the imagery required to build a light field of a physical scene is a formidable engineering problem. The number of images required is large (hundreds or thousands), so the process must be automated or at least computer-assisted. Moreover, the lighting must be controlled to insure a static light field, yet flexible enough to properly illuminate the scene, all the while staying clear of the camera to avoid unwanted shadows. Finally, real optical st systems impose constraints on angle of view, focal distance, depth of field, and aperture, all of which must be managed. Similar uv issues have been faced in the construction of devices for perform- ing near-field photometric measurements of luminaires [Ash- down93]. In the following paragraphs, we enumerate the major Pixel filter + Aperture filter = Ray filter design decisions we faced in this endeavor and the solutions we Figure 7: Prefiltering a light field. To avoid aliasing, a 4D low adopted. pass filter must be applied to the radiance function. Inward versus outward looking. The first decision to be made was between a flyaround of a small object and a flythrough of a large-scale scene. We judged flyarounds to be the simpler case, so we attacked them first. 5
rotating hub lights pitch yaw horizontal vertical object platform rotating tripod Figure 9: Our prototype camera gantry. A modified Cyberware Figure 10: Object and lighting support. Objects are mounted MS motion platform with additional stepping motors from Lin- on a Bogen fluid-head tripod, which we manually rotate to four Tech and Parker provide four degrees of freedom: horizontal orientations spaced 90 degrees apart. Illumination is provided and vertical translation, pan, and tilt. The camera is a Panasonic by two 600W Lowell Omni spotlights attached to a ceiling- WV-F300 3-CCD video camera with a Canon f/1.7 10-120mm mounted rotating hub that is aligned with the rotation axis of the zoom lens. We keep it locked off at its widest setting (10mm) tripod. A stationary 6’ x 6’ diffuser panel is hung between the and mounted so that the pitch and yaw axes pass through the spotlights and the gantry, and the entire apparatus is enclosed in center of projection. While digitizing, the camera is kept point- black velvet to eliminate stray light. ed at the center of the focal plane. Calibrations and alignments are verified with the aid of a Faro digitizing arm, which is accu- degrees. This can be achieved with a camera that translates but rate to 0.3 mm. does not pan or tilt by employing a wide-angle lens. This solu- tion has two disadvantages: (a) wide-angle lenses exhibit signif- Human versus computer-controlled. An inexpensive icant distortion, which must be corrected after acquisition, and approach to digitizing light fields is to move a handheld camera (b) this solution trades off angle of view against sensor resolu- through the scene, populating the field from the resulting tion. Another solution is to employ a view camera in which the images [Gortler96]. This approach necessitates estimating sensor and optical system translate in parallel planes, the former camera pose at each frame and interpolating the light field from moving faster than the latter. Horizontal parallax holographic scattered data - two challenging problems. To simplify the situ- stereograms are constructed using such a camera [Halle94]. ation, we chose instead to build a computer-controlled camera Incorporating this solution into a gantry that moves both hori- gantry and to digitize images on a regular grid. zontally and vertically is difficult. We instead chose to equip Spherical versus planar camera motion. For flyarounds of our camera with pan and tilt motors, enabling us to use a nar- small objects, an obvious gantry design consists of two concen- row-angle lens. The use of a rotating camera means that, in tric hemicycles, similar to a gyroscope mounting. The camera order to transfer the acquired image to the light slab representa- in such a gantry moves along a spherical surface, always point- tion, it must be reprojected to lie on a common plane. This ing at the center of the sphere. Apple Computer has con- reprojection is equivalent to keystone correction in architectural structed such a gantry to acquire imagery for Quick-Time VR photography. flyarounds [Chen95]. Unfortunately, the lighting in their sys- Standoff distance. A disadvantage of planar gantries is that the tem is attached to the moving camera, so it is unsuitable for distance from the camera to the object changes as the camera acquiring static light fields. In general, a spherical gantry has translates across the plane, making it difficult to keep the object three advantages over a planar gantry: (a) it is easier to cover in focus. The view camera described above does not suffer the entire range of viewing directions, (b) the sampling rate in from this problem, because the ratio of object distance to image direction space is more uniform, and (c) the distance between distance stays constant as the camera translates. For a rotating the camera and the object is fixed, providing sharper focus camera, servo-controlled focusing is an option, but changing the throughout the range of camera motion. A planar gantry has focus of a camera shifts its center of projection and changes the two advantages over a spherical gantry: (a) it is easier to build; image magnification, complicating acquisition. We instead mit- the entire structure can be assembled from linear motion stages, igate this problem by using strong lighting and a small aperture and (b) it is closer to our light slab representation. For our first to maximize depth of field. prototype gantry, we chose to build a planar gantry, as shown in figure 9. Sensor rotation. Each sample in a light slab should ideally rep- resent the integral over a pixel, and these pixels should lie on a Field of view. Our goal was to build a light field that allowed common focal plane. A view camera satisfies this constraint 360 degrees of azimuthal viewing. To accomplish this using a because its sensor translates in a plane. Our use of a rotating planar gantry meant acquiring four slabs each providing 90 camera means that the focal plane also rotates. Assuming that 6
we resample the images carefully during reprojection, the pres- Random access. Most compression techniques place some con- ence of a rotated focal plane will introduce no additional error straint on random access to data. For example, variable-bitrate into the light field. In practice, we have not seen artifacts due to coders may require scanlines, tiles, or frames to be decoded at this resampling process. once. Examples in this class are variable-bitrate vector quanti- Aperture size. Each sample in a light slab should also represent zation and the Huffman or arithmetic coders used in JPEG or the integral over an aperture equal in size to a uv sample. Our MPEG. Predictive coding schemes further complicate random- use of a small aperture produces a light field with little or no uv access because pixels depend on previously decoded pixels, antialiasing. Even fully open, the apertures of commercial scanlines, or frames. This poses a problem for light fields since video cameras are small. We can approximate the required the set of samples referenced when extracting an image from a antialiasing by averaging together some number of adjacent light field are dispersed in memory. As the observer moves, the views, thereby creating a synthetic aperture. However, this access patterns change in complex ways. We therefore seek a technique requires a very dense spacing of views, which in turn compression technique that supports low-cost random access to requires rapid acquisition. We do not currently do this. individual samples. Object support. In order to acquire a 360-degree light field in Asymmetry. Applications of compression can be classified as four 90-degree segments using a planar gantry, either the gantry symmetric or asymmetric depending on the relative time spent or the object must be rotated to each of four orientations spaced encoding versus decoding. We assume that light fields are 90 degrees apart. Given the massiveness of our gantry, the lat- assembled and compressed ahead of time, making this an asym- ter was clearly easier. For these experiments, we mounted our metric application. objects on a tripod, which we manually rotate to the four posi- Computational expense. We seek a compression scheme that tions as shown in figure 10. can be decoded without hardware assistance. Although soft- Lighting. Given our decision to rotate the object, satisfying the ware decoders have been demonstrated for standards like JPEG requirement for fixed illumination means that either the lighting and MPEG, these implementations consume the full power of a must exhibit fourfold symmetry or it must rotate with the modern microprocessor. In addition to decompression, the dis- object. We chose the latter solution, attaching a lighting system play algorithm has additional work to perform, as will be to a rotating hub as shown in figure 10. Designing a lighting described in section 5. We therefore seek a compression system that stays clear of the gantry, yet provides enough light scheme that can be decoded quickly. to evenly illuminate an object, is a challenging problem. The compression scheme we chose was a two-stage Using this gantry, our procedure for acquiring a light field pipeline consisting of fixed-rate vector quantization followed by is as follows. For each of the four orientations, the camera is entropy coding (Lempel-Ziv), as shown in figure 11. Following translated through a regular grid of camera positions. At each similar motivations, Beers et al. use vector quantization to com- position, the camera is panned and tilted to point at the center of press textures for use in rendering pipelines [Beers96]. the object, which lies along the axis of rotation of the tripod. We then acquire an image, and, using standard texture mapping algo- 4.1. Vector quantization rithms, reproject it to lie on a common plane as described earlier. The first stage of our compression pipeline is vector quanti- Table II gives a typical set of acquisition parameters. Note that zation (VQ) [Gersho92], a lossy compression technique wherein a the distance between camera positions (3.125 cm) exceeds the vector of samples is quantized to one of a number of predeter- diameter of the aperture (1.25 mm), underscoring the need for mined reproduction vectors. A reproduction vector is called a denser spacing and a synthetic aperture. codeword, and the set of codewords available to encode a source is called the codebook, Codebooks are constructed during a train- 4. Compression ing phase in which the quantizer is asked to find a set of code- Light field arrays are large — the largest example in this words that best approximates a set of sample vectors, called the paper is 1.6 GB. To make creation, transmission, and display of training set. The quality of a codeword is typically characterized light fields practical, they must be compressed. In choosing from among many available compression techniques, we were guided by several unique characteristics of light fields: codebook LZ (0.8 MB) Data redundancy. A good compression technique removes light field VQ bitstream redundancy from a signal without affecting its content. Light (3.4 MB) (402 MB) fields exhibit redundancy in all four dimensions. For example, the smooth regions in figure 6a tell us that this light field con- indices LZ tains redundancy in s and t, and the smooth regions in figure 6b (16.7 MB) tell us that the light field contains redundancy in u and v. The Figure 11 Two-stage compression pipeline. The light field is parti- former corresponds to our usual notion of interpixel coherence tioned into tiles, which are encoded using vector quantization to in a perspective view. The latter can be interpreted either as the form an array of codebook indices. The codebook and the array of interframe coherence one expects in a motion sequence or as indices are further compressed using Lempel-Ziv coding. Decom- the smoothness one expects in the bidirectional reflectance dis- pression also occurs in two stages: entropy decoding as the file is tribution function (BRDF) for a diffuse or moderately specular loaded into memory, and dequantization on demand during interac- surface. Occlusions introduce discontinuities in both cases, of tive viewing. Typical file sizes are shown beside each stage. course. 7
using mean-squared error (MSE), i.e. the sum over all samples in addressed. Each tile corresponds to one quantization vector and is the vector of the squared difference between the source sample thus represented in the index array by a single entry. Looking this and the codeword sample. Once a codebook has been constructed, index up in the codebook, we find a vector of sample values. A encoding consists of partitioning the source into vectors and find- second subscripting calculation is then performed, giving us the ing for each vector the closest approximating codeword from the offset of the requested sample within the vector. With the aid of codebook. Decoding consists of looking up indices in the code- precomputed subscripting tables, dequantization can be imple- book and outputting the codewords found there — a very fast mented very efficiently. In our tests, decompression consumes operation. Indeed, decoding speed is one of the primary advan- about 25% of the CPU cycles. tages of vector quantization. In our application, we typically use 2D or 4D tiles of the 5. Display light field, yielding 12-dimensional or 48-dimensional vectors, The final part of the system is a real time viewer that con- respectively. The former takes advantage of coherence in s and t structs and displays an image from the light slab given the imag- only, while the latter takes advantage of coherence in all four ing geometry. The viewer must resample a 2D slice of lines from dimensions. To maximize image quality, we train on a representa- the 4D light field; each line represents a ray through the eye point tive subset of each light field to be compressed, then transmit the and a pixel center as shown in figure 12. There are two steps to resulting codebook along with the codeword index array. Since this process: step 1 consists of computing the (u, v, s, t) line light fields are large, even after compression, the additional over- parameters for each image ray, and step 2 consists of resampling head of transmitting a codebook is small, typically less than 20%. the radiance at those line parameters. We train on a subset rather than the entire light field to reduce the As mentioned previously, a big advantage of the light slab expense of training. representation is the efficiency of the inverse calculation of the The output of vector quantization is a sequence of fixed- line parameters. Conceptually the (u, v) and (s, t) parameters may rate codebook indices. Each index is log N bits where N is the be calculated by determining the point of intersection of an image number of codewords in the codebook, so the compression rate of ray with each plane. Thus, any ray tracer could easily be adapted the quantizer is (kl) / (log N ) where k is the number of elements to use light slabs. However, a polygonal rendering system also per vector (i.e. the dimension), and l is the number of bits per ele- may be used to view a light slab. The transformation from image ment, usually 8. In our application, we typically use 16384-word coordinates (x, y) to both the (u, v) and the (s, t) coordinates is a codebooks, leading to a compression rate for this stage of the projective map. Therefore, computing the line coordinates can be pipeline of (48 x 8) / (log 16384) = 384 bits / 14 bits = 27:1. To done using texture mapping. The uv quadrilateral is drawn using simplify decoding, we represent each index using an integral num- the current viewing transformation, and during scan conversion ber of bytes, 2 in our case, which reduces our compression the (uw, vw, w) coordinates at the corners of the quadrilateral are slightly, to 24:1. interpolated. The resulting u = uw/w and v = vw/w coordinates at each pixel represent the ray intersection with the uv quadrilateral. 4.2. Entropy coding A similar procedure can be used to generate the (s, t) coordinates The second stage of our compression pipeline is an entropy by drawing the st quadrilateral. Thus, the inverse transformation coder designed to decrease the cost of representing high- from (x, y) to (u, v, s, t) reduces essentially to two texture coordi- probability code indices. Since our objects are typically rendered nate calculations per ray. This is cheap and can be done in real or photographed against a constant-color background, the array time, and is supported in many rendering systems, both hardware contains many tiles that occur with high probability. For the and software. examples in this paper, we employed gzip, an implementation of Only lines with (u, v) and (s, t) coordinates inside both Lempel-Ziv coding [Ziv77]. In this algorithm, the input stream is quadrilaterals are represented in the light slab. Thus, if the texture partitioned into nonoverlapping blocks while constructing a dic- coordinates for each plane are computed by drawing each quadri- tionary of blocks seen thus far. Applying gzip to our array of code laterial one after the other, then only those pixels that have both indices typically gives us an additional 5:1 compression. Huffman valid uv and st coordinates should be looked up in the light slab coding would probably yield slightly higher compression, but array. Alternatively, the two quadrilaterals may be simultaneously encoding and decoding would be more expensive. Our total com- scan converted in their region of overlap to cut down on unneces- pression is therefore 24 x 5 = 120:1. See section 6 and table III sary calculations; this is the technique that we use in our software for more detail on our compression results. implementation. 4.3. Decompression v t Decompression occurs in two stages. The first stage — gzip decoding — is performed as the file is loaded into memory. x y The output of this stage is a codebook and an array of code indices packed in 16-bit words. Although some efficiency has been lost by this decoding, the light field is still compressed 24:1, and it is now represented in a way that supports random access. u s The second stage — dequantization — proceeds as follows. As the observer moves through the scene, the display engine Figure 12: The process of resampling a light slab during requests samples of the light field. Each request consists of a display. (u, v, s, t) coordinate tuple. For each request, a subscripting calcu- lation is performed to determine which sample tile is being 8
antialiasing. The light field configuration was a single slab similar to that shown in figure 3a. Our second light field is a human abdomen constructed from volume renderings. The two tan-colored organs on either side of the spine are the kidneys. In this case, the input images were orthographic views, so we employed a slab with one plane at infinity as shown in figure 4c. Because an orthographic image contains rays of constant direction, we generated more input images than in the first example in order to provide the angular range needed for creating perspective views. The images include pixel antialiasing but no aperture antialiasing. However, the dense Figure 13: The effects of interpolation during slice extraction. (a) spacing of input images reduces aperture aliasing artifacts to a No interpolation. (b) Linear interpolation in uv only. (c) Quadra- minimum. linear interpolation in uvst. Our third example is an outward-looking light field depict- To draw an image of a collection of light slabs, we draw ing a hallway in Berkeley’s Soda Hall, rendered using a radiosity them sequentially. If the sets of lines in the collection of light program. To allow a full range of observer motion while optimiz- slabs do not overlap, then each pixel is drawn only once and so ing sampling uniformity, we used four slabs with one plane at this is quite efficient. To further increase efficiency, "back-facing" infinity, a four-slab version of figure 4c. The input images were light slabs may be culled. rendered on an SGI RealityEngine, using the accumulation buffer to provide both pixel and aperture antialiasing. The second step involves resampling the radiance. The ideal resampling process first reconstructs the function from the Our last example is a light field constructed from digitized original samples, and then applies a bandpass filter to the recon- images. The scene is of a toy lion, and the light field consists of structed function to remove high frequencies that may cause alias- four slabs as shown in figure 3c, allowing the observer to walk ing. In our system, we approximate the resampling process by completely around the object. The sensor and optical system pro- simply interpolating the 4D function from the nearest samples. vide pixel antialiasing, but the aperture diameter was too small to This is correct only if the new sampling rate is greater than the provide correct aperture antialiasing. As a result, the light field original sampling rate, which is usually the case when displaying exhibits some aliasing, which appears as double images. These light fields. However, if the image of the light field is very small, artifacts are worst near the head and tail of the lion because of then some form of prefiltering should be applied. This could eas- their greater distance from the axis around which the camera ily be done with a 4D variation of the standard mipmapping algo- rotated. rithm [Williams83]. Table I summarizes the statistics of each light field. Table Figure 13 shows the effect of nearest neighbor versus bilin- II gives additional information on the lion dataset. Table III gives ear interpolation on the uv plane versus quadrilinear interpolation the performance of our compression pipeline on two representa- of the full 4D function. Quadralinear interpolation coupled with tive datasets. The buddha was compressed using a 2D tiling of the the proper prefiltering generates images with few aliasing arti- facts. The improvement is particularly dramatic when the object Camera motion or camera is moving. However, quadralinear filtering is more translation per slab 100 cm x 50 cm expensive and can sometimes be avoided. For example, if the pan and tilt per slab 90° x 45° sampling rates in the uv and st planes are different, and then the number of slabs 4 slabs 90° apart benefits of filtering one plane may be greater than the other plane. total pan and tilt 360° x 45° Sampling density 6. Results distance to object 50 cm Figure 14 shows images extracted from four light fields. camera pan per sample 3.6° The first is a buddha constructed from rendered images. The camera translation per sample 3.125 cm model is an irregular polygon mesh constructed from range data. Aperture The input images were generated using RenderMan, which also focal distance of lens 10mm provided the machinery for computing pixel and aperture F-number f/8 aperture diameter 1.25 mm Acquisition time buddha kidney hallway lion time per image 3 seconds Number of slabs 1 1 4 4 total acquisition time 4 hours Images per slab 16x16 64x64 64x32 32x16 Total images 256 4096 8192 2048 Table II: Acquisition parameters for the lion light field. Distance Pixels per image 2562 1282 2562 2562 to object and camera pan per sample are given at the center of the Raw size (MB) 50 201 1608 402 plane of camera motion. Total acquisition time includes longer Prefiltering uvst st only uvst st only gantry movements at the end of each row and manual setup time for each of the four orientations. The aperture diameter is the focal Table I: Statistics of the light fields shown in figure 14. length divided by the F-number. 9
buddha lion Display times (ms) no bilerp uv lerp uvst lerp Vector quantization coordinate calculation 13 13 13 raw size (MB) 50.3 402.7 sample extraction 14 59 214 fraction in training set 5% 3% overhead 3 3 3 samples per tile 2x2x1x1 2x2x2x2 total 30 75 230 bytes per sample 3 3 vector dimension 12 48 Table IV: Display performance for the lion light field. Displayed number of codewords 8192 16384 images are 192 x 192 pixels. Sample extraction includes VQ de- codebook size (MB) 0.1 0.8 coding and sample interpolation. Display overhead includes read- bytes per codeword index 2 2 ing the mouse, computing the observer position, and copying the index array size (MB) 8.4 16.8 image to the frame buffer. Timings are for a software-only imple- total size (MB) 8.5 17.6 mentation on a 250 MHz MIPS 4400 processor. compression rate 6:1 23:1 Entropy coding gzipped codebook (MB) 0.1 0.6 gzipped index array (MB) 1.0 2.8 There are three major limitation of our method. First, the total size (MB) 1.1 3.4 sampling density must be high to avoid excessive blurriness. This compression due to gzip 8:1 5:1 requires rendering or acquiring a large number of images, which total compression 45:1 118:1 may take a long time and consume a lot of memory. However, Compression performance denser sample spacing leads to greater inter-sample coherence, so training time 15 mins 4 hrs the size of the light field is usually manageable after compression. encoding time 1 mins 8 mins Second, the observer is restricted to regions of space free of original entropy (bits/pixel) 4.2 2.9 occluders. This limitation can be addressed by stitching together image quality (PSNR) 36 27 multiple light fields based on a partition of the scene geometry into convex regions. If we augment light fields to include Z- Table III: Compression statistics for two light fields. The buddha depth, the regions need not even be convex. Third, the illumina- was compressed using 2D tiles of RGB pixels, forming 12-dimen- tion must be fixed. If we ignore interreflections, this limitation sional vectors, and the lion was compressed using 4D tiles (2D can be addressed by augmenting light fields to include surface tiles of RGB pixels from each of 2 x 2 adjacent camera positions), normals and optical properties. To handle interreflections, we forming 48-dimensional vectors. Bytes per codeword index in- might try representing illumination as a superposition of basis clude padding as described in section 4. Peak signal-to-noise ratio functions [Nimeroff94]. This would correspond in our case to (PSNR) is computed as 10 log10 (2552 /MSE). computing a sum of light fields each lit with a different illumina- tion function. It is useful to compare this approach with depth-based or correspondence-based view interpolation. In these systems, a 3D light field, yielding a total compression rate of 45:1. The lion was model is created to improve quality of the interpolation and hence compressed using a 4D tiling, yielding a higher compression rate decrease the number of pre-acquired images. In our approach, a of 118:1. During interactive viewing, the compressed buddha is much larger number of images is acquired, and at first this seems indistinguishable from the original; the compressed lion exhibits like a disadvantage. However, because of the 3D structure of the some artifacts, but only at high magnifications. Representative light field, simple compression schemes are able to find and images are shown in figure 15. We have also experimented with exploit this same 3D structure. In our case, simple 4D block cod- higher rates. As a general rule, the artifacts become objectionable ing leads to compression rates of over 100:1. Given the success of only above 200:1. the compression, a high density compressed light field has an Finally, table IV summarizes the performance of our inter- advantage over other approaches because the resampling process active viewer operating on the lion light field. As the table shows, is simpler, and no explicit 3D structure must be found or stored. we achieve interactive playback rates for reasonable image sizes. There are many representations for light used in computer Note that the size of the light field has no effect on playback rate; graphics and computer vision, for example, images, shadow and only the image size matters. Memory size is not an issue because environment maps, light sources, radiosity and radiance basis the compressed fields are small. functions, and ray tracing procedures. However, abstract light rep- resentations have not been systematically studied in the same way 7. Discussion and future work as modeling and display primitives. A fruitful line of future We have described a new light field representation, the research would be to reexamine these representations from first light slab, for storing all the radiance values in free space. Both principles. Such reexaminations may in turn lead to new methods inserting images into the field and extracting new views from the for the central problems in these fields. field involve resampling, a simple and robust procedure. The Another area of future research is the design of instrumen- resulting system is easily implemented on workstations and per- tation for acquisition. A large parallel array of cameras connected sonal computers, requiring modest amounts of memory and to a parallel computer could be built to acquire and compress a cycles. Thus, this technique is useful for many applications requir- light field in real time. In the short term, there are many interest- ing interaction with 3D scenes. ing engineering issues in designing and building gantries to move 10
a small number of cameras and lights to sequentially acquire both 161-167. inward- and outward-looking light fields. This same instrumenta- [Gersho92] Gersho, A., Gray, R.M., Vector Quantization and Signal Com- tion could lead to breakthroughs in both 3D shape acquisition and pression, Kluwer Academic Publishers, 1992. reflection measurements. In fact, the interaction of light with any [Gershun36] Gershun, A., ‘‘The Light Field,’’ Moscow, 1936. Translated object can be represented as a higher-dimensional interaction by P. Moon and G. Timoshenko in Journal of Mathematics and matrix; acquiring, compressing, and manipulating such represen- Physics, Vol. XVIII, MIT, 1939, pp. 51-151. tations are a fruitful area for investigation. [Gortler96] Gortler, S.J., Grzeszczuk, R., Szeliski, R., Cohen, M., ‘‘The Lumigraph.’’ In these proceedings. 8. Acknowledgements [Greene86] Greene, N., ‘‘Environment Mapping and Other Applications of World Projections,’’ IEEE Computer Graphics and Applications, We would like to thank David Addleman and George Vol. 6, No. 11, November, 1986, pp. 21-29. Dabrowski of Cyberware for helping us design and build the cam- [Greene94] Greene, N. and Kass, M., ‘‘Approximating Visibility with era gantry, Craig Kolb and James Davis for helping us calibrate it, Environment Maps,’’ Apple Technical Report No. 41, November, Brian Curless for scanning the buddha, Julie Dorsey for shading it 1994. and allowing us to use it, Carlo Sequin for the Soda Hall model, [Halle94] Halle, M., ‘‘Holographic Stereograms as Discrete Imaging Sys- Seth Teller, Celeste Fowler, and Thomas Funkhauser for its tems.’’ Practical Holography, Proc. SPIE, Vol. 2176, February, radiosity solution, Lucas Pereira for rendering it, Benjamin Zhu 1994. for reimplementing our hardware-accelerated viewer in software, [Katayama95] Katayama, A., Tanaka, K., Oshino, T., Tamura, H., ‘‘View- and Navin Chaddha for his vector quantization code. We also point-Dependent Stereoscopic Display Using Interpolation of Multi- wish to thank Eric Chen and Michael Chen for allowing us to viewpoint Images,’’ Stereoscopic Displays and Virtual Reality Sys- examine the Apple ObjectMaker, and Alain Fournier and Bob tems II, Proc. SPIE, Vol. 2409, S. Fisher, J. Merritt, B. Bolas eds. Lewis for showing us their wavelet light field work. Finally, we 1995, pp. 11-20. wish to thank Nina Amenta for sparking our interest in two-plane [Laveau94] Laveau, S., Faugeras, O.D., ‘‘3-D Scene Representation as a parameterizations of lines, Michael Cohen for reinforcing our Collection of Images and Fundamental Matrices,’’ INRIA Technical interest in image-based representations, and Gavin Miller for Report No. 2205, 1994. inspiring us with his grail of volumetric hyperreality. This work [Levin71] Levin, R., ‘‘Photometric Characteristics of Light Controlling was supported by the NSF under contracts CCR-9157767 and Apparatus,’’ Illuminating Engineering, Vol. 66, No. 4, 1971, pp. CCR-9508579. 205-215. [McMillan95a] McMillan, L., Bishop, G., ‘‘Head-Tracked Stereoscopic 9. References Display Using Image Warping,’’ Stereoscopic Displays and Virtual [Adelson91] Adelson, E.H., Bergen, J.R., ‘‘The Plenoptic Function and Reality Systems II, Proc. SPIE, Vol. 2409, S. Fisher, J. Merritt, B. the Elements of Early Vision,’’ In Computation Models of Visual Bolas eds. 1995, pp. 21-30. Processing, M. Landy and J.A. Movshon, eds., MIT Press, Cam- [McMillan95b] McMillan, L., Bishop, G., Plenoptic Modeling: An bridge, 1991. Image-Based Rendering System, Proc. SIGGRAPH ’95 (Los Ange- [Ashdown93] Ashdown, I., ‘‘Near-Field Photometry: A New Approach,’’ les, CA, August 6-11, 1995). In Computer Graphics Proceedings, Journal of the Illuminating Engineering Society, Vol. 22, No. 1, Win- Annual Conference Series, 1995, ACM SIGGRAPH, pp. 39-46. ter, 1993, pp. 163-180. [Miller95] Miller, G., ‘‘Volumetric Hyper-Reality: A Computer Graphics [Beers96] Beers, A., Agrawala, M., Chaddha, N., ‘‘Rendering from Com- Holy Grail for the 21st Century?,’’ Proc. Graphics Interface ’95, W. pressed Textures.’’ In these proceedings. Davis and P. Prusinkiewicz eds., Canadian Information Processing [Benton83] Benton, S., ‘‘Survey of Holographic Stereograms,’’ Process- Society, 1995, pp. 56-64. ing and Display of Three-Dimensional Data, Proc. SPIE, Vol. 367, [Moon81] Moon, P., Spencer, D.E., The Photic Field, MIT Press, 1981. 1983. [Narayanan95] Narayanan, P.J., ‘‘Virtualized Reality: Concepts and Early [Blinn76] Blinn, J.F., Newell, M.E., ‘‘Texture and Reflection in Computer Results,’’ Proc. IEEE Workshop on the Representation of Visual Generated Images,’’ CACM, Vol. 19, No. 10, October, 1976, pp. Scenes, IEEE, 1995. 542-547. [Nimeroff94] Nimeroff, J., Simoncelli, E., Dorsey, J., ‘‘Efficient Re- [Bolles87] Bolles, R., Baker, H., Marimont, D., ‘‘Epipolar-Plane Image rendering of Naturally Illuminated Scenes,’’ Proc. Fifth Eurograph- Analysis: An Approach to Determining Structure from Motion,’’ ics Rendering Workshop, 1994, pp. 359-373. International Journal of Computer Vision, Vol. 1, No. 1, 1987, pp. [Sbert93] Sbert, A.M., ‘‘An Integral Geometry Based Method for Form- 7-55. Factor Computation,’’ Computer Graphics Forum, Vol. 12, No. 3, [Chen93] Chen, S.E., Williams, L., ‘‘View Interpolation for Image Syn- 1993, pp. 409-420. thesis,’’ Proc. SIGGRAPH ’93 (Anaheim, California, August 1-6, [Seitz95] Seitz, S., Dyer, C., ‘‘Physically-Valid View Synthesis by Image 1993). In Computer Graphics Proceedings, Annual Conference Interpolation,’’ Proc. IEEE Workshop on the Representation of Visual Series, 1993, ACM SIGGRAPH, pp. 279-288. Scenes, IEEE, 1995. [Chen95] Chen, S.E., ‘‘QuickTime VR — An Image-Based Approach to [Williams83] Williams, L., ‘‘Pyramidal Parametrics,’’ Computer Graphics Virtual Environment Navigation,’’ Proc. SIGGRAPH ’95 (Los Ange- (Proc. Siggraph ’83), Vol. 17, No. 3, July, 1983, pp. 1-11. les, CA, August 6-11, 1995). In Computer Graphics Proceedings, [Ziv77] Ziv, J., Lempel, A., ‘‘A universal algorithm for sequential data Annual Conference Series, 1995, ACM SIGGRAPH, pp. 29-38. compression,’’ IEEE Transactions on Information Theory, [Fuchs94] Fuchs, H., Bishop, G., Arthur, K., McMillan, L., Bajcsy, R., IT-23:337-343, 1977. Lee, S.W., Farid, H., Kanade, T., ‘‘Virtual Space Teleconferencing Using a Sea of Cameras,’’ Proc. First International Conference on Medical Robotics and Computer Assisted Surgery, 1994, pp. 11
You can also read