Electronic device and method for capturing an image

An electronic device for photographing an image comprises: a lens; an image sensing module in which each pixel includes a plurality of photo diodes; a lens driving module for moving the lens from a first position to a second position; and a processor for generating the image based on a first light receiving amount measured in each of the photo diodes at the first position, and a second light receiving amount measured in each of the photo diodes at the second position. Therefore, the electronic device can provide a higher resolution image even by using the existing two photo diodes.