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 hornintegrate function. Note that you will typically want to run
the hornintegrate function with iterations, meaning it will take a while.
: def photometricstereoimages lights, mask, hornniter:
n
inputs :
images : :nimshw
lights : nims,
mask: hw an optional parameter which you are encouraged to use.
It can be used eg 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 tends to work well.
Write your code here.
albedo nponesimagesshape
normals npdstacknpzerosimagesshape
npzerosimages shape
nponesimagesshape
Hhorn
return albedo, normals, Hhorn
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
