1. A method of generating three-dimensional (3D) image data by using two-dimensional (2D) image data comprising a dummy component and an image component relating to an input image, wherein the dummy component is used to adjust a resolution of the input image, the method comprising: generating a depth map that corresponds to the 2D image data; detecting, in the 2D image data, a dummy area comprising the dummy component; and correcting depth values of pixels that correspond to the dummy area in the depth map, the pixels that correspond to the dummy area each having a same pixel value.