A mobile terminal, comprising: a camera; a lighting device; and a controller to control the camera and the lighting device, wherein the lighting device comprises: a printed circuit board; a light emitting element provided on the printed circuit board to emit light of a specific pattern; a diffractive optical element to diffract a part of light emitted from the light emitting element; a lens through which light diffracted by the diffractive optical element is incident on a subject; and a driving unit configured to: move the diffractive optical element a first distance from the light emitting element such that the light incident through the lens is irradiated as a first light pattern to the subject, and move the diffractive optical element a second distance from the light emitting element such that the light incident through the lens is irradiated as a second light pattern to the subject, wherein the controller is configured to extract depth information related to an image received through the camera using the first light pattern and the second light pattern irradiated on the subject, wherein the first light pattern and the second light pattern are different from each other, wherein the controller is configured to drive the driving unit of the lighting device in a preset manner when capturing the image through the camera, and wherein the controller is configured to control the driving unit of the lighting device so that the diffractive optical element of the lighting device is moved a plurality of times while capturing one image frame through the camera. a camera; a lighting device; and a controller to control the camera and the lighting device, wherein the lighting device comprises: a printed circuit board; a light emitting element provided on the printed circuit board to emit light of a specific pattern; a diffractive optical element to diffract a part of light emitted from the light emitting element; a lens through which light diffracted by the diffractive optical element is incident on a subject; and a driving unit configured to: move the diffractive optical element a first distance from the light emitting element such that the light incident through the lens is irradiated as a first light pattern to the subject, and move the diffractive optical element a second distance from the light emitting element such that the light incident through the lens is irradiated as a second light pattern to the subject, wherein the controller is configured to extract depth information related to an image received through the camera using the first light pattern and the second light pattern irradiated on the subject, wherein the first light pattern and the second light pattern are different from each other, wherein the controller is configured to drive the driving unit of the lighting device in a preset manner when capturing the image through the camera, and wherein the controller is configured to control the driving unit of the lighting device so that the diffractive optical element of the lighting device is moved a plurality of times while capturing one image frame through the camera. a printed circuit board; a light emitting element provided on the printed circuit board to emit light of a specific pattern; a diffractive optical element to diffract a part of light emitted from the light emitting element; a lens through which light diffracted by the diffractive optical element is incident on a subject; and a driving unit configured to: move the diffractive optical element a first distance from the light emitting element such that the light incident through the lens is irradiated as a first light pattern to the subject, and move the diffractive optical element a second distance from the light emitting element such that the light incident through the lens is irradiated as a second light pattern to the subject, wherein the controller is configured to extract depth information related to an image received through the camera using the first light pattern and the second light pattern irradiated on the subject, wherein the first light pattern and the second light pattern are different from each other, wherein the controller is configured to drive the driving unit of the lighting device in a preset manner when capturing the image through the camera, and wherein the controller is configured to control the driving unit of the lighting device so that the diffractive optical element of the lighting device is moved a plurality of times while capturing one image frame through the camera. move the diffractive optical element a first distance from the light emitting element such that the light incident through the lens is irradiated as a first light pattern to the subject, and move the diffractive optical element a second distance from the light emitting element such that the light incident through the lens is irradiated as a second light pattern to the subject, wherein the controller is configured to extract depth information related to an image received through the camera using the first light pattern and the second light pattern irradiated on the subject, wherein the first light pattern and the second light pattern are different from each other, wherein the controller is configured to drive the driving unit of the lighting device in a preset manner when capturing the image through the camera, and wherein the controller is configured to control the driving unit of the lighting device so that the diffractive optical element of the lighting device is moved a plurality of times while capturing one image frame through the camera.