CSC5280 Project 3:  Photometric Stereo

Wei Zhang
Dept. of Information Engineering,
The Chinese University of Hong Kong

zw009 (at) ie.

[Basic Algorithm][Extensions][Experimental Results]
[Appendix]  User Interface[Reference]
Download: Test Data, Executable File, Source Code

In this project, I implemented several algorithms to construct a depth field from a series of images of a diffuse object under different point light sources. My work is listed as follows (with * to indicate extensions):

Normal estimationDepth estimation
Use chrome ballSolve a least squares fit
Example-based* [2]Frankot-Chellappa algorithm* [5]
Not use chrome ball* [3]

1. Basic Algorithm

The overall process of constructing photometric stereos basically consists of four steps:

1.1 Light Source Direction Estimation: Using a chrome ball under different light source point, to construct the directions of these light sources since the normal at any given point on the ball is known.
(Related file: LightDirs.cpp.)

Fig. 1 Lighting direction estimation.

First, determine the center of the chrome ball by calculating the coordinates of its center in the mask image and determine the radius of the ball by taking the maximum distance from boundary pixels to the center.
Second, for each image of the chrome ball, estimate the highlight center by taking the averages of coordinates of all the pixel in the highlight area (intensity > 0.9).
Finally, for each image of the chrome ball, compute the light source direction using the formula (illustrated in Fig. 1)
where N is the normal vector at the highlight center point and R is the reflection vector. R=(0,0,-1) and N is (xh, yh, xc, yc are the coordinates of the highlight center and ball center, respectively. r is the ball’s radius):

1.2 Surface Normal Estimation: After all the light source directions are determined, estimate the surface normal vectors of each point on the object.
(Related file: Normals.cpp.)

The appearance of the object is modeled as , where I is the pixel intensity, kd is the albedo, and L is the lighting direction (a unit vector), and n is the unit surface normal. Let , g can be calculated by solving a linear squares problem:
where i is the index of images.
To avoid the effect of shadows, each pixel is weighted by its intensity, i.e. use a new objective function

1.3 Albedo Estimation: The albedo of the surface can be computed simultaneously with the surface normal or can be computed separately. My implementation calculates them separately for better accuracy.
(Related file: Albedos.cpp.)

The formula is
which is derived from (2).

1.4 Depth Estimation: After the surface normals have been calculated, compute the depth of each image pixel.
(Related file: Depths.cpp.)

As the normal vectors are perpendicular to any vector on the surface, we have
in the x and y directions, respectively.
[Back to Top][Go to Next]


Copyright (c) 2009 Wei Zhang