In this activity, the an object was recreated using photometric stereo in Scilab.
The images of an object illuminated by a light source located from four different locations were used in this activity. The images and the locations of the light source are shown below.
Figure1. Images rendered in MatlabFigure2. Locations of Light SourcesThe images from a Matlab file ('photos.mat') was loaded in Scilab using the Scilab command
loadmatfile. The surface normal(n) of the images were then computed in Scilab using the equations given below.
where:
After the surface normals were computed, the elevation z was then computed using the following equations:
The integral function in the given equations was evaluated using the
cumsum function in Scilab. The computed elevation was then used to generate the 3D plot of the object. The generated plot is shown below.
Figure3. 3D plot of the object
I will give myself 10/10 for completing this activity.
No comments:
Post a Comment