1. An image processing apparatus comprising: a region extractor for extracting a foreground region and a background region that do not overlap each other, from within an input image of a plurality of input images captured at different times; a statistics calculator for calculating a foreground statistic, which is a statistic with respect to a distribution of image values in the foreground region extracted by the region extractor, and a background statistic, which is a statistic with respect to a distribution of image values in the background region extracted by the region extractor; and an image corrector for correcting image values of the input images based on the foreground statistics and the background statistics which are obtained by processing the input images sequentially with the region extractor and the statistics calculator.