Question: In phyton Implement the photometric stereo technique Implement the photometric stereo technique described in the lecture. Your program must have two parts: Given the images

In phyton Implement the photometric stereo technique
Implement the photometric stereo technique described in the lecture. Your program must have two
parts:
Given the images and corresponding light source directions, estimate the surface normals and
albedo map.
Reconstruct the depth map from the surface with the implementation of the Horn integration
technique given above in horn_integrate function. Note that you will typically want to run
the horn_integrate function with 10000-100000 iterations, meaning it will take a while.
[22]: def photometric_stereo(images, lights, mask, horn_niter=25000):
"n"
inputs :
images : ({:n_(-)ims,h,w)
lights : (n_ims, 3)
mask: (h,w) an optional parameter which you are encouraged to use.
It can be used e.g. to ignore the background when integrating the
-normals.
It must be created by converting the images to grayscale and,
~thresholding
(only using locations for which the pixel value is above some }
-threshold).
The choice of threshold is something you can experiment with,
but in practice something like 0.05 tends to work well.
"""
Write your code here.
albedo = np.ones(images[0].shape)
normals = np.dstack((np.zeros(images[0].shape),
np.zeros(images [0].shape),
np.ones(images[0].shape)))
H_horn =[]
return albedo, normals, H_horn
In phyton Implement the photometric stereo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!