As the credibility and accuracy of binocular endoscope reconstruction are significantly affected by narrow baseline and large distortion of taken pictures, we develop a binocular endoscopic speckle system to address these limitations. The system consists of a projector and a binocular endoscope. First, the binocular endoscope captures the object surface, which illuminated by a projector with pseudo-random speckles. Then, we proposed a high-precision calibration method based on three-dimensional to improve the calibration precision of the system. Finally, in order to enhance the exactness and reliability of the stereo matching, Semi-Global Matching (SGM) algorithm is studied and improved. This paper aims to reduce the deviation and improve the 3D measurement accuracy of the system. In comparison with traditional stereo reconstruction, the reconstruction accuracy of cylinder and plane was improved 31.2% and 34.0% respectively.