1. A method of producing an image with depth by using 2D images, comprising: obtaining a set of internal parameters of a camera; taking at least two 2D images with a small shift by the camera, using one as a first 2D image, and the other one as a second 2D image, wherein the first 2D image has N depths, and N≧2; estimating a plurality of sets of external parameters of the camera respectively corresponding to the 2D images; calculating a pixel 3D information for each pixel of the first 2D image respectively corresponding to the N depths; and determining a proper depth of each pixel, wherein through the set of internal parameters, the plurality of sets of external parameters, and the N depths, the pixels of the first 2D image are projected onto N positions of the second 2D image, so as to perform a matching comparison analysis with the second 2D image, thereby determining the proper depth from the N depths.