1. A method for generating depth maps, comprising of the following steps: obtaining, using a computer, an image comprising a plurality of pixels; obtaining, using the computer, an initial depth map, wherein the initial depth map defines initial depth values for the plurality of pixels; mapping, using the computer, the plurality of pixels of the image to the initial depth map according to positions of the plurality of pixels to obtain the corresponding initial depth values of the plurality of pixels; and subdividing, using the computer, an image data space of the image into a plurality of sub-image spaces, and filtering the initial depth values of the plurality of pixels of the image according to the corresponding initial depth values of the plurality of pixels located in the same sub-image space to obtain depth information for the plurality of pixels.