Photometric Stereo

Project Overview:
For Project 3 we were required to add code to a program to create a 3D reconstruction of an object from a series of images taken with different lighting sources.  This required several subtasks:

  1. Determine lighting directions -- Given images of a chrome sphere we had to determine the location of our twelve different lighting locations (same for all the pictures).

  2. Determine normals for an object -- Given images of an object with the same lighting locations as #1, determine the objects surface normals for all points within a mask.

  3. Determine albedo of an object -- Given the calculated normals from #2 and the color values from the original series, determine the objects albedo for all points within a mask.

  4. Determine depth (i.e. 3D reconstruction) of an object -- Given the calculated normals from #2, determine the z depth of all points within a mask.

The UI and a lot of the matrix math was implemented for us and we were required to implement the underlying math for #1-#4.

Project Requirements:
For three (3) of the sample images we had to capture snapshots of the follow:

These images are presented in the table below.  A column represents the series of transformations for one object.  Each row is one of the bullets above.

Project Discussion:
Overall the project was much easier than the first two.  I found that we didn't really have to figure out any algorithms or determine any fast or clever ways of performing calculations since all of that code was already provided.  The actual coding ended up being very short and just a matter of either a) checking boundary conditions, or b) doing some simple math as described on the project page.  The most challenging part was that the code seemed to run slowly within Visual Studio (i.e. hitting F5) but fast without and I couldn't determine why this was.  Aside from that I had some interesting bugs:

Project Artifacts:

Picture budha horse owl
RGB Normals
Needle Map
Albedo Map
3D View #1
3D View #1 (Albedo)
3D View #2
3D View #2 (Albedo)