1. A method for generating depth maps, comprising of the following steps: obtaining image comprising a plurality of pixels; obtaining an initial depth map, wherein the initial depth map defines initial depth values for a plurality of pixels; mapping each of the pixels of the image to the initial depth map according to positions of the pixels, in order to obtain corresponding initial depth values; and subdividing an image data space of the image into a plurality of sub-image spaces, and filtering the initial depth value of each of the pixels of the image according to the initial depth values of the pixels located in the same sub-image space, in order to obtain depth information for the pixels, wherein the step of subdividing the image data space, and filtering the initial depth value of each of the pixels of the image data comprises the steps of: mapping each of the pixels of the image data to one or a plurality of 3D grids based on pixel intensity; calculating an average depth value for each cell of said one or plurality of grids according to the initial depth values of the respective pixels in the cells; and replacing the initial depth values of each of the pixels of the image data by the average depth value of the grid where the pixel is located, in order to obtain the depth information for the pixels.