xiumingzhang / photometric-stereo

A MATLAB Implementation of the Basic Photometric Stereo Algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A MATLAB Implementation of the Basic Photometric Stereo Algorithm

License:BSD 2-Clause "Simplified" License


Languages

Language:MATLAB 100.0%