(Please check this page regularly for updates! Most recent update: additional point cloud data added, and a DGP bug fixed -- please update your copies!)

Assignment 1: Point Clouds

Preliminaries

For the assignments in this course, you will be using a toolkit that contains basic classes and functions, including vector and matrix math, geometric transformations, binary and text file I/O, system utilities, and (optionally) an OpenGL-based display module. Visit http://github.com/sidch/DGP and check it out following the instructions. Then, read the Doxygen-generated HTML documentation, and subsequently dig into the code as needed. This toolkit is likely to be updated as the course progresses, so keep your master copy up-to-date using git pull origin master. (Recent bugfix, please update.)

Assignment code

Download the skeleton code for the assignment here: A1.zip, and additional data for testing here: PointClouds.zip. Make sure you have GLUT installed, and copy the DGP/DGP subfolder to src/.

If the build succeeds, run ./pcloud data/teapot.pts. A window like this should pop up:



Use the mouse to rotate the view. Press 'B' to see the shape's bounding box, 'N' to hide the point normals, and 'Esc' to quit.

Todo

In this assignment, you will write code to estimate the surface normal at each point of a point cloud. In other words, given data/teapot_no_normals.pts, you should produce something like data/teapot.pts. You can use any method whatsoever, including those not discussed in class. Correctly implementing linear regression on local neighborhoods (as discussed in class) is enough for full credit. (Hint: the Matrix3 class has the eigenvalue function you need.) To find the points in a local neighborhood, you must complete and use the PointKDTree class.

For extra credit, you can try implementing the following:

The relevant functions are marked with "TODO" in the code. They are:

This skeleton is given only as a guidance. You're free to change anything you want in the code, add functions, add files, etc. Just don't change anything in DGP (unless something is broken, in which case let me (Sid) know ASAP).

The program has the following usage:

Usage: ./pcloud [OPTIONS] <points-in> [<points-out>]

Options:
--normals     :   Estimate the normal at each point
--downsample  :   Adaptively downsample the points

If you supply either of the options, the point cloud will be processed accordingly. If you also supply <points-out>, the result will be saved to that disk file. Else, the processed points will only be displayed in the interactive window.

Evaluation

We will evaluate your code on test point clouds that we will not release with the assignment. So we encourage you to test on as much data as you can find before submitting! Look for corner cases. You may do any subset (including, obviously, zero) of the ECs. The first two ECs you do (any two) count for 10% each. The third counts for 5%.

Submission

Please email your submissions to the course staff (Sid + both TAs, emails on main page) using EXACTLY the following format:

Yes, multiple submissions are ok, but only the most recent one will be considered (going by email timestamp).

FAQ