This paper describes a new modeling of the shape from shading problem taking perspective projection into account, and proposes a method of resolution for the new equation. An application is proposed, which consists in correcting the defects of photographs of skew i.e., non flat, documents.