Abstract : This work tackles the problem of two-image photometric stereo. This problem constitutes the intermediate case between conventional photometric stereo with at least three images, which is well-posed, and shape-from-shading, which is ill-posed. We first provide a theoretical study of ambiguities arising in this intermediate case. Based on this study, we show that when the albedo is known, disambiguation can be formulated as a binary labelling problem, using integrability and a nonstationary Ising model. The resulting optimization problem is solved efficiently by resorting to the graph cut algorithm. These theoretical and numerical contributions are eventually validated in an application to three-image photometric stereo with shadows.