Document digitization is faster and more affordable using digital cameras than scanners. On the other hand, if we aim at extending
the basic digital camera functionalities for such a purpose, post-processings will be of first importance, at least to improve
the text legibility. In this paper, we address the specific problem of the virtual flattening of curved documents, as for
example the pages of an opened book lying on its spine. In order to compute the document shape, we use the shape from shading
technique and discuss why, in some cases, it is more suitable than other 3D single-view reconstruction techniques. We extend
the seminal work by Wada et al. (Proceedings of the IAPR Workshop on machine vision and applications, Tokyo, Japan, pp. 591–594,
1992) and consecutive papers, reformulating the problem in terms of perspective shape from shading. Finally, we design a complete
post-processing algorithm and test it on real images. Even if the documents are much curved, it is shown that the restored
images are almost identical to scanned images of the flattened documents.