An imaging device according to an aspect of the present disclosure is provided with: a light source that, in operation, emits pulsed light including components of different wavelengths; an encoding element that has regions each having different light transmittance, through which incident light from a target onto which the pulsed light has been irradiated is transmitted; a spectroscopic element that, in operation, causes the incident light transmitted through the regions to be dispersed into light rays in accordance with the wavelengths; and an image sensor that, in operation, receives the light rays dispersed by the spectroscopic element.