1. A device for generating depth information, comprising: a plurality of light sources, wherein each light source of the plurality of light sources emits a corresponding intensity light, and intensities of corresponding intensity lights emitted by the plurality of light sources are different from each other; an image capture unit; a control unit coupled to the plurality of light sources and the image capture unit for controlling the each light source of the plurality of light sources to emit the corresponding intensity light in turn, and controlling the image capture unit to capture a plurality of images corresponding to the plurality of light sources and controlling the image capture unit to capture a background image corresponding to all the plurality of light sources being turned off; and a processing unit coupled to the image capture unit for performing a first subtraction operation of a plurality of subtraction operations to generate a plurality of difference images according to each image of the plurality of images corresponding to the plurality of light sources and the background image, and performing a second subtraction operation of the plurality of subtraction operations to generate a depth information of a plurality of depth information corresponding to the each light source according to two adjacent difference images of the plurality of difference images corresponding to the each light source.