Augmented Reality composes virtual objects with real scenes in a mixed environment. The recovering of the depth information of the scene is one of the most important problems in AR because correct handling of occlusion is a significant challenge for achieving visual realism. As an improved method of depth from defocus, coded aperture camera can recover depth by using a normal high resolution RGB image. Based on the principle of the coded aperture imaging, this paper studies the method of building the coded aperture imaging simulation platform. The property of coded aperture patterns to obtain depth can be obtained by simulating the coded aperture imaging with Zemax. The proposed simulation platform can effectively simulate the real coded aperture imaging by comparing the depth results between simulated images and real images. Experimental results prove that the proposed method is simple and effective.