A Non-local Approach to Shape from Ambient Shading