Trick for handling shadows
Weight each equation by the pixel brightness:
Gives weighted least-squares matrix equation:
Solve for N, k
d
as before