Image Processing – Photometric stereo, from 2D to 3D
Task to generate depth maps from pictures that are all taken from the same direction, but under different lighting conditions. With this we should be able to go from 2D images to a single 3D representation of the same object. We start off with 3 synthetic images of Beethoven, all with light coming from different directions.
To arrive at the depth map, we must first generate an albedo map of Beethoven. The albedo value represents the amount of light reflected from the surface, the higher the value the more light is reflected. By calculating the difference between the three representations through linear Lambertian modelling, and with the light vector at hand (included in the upload), we arrive at the euclidean norm – the albedo map: Shown below, without the original lighting and shadows.
With utilities included in the repository, and the albedo map representation we can compute the depth map and visualise Beethoven in 3D. This does in theory also work with real life images, but does generate a lot more noise in the depth map due to inconsistencies in pixel values.