Height-from-photometric ratio (Matlab code)

Height from Photometric Ratio with Model-based Light Source Selection

This code implements the photometric stereo method described in the paper “Height from Photometric Ratio with Model-based Light Source Selection”. There are two parts to the method and they can be used independently:

The first part uses a probabilistic model to choose a subset of observations for each pixel with the goal of excluding shadows, specularities or other noise. This part requires guide surface normals and albedo which can be provided by any standard photometric stereo algorithm. We include implementations of a number of such methods. The best results are provided by using our RANSAC-based variant of classical photometric stereo. The second part directly computes surface height from the images and the observation selections made in step 1. If you want to use all observations (for example if your object is approximately Lambertian and there aren’t many cast shadows) then you can simply use all observations.

Download the code from the github repository.

Sample results