An electronic device including an eye tracking sensor configured to detect viewing direction of eye of a user; a camera; a tilting unit configured to adjust a direction of the camera; a memory; and a processor configured to obtain information about a gaze point of the user; determine a region of interest (ROI) based on the information about the gaze point; obtain two or more images including the ROI at different tilt angles; and determine depth information of the ROI by using the obtained two or more images.