An imaging device that measures a distance Z to an object by applying light to and receiving reflected light from the object, the imaging device comprising: a controller that outputs a light emission control signal and an exposure control signal with a frame rate, each frame period including a A0 light emission/exposure period in which the light emission state and the exposure state are synchronous, a A1 light emission/exposure period in which the exposure state starts when the light emission state ends, and a A2 light emission/exposure period in which only exposure operation is performed without performing light emission operation; a light source that applies the light at a timing according to the light emission control signal; a light receiver including a solid-state imaging element that performs exposure to the reflected light from the object resulting from the applied light at a plurality of different timings according to the exposure control signal, and outputs a plurality of exposure signals generated as a result of the exposure at the plurality of different timings; and a calculator that receives the plurality of exposure signals and calculates the distance Z based on the expression Z=(A1-A2)/(A0+A1-2A2) where A0, A1 and A2 are exposure signals detected in the A0, A1, and A2 light emission/exposure periods and integrated over one frame period, characterized in that in one frame period, the A0 light emission/exposure period, the A1 light emission/exposure period, and the A2 light emission/exposure period are divided and arranged into N sets of divided A0, A1 and A2 light emission/exposure periods, N being a natural number of 2 or more; the controller outputs the light emission control signal and the exposure control signal for modulating at least one of: - a length of each of the divided A0, A1, and A2 light emission/exposure periods, and - a repetition sequence of the divided A0, A1, and A2 light emission/exposure periods, the modulation being performed randomly or in conformity with a specific rule, so as to uniformize an interference light component included in each of said A0, A1, and A2 exposure signals used to calculate the distance. a controller that outputs a light emission control signal and an exposure control signal with a frame rate, each frame period including a A0 light emission/exposure period in which the light emission state and the exposure state are synchronous, a A1 light emission/exposure period in which the exposure state starts when the light emission state ends, and a A2 light emission/exposure period in which only exposure operation is performed without performing light emission operation; a light source that applies the light at a timing according to the light emission control signal; a light receiver including a solid-state imaging element that performs exposure to the reflected light from the object resulting from the applied light at a plurality of different timings according to the exposure control signal, and outputs a plurality of exposure signals generated as a result of the exposure at the plurality of different timings; and a calculator that receives the plurality of exposure signals and calculates the distance Z based on the expression Z=(A1-A2)/(A0+A1-2A2) where A0, A1 and A2 are exposure signals detected in the A0, A1, and A2 light emission/exposure periods and integrated over one frame period, characterized in that in one frame period, the A0 light emission/exposure period, the A1 light emission/exposure period, and the A2 light emission/exposure period are divided and arranged into N sets of divided A0, A1 and A2 light emission/exposure periods, N being a natural number of 2 or more; the controller outputs the light emission control signal and the exposure control signal for modulating at least one of: - a length of each of the divided A0, A1, and A2 light emission/exposure periods, and - a repetition sequence of the divided A0, A1, and A2 light emission/exposure periods, - a length of each of the divided A0, A1, and A2 light emission/exposure periods, and - a repetition sequence of the divided A0, A1, and A2 light emission/exposure periods, the modulation being performed randomly or in conformity with a specific rule, so as to uniformize an interference light component included in each of said A0, A1, and A2 exposure signals used to calculate the distance.