Photometric Stereo Image Processing

Project Overview

This project was developed as an assignment for SFU’s “Computational Vision” course. The program uses the photometric stereo technique to recover surface normals and relative pixel z-distances from sets of 3 images taken from the same position with varied light locations.

The tool is written from scratch in MATLAB. It generates a 3 dimensional inverse lookup table to index gradient-space (p, q) coordinates as a function of image intensity ratios and approximate light positions.

The program then uses the lookup table to efficiently process images in sets of 3 at a time, computing per-pixel surface orientations in terms of gradient and normal direction. Then, it performs <em>integration along a path</em> to approximate the relative z-distance of each pixel, providing an overall description of the object’s shape.

The program outputs a tangent-space normal map (R = x ∈ [-1, 1], G = y ∈ [-1, 1] mapped to [0, 255], and B = z ∈ [0, 1] mapped to [128, 255] ), a grayscale map of an integrated approximate of z-depth, and quiver plots of the surface gradient (not shown).

GitHub Repository: https://github.com/b1skit/PhotometricStereo

Real Image Results:

Note: For simplicity, only a single source image is displayed

Synthetic Image Results:

Scroll to top