An imaging device includes a light source, an image sensor, and a controller. Each pixel of the image sensor includes first and second accumulators and a discharger. The controller, while a component of light from the light source reflected by the surface of a target is incident on the image sensor, causes the accumulators to accumulate signal charge not discharged to the discharger, by setting the image sensor so that signal charge is discharged to the discharger, while a component having scattered inside the target is incident on the image sensor, causes the first accumulator to accumulate signal charge by setting the image sensor so that signal charge is not discharged to the discharger and signal charge is accumulated in the first accumulator, and causes the image sensor to generate first and second signals that are respectively based on signal charge accumulated in the first and second accumulators.