An electronic device comprising: a storage configured to store information on an object of interest, the information including a pixel value of the object of interest; a first image sensor and a second image sensor; and a processor configured to: alternately perform a first capture mode, in which a plurality of captured images (405, 410) are obtained by controlling an exposure time of the first image sensor to a first exposure time and controlling an exposure time of the second image sensor to a second exposure time, and a second capture mode, in which a plurality of captured images (415, 420) are obtained by controlling the exposure time of the first image sensor and the exposure time of the second image sensor to the first exposure time, generate a high dynamic range image by compositing a plurality of captured images having different brightness, obtained in the first capture mode, identify an object corresponding to the object of interest on the HDR image based on an area having a pixel value similar to the pixel value of the object of interest a pixel value stored in the storage, and obtain distance information about the identified object based on a parallax between the plurality of captured images obtained in the second capture mode, and wherein the processor is further configured to: update the first exposure time so that an average pixel value of pixels included in at least one previous image obtained by the first image sensor corresponds to a first target value, and update the second exposure time so that an average pixel value of pixels included in at least one previous image obtained by the second image sensor in the first capture mode corresponds to a second target value, and wherein the second target value is higher than the first target value. a storage configured to store information on an object of interest, the information including a pixel value of the object of interest; a first image sensor and a second image sensor; and a processor configured to: alternately perform a first capture mode, in which a plurality of captured images (405, 410) are obtained by controlling an exposure time of the first image sensor to a first exposure time and controlling an exposure time of the second image sensor to a second exposure time, and a second capture mode, in which a plurality of captured images (415, 420) are obtained by controlling the exposure time of the first image sensor and the exposure time of the second image sensor to the first exposure time, generate a high dynamic range image by compositing a plurality of captured images having different brightness, obtained in the first capture mode, identify an object corresponding to the object of interest on the HDR image based on an area having a pixel value similar to the pixel value of the object of interest a pixel value stored in the storage, and obtain distance information about the identified object based on a parallax between the plurality of captured images obtained in the second capture mode, and wherein the processor is further configured to: update the first exposure time so that an average pixel value of pixels included in at least one previous image obtained by the first image sensor corresponds to a first target value, and update the second exposure time so that an average pixel value of pixels included in at least one previous image obtained by the second image sensor in the first capture mode corresponds to a second target value, and wherein the second target value is higher than the first target value. alternately perform a first capture mode, in which a plurality of captured images (405, 410) are obtained by controlling an exposure time of the first image sensor to a first exposure time and controlling an exposure time of the second image sensor to a second exposure time, and a second capture mode, in which a plurality of captured images (415, 420) are obtained by controlling the exposure time of the first image sensor and the exposure time of the second image sensor to the first exposure time, generate a high dynamic range image by compositing a plurality of captured images having different brightness, obtained in the first capture mode, identify an object corresponding to the object of interest on the HDR image based on an area having a pixel value similar to the pixel value of the object of interest a pixel value stored in the storage, and obtain distance information about the identified object based on a parallax between the plurality of captured images obtained in the second capture mode, and wherein the processor is further configured to: update the first exposure time so that an average pixel value of pixels included in at least one previous image obtained by the first image sensor corresponds to a first target value, and update the second exposure time so that an average pixel value of pixels included in at least one previous image obtained by the second image sensor in the first capture mode corresponds to a second target value, and wherein the second target value is higher than the first target value. update the first exposure time so that an average pixel value of pixels included in at least one previous image obtained by the first image sensor corresponds to a first target value, and update the second exposure time so that an average pixel value of pixels included in at least one previous image obtained by the second image sensor in the first capture mode corresponds to a second target value, and wherein the second target value is higher than the first target value.