An edge extracting unit 66 of a contour image generator 22 generates an edge image of an input image 62 using an edge extraction filter, etc. A foreground processing unit 68 extracts the foreground from the input image 62 using a background image 64 and expands the foreground to generate an expanded foreground image. The foreground processing unit 68 further generates a foreground boundary image constructed of the boundary of the expanded foreground region. A mask unit 70 masks the edge image using the expanded foreground image to eliminate edges in the background. A synthesis unit 72 synthesizes the masked edge image and the foreground boundary image to generate a contour image.