Skip to content

ZaarafA/Photometric-Stereo

Repository files navigation

Lambertian Photometric Stereo in C++

Recover an object’s albedo and per-pixel surface normals from three grayscale photos taken under different point lights. Lighting is calibrated automatically from a reference sphere.

Pipeline

  1. Sphere Geometry – find the reference sphere’s center and radius from one evenly lit image.
  2. Light calibration – from three sphere images (one per light), estimate each light direction.
  3. Photometric stereo – with the three calibrated lights and three images of the object, compute an albedo map and a normal-orientation overlay.

Setup

Build using g++ on UNIX

make
make clean

Geometry (sphere center & radius) Usage

./Geometry <input_sphere_image> <threshold> <output_params_txt>

Calibration (light directions) Usage

./Calibration <input_params_txt> <sphere_L1> <sphere_L2> <sphere_L3> <output_directions_txt>

Stereo (albedo & normals on the object) Usage

./Stereo <directions_txt> <object_L1> <object_L2> <object_L3> <step> <threshold> <out_normals_img> <out_albedo_img>

Results

Base Object Image

Base Object Image

Albedo

Albedo Image

Normal

Normal Map

About

Lambertian Photometric Stereo Pipeline w/out any external libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors