Light Field Source - FAQ

Frequently asked Questions


How is the lightpack software set up?

Conceptually, there are two abstraction levels for the light field library. On the higher level (which is the level of lifauth and lifview), the light field library provides a set of operations that can be done on light fields. There are also the lfBegin and lfEnd commands. You must call lfBegin before calling any light field library functions, and call lfEnd when you're done. The commands between the lfBegin and lfEnd are guaranteed to occur sequentially, but do not actually execute until lfEnd is called. This allows the light field library to use a data flow paradigm, to optimize the operation so that it fits in system memory.

On the lower abstraction level, we have the light field library itself. It has different files to handle different aspects of light field management. The central file is dataflow.c, which calls the other functions. When a lightfield program calls lfBegin, the dataflow routines start making a list of all the operations that the program wishes to perform on the light field. It keeps building up this list until the program calls lfEnd. At this point, the dataflow routines analyze the list of operations, and tries to identify certain sequences that can be optimized.

The reason for this optimization can best be explained with a concrete example. For example, lifauth works in 2 steps. First it selects a "training set" of data and generates the VQ codebook. Then it reads in the raw .rgb data, compresses it with the codebook, and writes it out to the .lif file. However, most computer systems do not have enough memory to hold the raw data for the entire light field at once. Thus if we tried to first load all the .rgb images, and then write them out, we would most likely run out of memory, and probably run out of swap space, as well. (For example, the uncompressed raw data for the Soda Hall light field was 1.5GB). So using the dataflow approach, we load a small chunk of the light field, compress it, and save it before moving on to the next chunk.


Ok. So what are all those other libraries?

The other libraries (libgeom and libvq) provide functions that are used by the light field library (liblight). The geom library provides some of the geometric functions used for projection and clipping of the uv and st planes, while the vq library handles "Vector Quantization" compression.


In LF_ROOT/src/liblight, I don't see the file lf_consts.h. Where is it?

That file is generated by LF_ROOT/src/tools/consts.perl during the make process. The Makefile dependencies should cause consts.perl to be made before it is needed. "make clobber" will delete this file (as well as the files generated by lex and yacc). If the dependencies are causing problems, try "cd liblight; make lf_consts.h".