Patent ID: 8660344

Claim:
An image processing apparatus comprising: an obtaining section which obtains a subject existing image in which a subject and a background exist; a first specification section which specifies a plurality of image regions in the subject existing image; an estimation section which estimates a background color of the subject existing image, wherein the estimation section judges, for each of a plurality of blocks of the subject existing image, whether or not a given block of the blocks has a similarity in representative color to another block of the blocks that is equal to or more than a predetermined judgment value, and estimates the representative color of the given block as the estimated background color when the given block is judged to have the similarity in the representative color a most number of times among all of the blocks; a comparison section which compares a representative color of each of the image regions with a predetermined color, wherein the comparison section uses the estimated background color as the predetermined color, and calculates, for each of the image regions specified by the first specification section, a similarity between the representative color of the image region and the estimated background color; a generation section which generates an extraction-use background color based on a comparison result of the comparison section; and a second specification section which specifies a subject constituent region constituting the subject and a background constituent region constituting the background in the subject existing image based on the extraction-use background color.