Patent ID: 8611648

Claim:
A foreground region extraction apparatus, comprising: a display control means for causing an image to be displayed; an acceptance means for accepting designation of at least one foreground pixel in a foreground region contained in the displayed image and at least one background pixel in a background region contained in the image, from a user; a divided color space identification means for performing divided color space identification processing to identify, from among a plurality of divided color spaces created by a three-dimensional color space being divided, the divided color space to which, after the designated foreground pixel and the designated background pixel each being set as a reference pixel, each of the reference pixels belongs, as a reference divided color space; a color distance calculation means for performing color distance calculation processing to calculate a color distance in the color space between each of the reference pixels and an adjacent pixel adjacent thereto; a belonging judgment means for performing belonging judgment processing to judge whether each of the adjacent pixels belongs to each of the reference divided color spaces; a cost calculation means for performing cost calculation processing to calculate a cost of each of the adjacent pixels, based on the color distance calculated for each of the adjacent pixels, and weights based on whether to belong to the reference divided color space judged for each of the adjacent pixels; and a determination means for performing determination processing to determine the adjacent pixel having the lowest calculated cost as a foreground pixel or a background pixel, wherein the determined adjacent pixel is set as a reference pixel to repeatedly perform the color distance calculation processing, the belonging judgment processing, the cost calculation processing, and the determination processing to extract the foreground region from the image.