Skip to content
A MATLAB Implementation of the Basic Photometric Stereo Algorithm
MATLAB
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
psmImages v1 May 1, 2015
results v1 May 1, 2015
README.md Update README.md Aug 2, 2018
compute_heightMap.m v1 Apr 19, 2015
compute_surfNorm.m v1 Apr 19, 2015
photometric_stereo.m v1 Apr 19, 2015
run_ps.m v1 May 1, 2015
show_surfNorm.m v1 Apr 19, 2015
tga_read_header.m v1 Apr 19, 2015
tga_read_image.m v1 Apr 19, 2015
tga_toolbox_license.txt v1 Apr 19, 2015

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.

You can’t perform that action at this time.