1. An imaging device comprising: an imaging optical system that includes a first optical system and a second optical system having a common optical axis and having different focal lengths; an imaging element that includes a first sensor group selectively receiving light passing the first optical system and a second sensor group selectively receiving light passing the second optical system; and an image generating unit that generates a first generated image on the basis of a first captured image output from the first sensor group and generates a second generated image on the basis of a second captured image output from the second sensor group, wherein the image generating unit has an image compositing unit, and the image compositing unit generates the first generated image by performing registration on a plurality of the first captured images captured in different states of the optical axis of the first optical system and by compositing the registrated plurality of first captured images, and generates the second generated image by performing registration on a plurality of the second captured images captured in different states of the optical axis of the second optical system and by compositing the registrated plurality of second captured images.