As a technique for protecting privacy of a person who appears as an object in an image, image processing that is to put a mosaic on a region representing the face of the person in the image in order to inhibit the person from being identified or is to put a rectangular mask on a region representing the eyes of the person is known. It is, however, clear at a glance that the image that is subjected to the image processing has been processed. The image makes an unnatural impression on a person who views the image.
To solve this, Japanese Laid-open Patent Publication No. 2008-204466, “Patrick Perez, Michel Gangnet, Andrew Blake, “Poisson Image Editing”, Microsoft Research UK, 2003”, and “P. Viola and M. Jones, “Rapid object detection using a boosted cascade of simple features,” in Proc. IEEE Computer Vision and Pattern Recognition, pp. I—511-I—518, 2001” have proposed a technique for solving a Poisson's equation using gradient information of a mask image and an edge (synthesis boundary with the mask image) of a synthesis target region such as a facial region included in an image as a boundary requirement and thereby synthesizing the mask image with the synthesis target region. In this technique, an arbitrary initial value image is provided for the synthesized target region, a calculation is repeatedly executed until differences between the initial value image and pixels become values satisfying the gradient information of the mask image and the boundary requirement for the edge, and whereby a synthesis result image that corresponds to a result obtained by synthesizing the mask image with the synthesis target region is generated.
If the synthesis target region is a facial region, an image that represents another person's face and an image that represents the average of faces of people may be used as the mask image. As the initial value image, a whole white image or a whole black image is used.