The goal of this assignment is to implement an algorithm that reconstructs a surface using the concept of photometric stereo. Additionally, you will implement the specular removal technique of Mallick et al., which enables photometric stereo reconstruction of certain non-Lambertian materials. You can assume a Lambertian reflectance function once specularties are removed, but the albedo is unknown and nonconstant in the images. Your program will take in multiple images as input along with the light source direction (and color when necessary) for each image.
Implement the photometric stereo technique described in Forsyth and Ponce 5.4 and the lecture notes. Your program should have two parts:
Try this out on the synthetic dataset with three subsets of images:
You should show in your report:
Implement the specularity removal technique described in Beyond Lambert: Reconstructing Specular Surfaces Using Color (by Mallick, Zickler, Kriegman, and Belhumeur; CVPR 2005). Your program should input an RGB image and light source color and output the corresponding SUV image. Try this out first with the specular sphere images and then with the pear and squash images.
You should show in your report the following for each specular sphere image:
Combine parts 1 and 2 by running your photometric stereo code on the diffuse components of the specular sphere, pear and squash images. For comparison, run your photometric stereo code on the original images (converted to grayscale) as well. You should notice eroneous "bumps" in the resulting reconstructions - the result of violating the Lambertian assumption.
For each image set (specular sphere, pear, and squash) you should show in your report:
Implement the multi-channel photometric stereo algorithm of Barsky and Petrou (Colour photometric stereo: Simultaneous reconstruction of local gradient and colour of rough textured surfaces., ICCV 2001). Show results as in part 3 using both the RGB colorspace and UV colorspace on at least one image set.
You should hand in:
The following four test images will serve as input, and they can be downloaded here. The first row shows the image, the second row is the file name, and the third row is the light source direction (not normalized) used to generate the image. Note that in all four images, the strength of the light sources was a constant 1.0.
![]() |
![]() |
![]() |
![]() |
| im1.png | im2.png | im3.png | im4.png |
| [0 0 -1] | [0 0.2 -1] | [0 -0.2 -1] | [0.2 0 -1] |
These images of a specular sphere (download here) are available in a matlab .mat file (graciously provided by Satya Mallick). This mat file contains,
These images of a pear with specularities (download here) are available in a matlab .mat file (graciously provided by Satya Mallick). This mat file contains,
These images of a squash with specularities (download here) are available in a matlab .mat file (graciously provided by Satya Mallick). This mat file contains,
While a naive integration routine will probably work ok for synthetic data, it might have problems with real images. Here we provide a matlab implementation of the Horn integration technique (summarized here by Satya Mallick). You still need to write your own integration code, but if your algorithm doesn't handle real images well, use this routine instead.