Implementation
Implementation
CG2010
Three
different softwares were developed to cover the stages involved in the
process:
1.A light render to
generate synthetic images and record light position and camera
parameters for each acquired image (not fundamental but allowed more
control over the generation process)
2.A light PTM fitter two
convert all the different images from a single view point with different
light direction into a single PTM file. Basically the fitter loads all
the images from a single viewpoint and the corresponding light direction
information. The fiiter uses a least square fit technique to fit the
samples to the polynom, writing the result to a single file.
3.A viewer that loads all
the PTM and corresponding camera positions and transformation matrix
(view and projection) and generates interactively a new image. The
operation is done in two stages:
a. View
interpolation : the desired viewpoint rays are traced and intercepted
with the planes (s,t) and (u,v), the closes existing ray is selected and
the PTM coefficients are stored to a buffer.
b.
Light interpolation: the buffer produced in view interpolation is sent
to the graphic card and a CUDA kernel evaluates the polynom at each
pixel for the desired light direction.
Implementation