A MATLAB Implementation of the Basic Photometric Stereo Algorithm
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
psmImages
results
README.md
compute_heightMap.m
compute_surfNorm.m
photometric_stereo.m
run_ps.m
show_surfNorm.m
tga_read_header.m
tga_read_image.m
tga_toolbox_license.txt

README.md

photometric-stereo

A MATLAB Implementation of the Basic Photometric Stereo Algorithm

This project implements the basic photometric stereo algorithm that essentially uses the least squares method. Given twelve photometric images and their corresponding light directions, the surface normals are first computed as an overdetermined linear system. Basically, this linear system captures a simple physics relationship: a pixel’s intensity is proportional to the dot product between the light direction and the surface normal at that pixel.

Next, from the surface normals can the height map be solved as another overdetermined system. This second linear system captures the relationship that the surface normal at a pixel is perpendicular to the vector formed by this pixel and its immediate neighbor.

Results

Example Usage

Just run script run_ps.m.

Acknowledgements

The data is by courtesy of Steven Seitz and available at here. Dirk-Jan Kroon holds the copyright of tga_toolbox, containing tga_read_image.m and tga_read_header.m.