In this paper, we present a method for obtaining a highquality 3D depth. The advantages of active pattern projection and passive stereo matching were combined and a system was established. A Diffraction Optical Element (DOE) was developed to project the active pattern. Cross guidance and auto guidance were proposed to perform the passive stereo matching in a stereo image in which a DOE pattern is projected. When obtaining the image, the cross guidance emits a DOE pattern periodically, and consecutively receives the original and pattern images. In addition, stereo matching is performed using these images. The auto guidance projects the DOE pattern continuously. It conducts cost aggregation, and the image is restored through the process of removing the pattern from the pattern image. The ground-truth was generated to estimate the optimal parameter among various stereo matching algorithms. Using the groundtruth, the optimal parameter is estimated, and the cost computation and aggregation algorithm is selected. The depth was calculated and bad pixel errors make up 4.45% of the non-occlusion area.