1. An image processing apparatus comprising: pixel selecting means for selecting pixel values that are provided at each of pixel positions in input images which are arranged in chronological sequence, each of the pixel values being included in a corresponding one of the input images, on the basis of an input image to be processed that is set in the middle of the sequence; moving-object detecting means for detecting a moving object using the selected pixel values, and producing information items concerning the moving object as moving-object information items; and output-image generating means for generating pixel values of an output image, each of the pixel values being generated for a corresponding one of the pixel positions by using, in accordance with a corresponding one of the moving-object information items, a corresponding one of pixel values of the input image to be processed.