1. A method of generating depth data, comprising: calculating a value of a spatial frequency component of image data in a local image area around a pixel of interest, wherein the image data is representative of one or more objects on which a spatial light pattern is projected and blurring of the spatial light pattern in the image data increases in a first depth direction and decreases in a second depth direction; and determining depth data corresponding to the calculated value of the spatial frequency component by utilizing a preset relationship between depths and values of the spatial frequency component.