1. An image generating method comprising: irradiating a light with a predetermined wavelength to a target object at a predetermined interval; passing a light having a wavelength required to generate a color image from among lights reflected from the target object and detecting color values according to the passed light; generating a depth image of the target object using color values detected during a period in which the light with the predetermined wavelength is irradiated; and generating the color image of the target object using color values detected during a period other than the period in which the light with the predetermined wavelength is irradiated.