|
A light field viewer was implemented that displays a light field captured using the ray-tracer implemented for project 2. The ray-tracer is given a uv and st plane along with resolutions for each plane. Colors are calculated for each (u,v,s,t) sample and stored in file read by the viewer. The viewer reads the ray values and performs view-interpolation for an arbitrary view point. The reconstruction algorithm is a quadralinear filter as described in the Lumigraph paper which accounts for "approximate geometry." The approximate geometry is a focal plane that shares a normal with the st plane and can slide along the vector between the sampling grid centers of the uv and st plane. The filtering works by intersecting each desired camera ray with the uv plane and the focal plane. Then for each of the surrounding four uv samples grid locations, its finds the corresponding st plane position that defines a ray that intersect the focal plane at the same location as the camera ray. Each of these four calculated rays (one for each surrounding uv sample location) hits the st plane between four st samples locations for a total of 16 u,v,s,t samples. The 16 samples are assigned weights and the final camera ray color is determined. The weights are assigned as a normalized L2 distance metric of the (u,v,s,t) distances to the actual uv and st plane intersection points where sample locations are unit-spaced. Some results are shown below: Here are two images taken from the same camera position but with focal plane in moved. Here is an image from another camera position. |