Implementation of simple photometric stereo like below picture.
Ubuntu 18.04
Python3.6
- OpenCV4
- numpy
- sys
- os
- scipy
- argparse
Prepare proper images and masks for photometric stereo. In order to estimate light source direction, this code require chrome images that taken same lighting environment.
Note that the images used in the example program are taken from the following project page: https://courses.cs.washington.edu/courses/cse455/10wi/projects/project4/psmImages_png.zip
python main.py
optional arguments:
-h, --help show this help message and exit
-i , --input path to input images folder --> {abc}/{abc}.{number}.png,
{abc}/{abc}.mask.png
-c , --chrome path to chrome images folder --> same lighting condition with input
images
-n , --numimage number of images for estimation
-w , --window window size to make mask small
[1] Woodham, Robert J. "Photometric method for determining surface orientation from multiple images." Optical engineering 19.1 (1980): 191139. [Paper]