1. An image processing apparatus, comprising: an ambient-light image obtaining section configured to obtain an ambient-light image in a first time range, the ambient-light image being an image of an object captured with a predetermined exposure time; a cumulative image generation section configured to generate a cumulative image in a second time range after the first time range, the cumulative image being obtained by cumulative addition of each pixel value in a plurality of images, the plurality of images being of the object captured one by one with the predetermined exposure time; and a high-quality image generation section configured to generate a high-quality image, the high-quality image being obtained by subtracting a pixel value in the ambient-light image from a corresponding pixel value in a normalized image, the normalized image being the cumulative image normalized based on a total sum of the exposure time.