The phase-shifting algorithm is widely used for noncontact three-dimensional (3-D) reconstruction, traditionally leveraging gray values to recover phase angles. It is difficult to reconstruct the shape of an object with a specular or dark surface. We propose an algorithm for accurate phase recovery based on high dynamic range imaging. Unlike most existing methods that use gray values to calculate the phase angle, the proposed method uses E values, which are the recovered irradiance from low dynamic range images, to calculate the phase angle. Experiments show that the proposed method improves phase recovery accuracy and achieves good results for the 3-D reconstruction of specular or dark objects.