Programming Assignment 3 - LDI warping ====================================== Final due date for all assignments is July 15, 2004. The goal of this exercise is to implement an LDI warper. 1) You should start by carefully reviewing the material on image-based rendering using warping and layered-depth images (LDIs): ~danix/public/pgr2004/ibr/mcmillan.pdf ~danix/public/pgr2004/ibr/RenderingLDI.pdf 2) To aid you in the implementation, I am providing you with parts of the necessary code, as well as with some input LDIs. In particular, you are given a camera class (Camera.h/cpp), which can compute a world to pixel coordinate transformation matrix, based on intuitive camera control parameters (position, lookat, up, etc). You are also given an LDI class (LDImage.h/cpp), which can read/write LDIs from/to files. You will need to implement a Warp member funstion for this class. The file warp.cpp is a skeleton that opens a GLUT window, which is used to display the warped images. The code can be found under ~danix/public/pgr2004/ex3 (it also uses the danixlib library that you're already somewhat familiar with from ex1 and ex2). 3) You'll need to implement a program that reads an LDI from a file, and enables the user to interactively change the view parameters, using LDI warping to generate the novel views. Any reasonable simple user interface that will enable the user to modify the view will do. For example, you can use mouse events or various keys to move the camera position left, right, up, and down, and to zoom in and out. You run the program like this: "ldwarp cube.ldi" 4) The minimal requirement is to implement the fast incremental LDI warping algorithm that was taught in class (and described in RenderingLDI.pdf). However, in order to get full credit for the exercise, you should also implement the occlusion-compatible warping order (which will enable you to avoid using a Z buffer), and design some sort of a splatting scheme in order to at least partially overcome the tears and holes that appear due to stretching. 5) The LDI images you are given contain a camera member, as well as the inverse matrix needed to define the warping matrix. This matrix (as well as the view matrix of the camera class) are 4x4 matrices (consistent with the algorithm in LayeredDepthImages.ps), not 3x4 matrices, as was shown in class. Each LDI pixel consists of one or more DepthPixels. Each DepthPixel has a color and a disparity value (even though it's stored in a field named "depth"). Background pixels have a disparity value of 0. A 4-vector for warping a pixel at (row,col) is formed as follows: [col, row, disparity, 1]. After warping and dividing by the fourth coordinate the first two coordinates are the target pixel coordinates (you'll need to round them to integers) and the third coordinate is the disparity with respect to the new view.