The optical three-dimension measurement methods have been widely used in face recognition, machine vision, biomedical imaging, virtual reality and aerospace with the advantages of fast speed, high precision and non-contact measurement. Recently, the trend of structured light 3D reconstruction tends to be real-time with improving accuracy and reducing the dependence of time domain. The structured light coding is an active measurement method which could provide abundant feature points. The 2D gold matrix is a spatial coding method and it provides a new type of structured light for optical 3D measurement. This scheme provides the dynamic 2D spatial information based on the fast decoding from the encoded projected light. Here, we proposed a binocular stereo vision system based on the structured light encoded by 2D gold matrix. Only a pair of images, which could be captured in real-time by the two cameras, are needed for 3D reconstruction. The experiment shows that the decoding success rate is up to 99.48% for non-planar object. The system is simple in structure and low in cost. It is expected to be applied to real-time 3D measurement fields such as face recognition and biomedical imaging in the future.