written by Heng Guo ([email protected])
Photometric Stereo is an approach to determining surface normal of a scene from a set of images recorded from a fixed viewpoint but under varying lighting conditions.
The code is written in Python 3.6 but should be able to adapt it to Python 2.x if needed. You might need the following Python packages installed:
cv2(OpenCV, used for image I/O)glob(used for reading out a list of images)numpy(main computation depends on matrix operations)sklearn(scikit-learn, used for normalization of array)
- Read tutorial PDF of Photometric Stereo
- Complete the code in
rps.pyfrom Line 106 - run
python demo.pyand check the mean angular error value - Send the value of mean angular error to [email protected]
PS: Key solution is the least square in Page 14 of the tutorial PDF. If your code is correct, you will get a figure like this:
- Read GitExtensions tutorial
- Commit your changes of
rps.py - Push this project to your own GitHub repository
- Send the link of your repository to [email protected]
PS: You can use other git tool to push your code to GitHub, but you need to make sure to send the repository link to me.

