1. An image processing device comprising: an affinity calculating unit that handles each pixel in an image or each region including a plurality of pixels joined together, as a unit component, and determines a first affinity between each of the unit components and one of the unit components which is located in a periphery region of the image; a foreground region identifying unit that identifies, as a foreground region, a region made up of one or more of the unit components whose first affinities calculated by the affinity calculating unit are lower than a preset threshold; and a saliency measure output unit that determines a second affinity between each of the unit components in the image and the foreground region identified by the foreground region identifying unit, and outputs the second affinity as a saliency measure for each unit component.