In this paper, we present a method for accurately estimating the shape of an object by integrating the surface orientation measured by photometric stereo and the position measured by some range-measuring method. We first show that even if the knowledge of the reflectance/illumination is inaccurate, the first derivatives of the photometrically measured orientation can be accurately estimated at the surface points where they have small values. We propose a probabilistic framework to quantitate the (in)accuracy of the knowledge and connect it to the estimation accuracy of these derivatives. Based on this framework, we consider optimally integrating the surface orientation and position to obtain the object shape with higher accuracy. The integration reduces to an optimization problem, and it is efficiently solved by belief propagation. We present several experimental results showing the effectiveness of the proposed approach.