Preliminary observation: surface orientation at the occluding contour is known and can be used as a boundary condition (p,q representation unsuitable; use stereographic f,g).
Formulation (Ikeuchi and Horn): minimize

to find
and
that satisfy the image
irradiance equation, while keeping the solution surface smooth.