en193s08 / 2003 Homework 1 - Download the the latest java 2 SDK for windows from http://java.sun.com/j2se - Once you install it, the java SDK should be in a directory with a name like "jdk1.4.1_05" - the java compiler should be jdk1.4.1_05/bin/javac.exe - Create a "test/" directory - Unzip the file en193s08-hw1.zip in the test/ directory. You will find p3d.html -- a java applet you will need to modify for the first homework. p3d.lnk is the corresponding windows application. If you run it, a photo3Dapplication will appear on your screen. You can start playing with it. In particular, 2 upper panels will appear with a stereo view of a object (left camera & right camera). At the right of the upper panels, there is an option menu. By selecting the option "Stereo camera", you have access to the camera parameters (position, lookat, up, etc...). By selecting "triangulation", a "triangulate" button will appear. Such command enable the triangulation routine, which compute the 3D location of the points observed by left camera and right camera (red dots). The reconstructed 3D points of the object will appear in the 2 lower panels as textured polygonal mesh. However such procedure is not implemented yet. In HW1 you will be required to implement it. Below the "load" banner, you can load objects. You can select among: cube, g2, bun000 and maghead. Finally, the application allows you to load (and save) the image file in .wrl format ("file" menu). More info will be distributed during the next class. - In the directory en193s08-hw1 you will also find the stereotriangulator.java source code. Such code is just the scheleton of the triangulation routine. In HW1 you will be asked to fill in stereotriangulator.java with the triangulation core routine. For now, you may just want to try to compile stereotriangulator.java in order to get familiar with the java compiler/enviroment. -- copy StereoTriangulator.java and photo3d.zip in jdk1.4.1_05/bin/ -- photo3d.zip is a zipped archive of classes needed by the java application. You don't need to unzip it. -- you can compile stereotriangulator.java by runnning the command: javac -O -classpath ".;photo3d.zip" StereoTriangulator.java -- the output is StereoTriangulator.class -- copy such file back into your test/ directory -- run again the photo3Dapplication. Load an object (e.g. bun000). Then click on "triangulate". A cyan bounding box will appear on the 2 lower panels. - The lower two panels form a virtual stereo pair. The camera parameters are initialized to the ones used for the reconstruction. Clicking and dragging the mouse on each one of the two lower panels allows you to translate or rotate the two stereo cameras (both are rigidly mounted) with respect to the object. The screen of the lower two panels is divided in 9 regions: CENTER,EAST,NORTH-EAST,NORTH,NORTH-WEST,WEST,SOUTH-WEST,SOUTH,SOUTH-EAST. he behavior depends on where you click down, and in which direction you drag: +-+-------------+-------------+ | translate X | translate Z | +-+-------------+-------------+ | rotate | translate Y | + + + + | | | +-+-------------+-------------+ The data sets (objects) are described by a base name. Each of these base names, such as "cube" corresponds to 7 files: cube.msh : mesh connectivity cube-L.cam : left camera parameters cube-L.2dp : left image coordinates of mesh vertices cube-L.eps : left image in postscript format cube-R.cam : right camera parameters cube-R.2dp : right image coordinates of mesh vertices cube-R.eps : right image in postscript formatThese data sets can be loaded from the TRIANGULATION panel,or from the FILE->LOAD->STEREO DATA pull down menu (when run as an application)