1. An image processing device comprising: a pixel value determining section which determines pixel values of background pixels of a target image to be segmented into a foreground and a background; a first determination section which determines pixels of the target image having pixel values equivalent to the pixel values of the background pixels, as a portion of the background pixels; and a second determination section which repeatedly performs processing in which other background pixels and foreground pixels of the target image are determined by use of a pixel value of each pixel in the target image and positional information of the portion of the background pixels, and the background pixels and the foreground pixels of the target image are estimated with a predetermined accuracy, and the background pixels and the foreground pixels of the target image are determined with a higher accuracy by use of an estimated estimation result.