Image processing apparatus and its program

The image processing apparatus synthesizes mask images onto face images using landmark detection and triangle division, addressing the limitations of existing methods to enhance face detection and recognition accuracy.

JP7713371B2Active Publication Date: 2025-07-25NIPPON HOSO KYOKAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2021179122
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2025-07-25
Estimated Expiration
2041-11-02

AI Technical Summary

Technical Problem

Existing methods for generating face images with masks are either artificial and unnatural, or require high preliminary effort and cost, limiting the accuracy and variability of face detection and recognition models.

Method used

An image processing apparatus that synthesizes a mask image onto a face image without a mask using landmark detection, triangle division, key image generation, and mask image composition, ensuring the mask aligns with the face's size and shape.

Benefits of technology

Generates highly accurate learning data for face detection and recognition models by creating realistic mask-wearing images from non-mask-wearing images, improving model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007713371000003
    Figure 0007713371000003
  • Figure 0007713371000004
    Figure 0007713371000004
  • Figure 0007713371000005
    Figure 0007713371000005
Patent Text Reader

Abstract

To provide an image processing device that generates a face image in which a mask image is superimposed on a mask-unworn face image.SOLUTION: An image processing device 1 comprises: a landmark detection unit 10 for detecting a predetermined number of landmarks that constitute the feature points of the lower half contour and nose of a face from a mask-unworn image and a mask-wearing image; a triangle divide unit 11 for dividing the landmarks into triangles and generating a vertex set of triangles; a key image generation unit 12 for generating a key image in which the triangles of the mask-unworn image are painted in a special color; a mask image generation unit 13 for converting, for each vertex set of the triangles in the mask-wearing image, an image piece enclosed with the vertex set into a triangle image piece of the mask-unworn image to which the landmarks correspond and generating a mask image; and a mask image synthesis unit 16 for superimposing the region of the mask image specified by the specific color of the key image on the mask-unworn image.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image processing apparatus and a program thereof for processing a face image without wearing a mask into a face image with a mask.

Background Art

[0002] In recent years, due to the influence of the novel coronavirus infection and the like, the opportunity to wear a mask has increased. Due to this influence, in face detection technology for determining whether a face is reflected in an image and face recognition technology for determining who the face reflected in the image is, it has become necessary to deal with images with a mask worn. Conventionally, as a technique for the purpose of expanding learning data in machine learning, there is a technique for generating a model corresponding to concealment by filling an arbitrary region of an image with a rectangular region and learning the image, for example, Random Erasing (see Non-Patent Document 1), Cutout (see Non-Patent Document 2) and other techniques.

[0003] Also, as a technique for the purpose of dealing with concealment in face detection and face recognition, there is a technique for generating an image wearing glasses or sunglasses from a face image by GAN (Generative Adversarial Networks) (see Non-Patent Document 3).

[0004] In addition, a dataset specialized for face images wearing a mask (LFW Simulated Masked Face Dataset) has been published (see Non-Patent Document 4). This dataset is for the purpose of face recognition of people wearing a mask, and is a group of images in which a face image wearing a mask is pseudo-generated by superimposing a mask image on a face image.

Prior Art Documents

Non-Patent Documents

[0005]

Non-Patent Document 1

[0006] The techniques described in Non-Patent Documents 1 and 2 have a simple processing method with a rectangular hidden area, but since it is clearly artificial processing, it is different in nature from masking of face images. Therefore, even if a partially painted face image used in this technique is used as learning data for machine learning, the improvement in the accuracy of detecting and recognizing a face wearing a mask is limited.

[0007] The technology described in Non-Patent Document 3 does not process the original image, but generates a new image using a neural network. Therefore, this technology may generate unnatural noise or distortion in the generated image, or generate an image that does not match the nature of the original person, and cannot be used as learning data for face detection and recognition.

[0008] Since the dataset described in Non-Patent Document 4 simply overlays the mask image, the difference from the real image is large. In addition, since this dataset has few mask variations, it is highly likely that it cannot handle masks of colors and shapes not included in the dataset. In addition, a method of creating a high-precision 3D model of the mask in advance, estimating or measuring the head pose and depth of the face image, and superimposing the 3D model of the mask can also be considered. However, this method has the problem that the preliminary effort and the cost of image generation are high.

[0009] In view of such problems, the present invention has been made, and an object thereof is to provide an image processing apparatus and a program thereof capable of generating a face image in which a mask image is synthesized according to the size and shape of the face in a face image of a person not wearing a mask.

Means for Solving the Problems

[0010] In order to solve the above problems, an image processing apparatus according to the present invention is an image processing apparatus that generates a mask composite image in which a mask is superimposed on a person in an image of a person not wearing a mask, from an image of a person not wearing a mask that is a face image of a person not wearing a mask and an image of a person wearing a mask that is a face image of a person wearing a mask, and is configured to include a landmark detection unit, a triangle division unit, a key image generation unit, a mask image generation unit, and a mask image composite unit.

[0011] In such a configuration, the image processing apparatus detects a predetermined number of landmarks that are the contours of the lower half of the face and the feature points of the nose from the non-mask-wearing image and the mask-wearing image based on a pre-trained learned model or the like by the landmark detection unit. As a result, it is possible to generally identify the area where the mask is to be synthesized in the non-mask-wearing image and the area where the mask is worn in the mask-wearing image.

[0012] Furthermore, the image processing apparatus divides, by the triangle division unit, the point set of the landmarks detected in the mask-wearing image into triangles having each point of the landmarks as vertices by Delaunay triangulation, and generates a vertex set of a plurality of triangles. Then, the image processing apparatus generates, by the key image generation unit, a key image that is a chroma key in which the regions of the plurality of triangles of the non-mask-wearing image corresponding to the landmarks in the vertex sets of the plurality of triangles are a specific color and the other regions are colors other than the specific color.

[0013] Also, the image processing apparatus converts, by the mask image generation unit, for each vertex set of the plurality of triangles in the mask-wearing image, the image piece surrounded by the vertex set into the image piece of the triangle of the non-mask-wearing image corresponding to the landmark. As a result, a mask image adapted to the face of the person in the non-mask-wearing image can be generated.

[0014] Then, the image processing apparatus superimposes, by the mask image synthesis unit, the region of the mask image specified by the specific color of the key image on the non-mask-wearing image. As a result, a mask composite image in which the person in the non-mask-wearing image wears a mask can be generated. Note that the image processing apparatus can be operated by an image processing program for causing a computer to function as the above-described respective units.

Advantages of the Invention

[0015] The present invention has the following excellent effects. According to the present invention, an image of a mask in an arbitrary mask-wearing image can be synthesized with a non-mask-wearing image according to the size and shape of the face. Thereby, the present invention can generate highly accurate learning data in machine learning for detecting and recognizing a face from a face image wearing a mask.

Brief Description of the Drawings

[0016]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

[0017] Hereinafter, embodiments of the present invention will be described with reference to the drawings. [Configuration of Image Processing Apparatus] With reference to FIG. 1, the configuration of the image processing apparatus 1 according to an embodiment of the present invention will be described.

[0018] The image processing apparatus 1 generates a mask composite image in which a mask is superimposed on a person in the mask-unworn image from a mask-unworn image which is a face image of a person not wearing a mask and a mask-worn image which is a face image of a person wearing a mask.

[0019] An example of an image input and output by the image processing apparatus 1 is shown in FIG. 2. The mask-unworn image 100 is a face image of a person not wearing a mask. The mask-unworn image 100 is an image to be processed in the image processing apparatus 1. The mask-worn image 200 is a face image of a person wearing the mask M. The image of the mask M (mask image) in the mask-worn image 200 is used as an image to be synthesized with the person in the mask-unworn image 100. The person in the face image of the mask-worn image 200 may be the same person as the person in the face image of the mask-unworn image 100, or may be a different person. Note that the mask-worn image 200 is preferably a front image of a person wearing the mask M so that the pattern, shape, etc. of the mask M can be recognized.

[0020] The mask composite image 300 is a face image obtained by compositing (superimposing) the image of the mask M of the mask-wearing image 200 on the mask-unworn image 100 according to the size and shape of a person. The mask composite image 300 is an image generated by the image processing device 1.

[0021] As shown in FIG. 1, the image processing device 1 includes a landmark detection unit 10, a triangular division unit 11, a key image generation unit 12, a mask image generation unit 13, a key image correction unit 14, a mask image processing unit 15, and a mask image composite unit 16.

[0022] The landmark detection unit 10 (10A, 10B) detects a predetermined number of landmarks that are the contours of the lower half of the face and the feature points of the nose from the mask-unworn image 100 and the mask-wearing image 200. Landmarks are feature points on the face image, such as the contours of the face, eyes, mouth, nose, etc. The landmark detection unit 10 uses the contours of the lower half of the face and the feature points of the nose as landmarks. For the detection of landmarks performed by the landmark detection unit 10, a conventional general method may be used. For example, a learned model (http: / / dlib.net / files / ) that has been pre-trained to detect landmarks from a face image can be used to detect the facial landmarks.

[0023] As shown in FIG. 3, the landmark detection unit 10 detects the positions of a predetermined number (15 in the example of FIG. 3) of points (LM1, LM2,..., LM15) representing the feature points of the contour of the lower half of the face and a predetermined number (8 in the example of FIG. 3) of points (LM16, LM17,..., LM23) representing the feature points of the nose as landmarks LM. Here, the landmark detection unit 10 has two configurations: a landmark detection unit 10A and a landmark detection unit 10B. Of course, by processing the mask-unworn image 100 and the mask-wearing image 200 in sequence, a configuration with only one landmark detection unit 10 may also be used.

[0024] The landmark detection unit 10A detects a predetermined number of landmarks that are the contours of the lower half of the face and the feature points of the nose from the non-mask-wearing image 100. As shown in FIG. 4, the landmark detection unit 10A detects the landmark LM in the non-mask-wearing image 100. The landmark LM indicating the contours of the lower half of the face and the feature points of the nose in the non-mask-wearing image 100 can specify the approximate size and shape of the area (mask area) where the mask is to be worn. The landmark detection unit 10A associates the positions of the detected landmarks with corresponding identifiers (for example, LM1,..., LM23 in FIG. 3) and outputs them to the key image generation unit 12 and the mask image generation unit 13.

[0025] The landmark detection unit 10B detects a predetermined number of landmarks that are the contours of the lower half of the face and the feature points of the nose from the mask-wearing image 200. As shown in FIG. 5, the landmark detection unit 10B detects the landmark LM in the mask-wearing image 200. The landmark LM indicating the contours of the lower half of the face and the feature points of the nose in the mask-wearing image 200 can specify the approximate size and shape of the area (mask area) where the mask is being worn. The landmark detection unit 10B associates the positions of the detected landmarks with corresponding identifiers (for example, LM1,..., LM23 in FIG. 3) and outputs them to the triangle division unit 11.

[0026] The triangle division unit 11 divides the set of points of the landmarks detected in the mask-wearing image 200 into triangles with each point of the landmarks as vertices, and generates a set of vertices of a plurality of triangles. Thereby, the mask area can be treated as a set of triangular areas. For dividing the set of landmarks into triangles, a general method may be used. For example, Delaunay triangle division may be performed. Delaunay triangle division is a division method in which the circumcircle of each individual triangle does not enclose other points, and the minimum angle among the interior angles of all the divided triangles is maximized.

[0027] As shown in FIG. 6, the triangle division unit 11 divides the landmark LM detected by the landmark detection unit 10 (10B) in the mask-wearing image 200 into a plurality of triangles (Delaunay triangles) TR. As shown in FIG. 6, the triangle division unit 11 divides the mask region specified by the landmark LM by a plurality of triangles TR having different shapes and sizes. The triangle division unit 11 outputs, for each triangle, the identifier and position of the landmark corresponding to each vertex of the divided triangle to the key image generation unit 12 and the mask image generation unit 13.

[0028] The key image generation unit 12 generates a key image in which the regions of a plurality of triangles of the vertex set of the plurality of triangles generated by the triangle division unit 11 and the plurality of triangles of the maskless image 100 corresponding to the landmarks are a specific color (for example, white), and the other regions are a color other than the specific color (for example, black).

[0029] For example, as shown in FIG. 7, assume that one of the triangles constituting the mask region in the mask-wearing image 200 has landmarks LM1, LM16, and LM19 as its vertices. In this case, the key image generation unit 12 fills the region of the triangle having the landmarks LM1, LM16, and LM19 of the maskless image 100 corresponding to the landmarks LM1, LM16, and LM19 in the mask-wearing image 200 with a specific color in an image that has been filled with a color other than the specific color in advance. The same applies to the regions of other triangles.

[0030] As a result, as shown in FIG. 8, the key image generation unit 12 can generate a key image KI in which the mask region MA is a specific color (for example, white) and the other regions are a color other than the specific color (for example, black). The key image generation unit 12 outputs the generated key image to the key image correction unit 14.

[0031] The mask image generation unit 13 generates a mask image by converting, for each set of vertices of a plurality of triangles in the mask-wearing image 200, the image piece surrounded by the set of vertices into the image piece of the triangle of the maskless image 100 corresponding to the landmark. Here, the mask image generation unit 13 generates a mask image by performing an affine transformation on each image piece of a triangle in the mask-wearing image 200 as the image piece of the corresponding landmark triangle in the maskless image 100.

[0032] For example, as shown in FIG. 7, assume that one of the triangles constituting the mask area in the mask-wearing image 200 has landmarks LM1, LM16, and LM19 as its vertices. In this case, the mask image generation unit 13 performs an affine transformation on the image piece of the triangle with landmarks LM1, LM16, and LM19 as its vertices in the mask-wearing image 200 into the image piece of the triangle with the corresponding landmarks LM1, LM16, and LM19 as its vertices in the maskless image 100. The same applies to the image pieces of other triangles.

[0033] As a result, as shown in FIG. 9, the mask image generation unit 13 can generate a mask image MI including a mask M that matches the size and shape of the face in the maskless image 100. Here, the mask image generation unit 13 shows an example of the mask image MI generated by synthesizing the image piece after the affine transformation on the image filled with black. However, since chroma key processing is performed on the mask image MI by the mask image composition unit 16 described later, the area other than the mask M may be an arbitrary image, for example, the maskless image 100. The mask image generation unit 13 outputs the generated mask image to the key image correction unit 14 and the mask image processing unit 15.

[0034] The key image correction unit 14 corrects the key image by setting the area of the key image corresponding to the skin area within a predetermined color range in the mask image generated by the mask image generation unit 13 to a color other than the specific color.

[0035] As shown in FIG. 9, depending on the shape of the mask M, the mask image MI may include the skin area SA of a person. Similarly, the key image KI (FIG. 8) may also include the skin area SA of a person in the mask area MA. The key image correction unit 14 generates a corrected key image (corrected key image) by excluding from the key image KI the area corresponding to the skin area SA of the mask image MI.

[0036] Specifically, in the color system of the mask image MI (RGB color system, HSV color system, etc.), the key image correction unit 14 sets the pixel value of the key image KI corresponding to the pixels whose pixel values are within a predetermined range as the skin color to a color other than a specific color (for example, black).

[0037] For example, when the mask image MI is in the RGB color system, the key image correction unit 14 pre-sets a threshold value for the R value (lower limit T r- , upper limit T r+ ), a threshold value for the G value (lower limit T g- , upper limit T g+ ), and a threshold value for the B value (lower limit T b- , upper limit T b+ ). Then, the key image correction unit 14 determines that the pixels of the mask image MI whose pixel values RGB satisfy the following formula (1) correspond to the pixels of the skin, and sets the pixel value at the pixel position of the key image KI to a color other than a specific color (for example, black).

[0038]

Equation

[0039] As a result, the key image correction unit 14 can generate the corrected key image CKI shown in FIG. 10 by excluding from the key image KI illustrated in FIG. 8 the pixels corresponding to the skin area SA of FIG. 9 from the mask area MA. The key image correction unit 14 outputs the corrected key image CKI to the mask image synthesis unit 16.

[0040] The mask image processing unit 15 processes the mask image generated by the mask image generation unit 13 to generate mask images of a plurality of patterns. Here, the mask image processing unit 15 generates a plurality of mask images by performing various processes on one mask image. The process in this mask image processing unit 15 is not particularly limited. For example, the mask image processing unit 15 processes the mask image by randomly changing the hue, saturation, brightness, or contrast of the mask image, and generates a predetermined number of new mask images. Since these processes are general image processing, detailed descriptions are omitted.

[0041] For example, the mask image processing unit 15 generates mask images MI1, MI2, and MI3 with different brightnesses from the mask image MI illustrated in FIG. 9 as shown in FIGS. 11(a) to (c). Further, the mask image processing unit 15 may process the mask image by applying a smoothing filter or a sharpening filter to the mask image, adding noise (such as Gaussian noise), or the like. Thereby, the mask image processing unit 15 can generate a wide variety of mask images from one mask image. The mask image processing unit 15 outputs the generated mask image to the mask image composition unit 16.

[0042] The mask image composition unit 16 generates a mask composite image by superimposing the region of the mask image specified by the specific color of the key image on the maskless image. Here, the mask image composition unit 16 uses the key image corrected by the key image correction unit 14 as a chroma key from the mask image processed by the mask image processing unit 15, and generates a mask composite image by synthesizing only the image of the mask region with the maskless image.

[0043] Here, let the key image (corrected key image) corrected by the key image correction unit 14 be α(x, y), the mask image generated by the mask image processing unit 15 be f(x, y), and the mask-unworn image be g(x, y). When the pixel values of the key image α(x, y) are "0 (other than the specific color)" and "1 (specific color)", the mask image synthesis unit 16 generates a mask composite image h(x, y) according to the following formula (2).

[0044]

Equation

[0045] The mask image synthesis unit 16 generates as many mask composite images 300 as the number of mask images generated by the mask image processing unit 15 for the mask-unworn image 100. For example, when the mask images generated by the mask image processing unit 15 are the three mask images MI1, MI2, and MI3 shown in FIG. 11, the mask image synthesis unit 16 generates three mask composite images 300 (301, 302, 303) for one mask-unworn image 100 as shown in FIG. 12.

[0046] As described above, the image processing apparatus 1 can synthesize the mask of the face image with the mask worn (mask-worn image 200) on the mask-unworn face image (mask-unworn image 100) according to the size and shape of the face. Further, the image processing apparatus 1 can generate a plurality of mask composite images 300 with different masks worn for one mask-unworn image 100.

[0047] Also, the image processing apparatus 1 can generate mask composite images 300 (304, 305, 306) in which the same person wears masks of different patterns and shapes as shown in FIG. 13 by fixing the mask-unworn image 100 and replacing the mask-worn image 200.

[0048] Thereby, the image processing apparatus 1 can easily generate a large amount of training data in machine learning for performing face detection and recognition on the face image with the mask worn. Note that the image processing apparatus 1 can be operated by a program (image processing program) that causes a computer to function as each of the above-described units.

[0049] [Operation of Image Processing Apparatus] Next, with reference to FIG. 14 (for the configuration, refer to FIG. 1 as appropriate), the operation of the image processing apparatus 1 according to an embodiment of the present invention will be described.

[0050] In step S1, the landmark detection unit 10 detects a predetermined number of landmarks that are the contours of the lower half of the face and the feature points of the nose from the non-mask-wearing image 100 and the mask-wearing image 200, respectively. Here, the landmark detection unit 10A detects landmarks from the non-mask-wearing image 100, and the landmark detection unit 10B detects landmarks from the mask-wearing image 200 (see FIGS. 4 and 5).

[0051] In step S2, the triangle division unit 11 divides the set of points of the landmarks detected in step S1 into triangles having each point of the landmarks as vertices. Here, the triangle division unit 11 divides the landmarks detected by the landmark detection unit 10B into Delaunay triangles (see FIG. 6).

[0052] In step S3, the key image generation unit 12 generates a key image in which the vertex sets of the plurality of triangles generated in step S2 and the regions of the plurality of triangles of the non-mask-wearing image 100 corresponding to the landmarks are a specific color (for example, white), and the other regions are a color other than the specific color (for example, black) (see FIG. 8).

[0053] In step S4, the mask image generation unit 13 affine-transforms the image pieces of the triangles of the landmarks of the mask-wearing image 200 divided in step S3 into the shapes of the triangles of the landmarks of the corresponding non-mask-wearing image 100 to generate image pieces of the mask image.

[0054] In step S5, the mask image generation unit 13 makes an end determination based on whether or not affine transformation has been performed on all the triangles of the landmarks of the masked image 200 divided in step S3. Here, if affine transformation has not yet been performed on all the triangles (No in step S5), the mask image generation unit 13 returns to step S4 and repeats the generation of image pieces of the mask image by affine transformation.

[0055] On the other hand, if affine transformation has been performed on all the triangles (Yes in step S5), that is, if the generation of the mask image is completed, the process proceeds to step S6. In step S6, the key image correction unit 14 generates a corrected key image by excluding the region corresponding to the skin region of the mask image (see FIG. 9) from the key image generated in step S3 (see FIG. 10).

[0056] In step S7, the mask image processing unit 15 processes the mask images generated in steps S4 and S5 to generate a plurality of pattern mask images (see FIG. 11). In step S8, the mask image synthesis unit 16 synthesizes only the image of the mask region into the non-masked image using the corrected key image in step S6 as a chroma key from the mask images processed in step S7. Here, the mask image synthesis unit 16 generates a plurality of mask composite images by superimposing the mask regions of the plurality of pattern mask images processed in step S7 on the non-masked image (see FIG. 12).

[0057] Through the above operations, the image processing apparatus 1 can synthesize the mask of the face image with the mask worn (masked image 200) onto the face image without the mask (non-masked image 100) according to the size and shape of the face.

[0058] The configuration and operations of the image processing apparatus 1 according to the embodiment of the present invention have been described above, but the present invention is not limited to this embodiment. Here, the image processing apparatus 1 includes the mask image processing unit 15. However, when generating one mask composite image 300 from one unmasked image 100, the mask image processing unit 15 may be omitted. However, when the purpose is to generate learning data for machine learning, it is preferable that the image processing apparatus 1 includes the mask image processing unit 15 to generate a mask composite image 300 with a rich variety of variations.

[0059] Also, here, the image processing apparatus 1 is configured to include the key image correction unit 14, but a simple configuration in which the key image correction unit 14 is omitted may also be acceptable.

[0060] Also, here, the number of people in the unmasked image 100 is set to one. However, the unmasked image 100 may be an image in which a plurality of unmasked people are shown.

[0061] In that case, the landmark detection unit 10A detects a set of a predetermined number of landmarks that are the lower half contour of the face and the feature points of the nose for each of the plurality of people. Then, the key image generation unit 12 specifies a region (mask region) to wear a mask for each set of the person's landmarks, and generates a key image with the plurality of mask regions in a specific color (for example, white) and the other regions in a color other than the specific color (for example, black). Also, the mask image generation unit 13 performs an affine transformation on the image pieces of the mask image of the masked image 200 for each set of the person's landmarks to generate a mask image including a plurality of masks.

[0062] Regarding the key image correction unit 14, the mask image processing unit 15, and the mask image synthesis unit 16, the correction target, the processing target, and the synthesis target are only the plurality of mask regions, and the functions are the same as those described with reference to FIG. 1.

[0063] As a result, even when, for example, as shown in FIG. 15, two unmasked persons are shown in the unmasked image 100, the image processing apparatus 1 can generate a mask composite image 300 in which the images of the masks M in the masked image 200 are composited with the respective persons in accordance with the sizes and shapes of the faces of the persons in the unmasked image 100.

Explanation of Signs

[0064] 1 Image processing apparatus 10 Landmark detection unit 11 Triangular division unit 12 Key image generation unit 13 Mask image generation unit 14 Key image correction unit 15 Mask image processing unit 16 Mask image composition unit 100 Unmasked image 200 Masked image 300 Mask composite image LM Landmark KI Key image MI Mask image CKI Corrected key image

Claims

1. An image processing apparatus that generates a mask composite image in which a mask is superimposed on a person in the maskless image, from a maskless image that is a face image of a person not wearing a mask and a masked image that is a face image of a person wearing a mask, comprising: a landmark detection unit that detects a predetermined number of landmarks that are the contours of the lower half of the face and feature points of the nose from the maskless image and the masked image; a triangle division unit that divides the set of points of the landmarks detected in the masked image into triangles with each point of the landmarks as vertices, and generates a set of vertices of a plurality of triangles; a key image generation unit that generates a key image in which the regions of the plurality of triangles of the masked image corresponding to the set of vertices of the plurality of triangles and the regions of the landmarks are specified colors, and the other regions are colors other than the specified color; a mask image generation unit that generates a mask image by converting an image piece surrounded by the set of vertices for each set of vertices of the plurality of triangles in the masked image into an image piece of a triangle of the maskless image corresponding to the landmark; a mask image synthesis unit that generates the mask composite image by superimposing the region of the mask image specified by the specified color of the key image on the maskless image; An image processing apparatus characterized by comprising the above.

2. The image processing apparatus according to claim 1, wherein the triangle division unit divides the set of points of the landmarks detected in the masked image into Delaunay triangles.

3. The image processing apparatus according to claim 1 or claim 2, further comprising a key image correction unit that corrects the key image by setting the region of the key image corresponding to the skin region in a predetermined color range of the mask image generated by the mask image generation unit to a color other than the specified color.

4. The image processing apparatus according to any one of claims 1 to 3, further comprising a mask image processing unit that processes the mask image generated by the mask image generation unit to generate a plurality of patterns of mask images, wherein the mask image synthesis unit generates a plurality of the mask composite images by synthesizing the plurality of patterns of mask images with the maskless image respectively.

5. The mask image processing unit processes the mask image by changing the hue, saturation, brightness, or contrast of the mask image generated by the mask image generation unit. The image processing apparatus according to claim 4, wherein the mask image processing unit processes the mask image by changing the hue, saturation, brightness, or contrast of the mask image generated by the mask image generation unit.

6. The mask image processing unit processes the mask image by applying a smoothing filter or a sharpening filter to the mask image generated by the mask image generation unit. The image processing apparatus according to claim 4 or claim 5, wherein the mask image processing unit processes the mask image by applying a smoothing filter or a sharpening filter to the mask image generated by the mask image generation unit.

7. The mask image processing unit processes the mask image by adding noise to the mask image generated by the mask image generation unit. The image processing apparatus according to any one of claims 4 to 6, wherein the mask image processing unit processes the mask image by adding noise to the mask image generated by the mask image generation unit.

8. An image processing program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data processing apparatus and data processing method

    JP2019102081A

  • Program, device and method for artificially generating new teacher image with objects worn on human face

    JP2022086086A