|
EE/CNS 148, CS274c: |
Tasks 2 & 3: Stripe coordinates may range from 0 to 479. Many of these numbers will be absent from your 3D data, since the object you are scanning covers only part of the screen. Same thing happens with the row coordinates from the camera view. Therefore, you should not save points with coordinates in the range {0..minXp-1, 0..minYc-1}. We call minXp rngx0, and minYc rngy0. These should be saved with the params file. Then, Ncol = maxXp - rngx0 + 1 and Nrow = maxYc - rngy0 + 1. Task 4: Given the definition of neighboring points in the homework text, you can linearly interpolate the coordinates of a point from those of it's neighbors (i.e. average). Given a hole with closed boundary, one can write down the equations for all the missing points, resulting in a linear system of the form Ax = b, where A and b only depend on points on the boundary. Writing A and b, however, can be tedious. Another way of solving the problem is to use an iterative method. We suggest linear interpolation along the rows of the grid, followed by iteration. Here is a description of the algorithm in pseudocode: interpolate along rows to find 1st approximation for all points in the hole do recompute its coordinates from neighbors It is up to you to define progress in a suitable way. Note that progress should global to a hole (why?). You can also try different 1st approximations. One could, for example, set the missing points to {0, 0, 0}, resulting in slower convergence. You may also change the order in which you visit the points in the hole in order to improve convergence (think about this!) Also, make sure you think about bad hole topologies when defining hole size! You only want to fill nice holes! Task 5: A 3D surface has two principal curvatures. They are defined to be the minimum and the maximum of the curvatures of the intersection between a plane containing the normal and the surface - call them k1 and k2. The principal curvatures are also the eigenvalues of the determinant of the differential of the normal to the surface. The corresponding eigenvectors are called principal lines of curvature - call them e1 and e2. The mean curvature is H = 1/2 * (k1 + k2), and the Gaussian curvature is defined as K = k1*k2. The curvature about any direction d can be computed by k = k1*cos(e1,d) + k2*cos(e2,d). We want to generate meshes that minimize the integral of the absolute value of the Gaussian curvature K, i.e. |k1*k2|. In our case, we only have samples of the surface, so the integral becomes a sum. You can choose to estimate curvature at vertices, edges, or both. Angle is an approximation for curvature - curvature is really the limit of the angle between two normals. A good test case for your algorithms is a cube. Think about edges. They should have high curvature in a way consistent with the geometry. |
|
|
Marcel Gavriliu, April 12, 1998. |
|
Copyright © 1998 Peter Schröder, Jean-Yves Bouguet, Marcel Gavriliu. Last modified: Wed Mar 11 09:49:20 PST 1998 |