For this activity [1], we are given four px intensity maps with different lighting
conditions, shown in Fig. 1. We can stack these intensity maps into one multidimensional array
. The source matrix is provided
and is defined as
We can then solve for by least squares approximation:
and then normalize to get the surface normal vectors
The surface elevation is expressed as
which are related to the surface normals by
The surface elevation at point is given by
Using the Frankot-Chellappa algorithm [2], we can numerically perform this integral using Fourier
transforms:
where and are the Fourier transform and its inverse, respectively, and
is an arbitrarily small constant that allows the formulation to remain valid at . The recovered
surface and its contour projection is shown in Fig. 2.
References
M. N. Soriano, A13 - Photometric stereo (2019).
R.T. Frankot, and R. Chellappa,
A method for enforcing integrability in shape from shading algorithms.
IEEE Trans. on Pattern Analysis and Machine Intelligence10(4) (1988).