WO2015074476A1 - Image processing method, apparatus, and storage medium - Google Patents

Image processing method, apparatus, and storage medium Download PDF

Info

Publication number
WO2015074476A1
WO2015074476A1 PCT/CN2014/089694 CN2014089694W WO2015074476A1 WO 2015074476 A1 WO2015074476 A1 WO 2015074476A1 CN 2014089694 W CN2014089694 W CN 2014089694W WO 2015074476 A1 WO2015074476 A1 WO 2015074476A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
map area
point set
feature point
face image
Prior art date
Application number
PCT/CN2014/089694
Other languages
French (fr)
Chinese (zh)
Inventor
郑志昊
黄飞跃
侯方
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2015074476A1 publication Critical patent/WO2015074476A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20064Wavelet transform [DWT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20072Graph-based image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Definitions

  • the present invention relates to the field of image processing, and in particular, to an image processing method, apparatus, and storage medium.
  • Embodiments of the present invention provide an image processing method, apparatus, and storage medium, which can simplify the process of replacing a face image.
  • an embodiment of the present invention provides an image processing method, including:
  • the replacement map area image is replaced with the map area image.
  • an embodiment of the present invention provides an image processing apparatus, including: an acquiring unit, a calculating unit, a first adjusting unit, and a replacing unit, where:
  • the acquiring unit is configured to acquire a source face image, calculate a feature point set of the source face image, and calculate a map of the feature point set including the source face image in the source face image.
  • the calculating unit is configured to calculate a target face image in the target image, calculate a feature point set of the target face image, and calculate a feature including the target face image in the target face image An image of the map area of the point set;
  • the first adjusting unit is configured to adjust the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image;
  • the replacing unit is configured to replace the replacement map area image with the map area image.
  • an embodiment of the present invention further provides a storage medium including computer executable instructions for performing an image processing method when executed by a computer processor, the method comprising:
  • the replacement map area image is replaced with the map area image.
  • acquiring a source face image, calculating a feature point set of the source face image, and calculating a map area image of the source face image including the feature point set of the source face image Calculating a target face image in the target image, and calculating a feature point set of the target face image, And calculating a map area image including the feature point set of the target face image in the target face image; adjusting the map area image according to the image parameter of the feature point set of the target face image, and obtaining the replacement a map area image; replacing the map area image with the replacement map area image.
  • the face image replacement is not required to be manually performed in the embodiment of the present invention, and the replacement of the face image can be automatically performed, so that the embodiment of the present invention can simplify the process of replacing the face image.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of another image processing method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of another image processing apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
  • a specific photo of the source face is obtained, and the source face image is calculated by a face recognition algorithm (for example, a face detection algorithm of the Boost cascade frame), and specifically, the image may be calculated.
  • the face area of the photo, the image of the area is the source face image; the above photo can be executed.
  • the device of the method receives photos sent by other devices, or obtains the photos locally.
  • the face recognition algorithms used include but are not limited to the following algorithms: face recognition algorithm based on Principal Component Analysis (PCA) and Independent Component Analysis (ICA), based on Singular value decomposition (Singular value) Decomposition, SVD) and Kullback-Leibler (KL) projection combined face recognition algorithm, orthogonal tree domain-based wavelet transform (Dual tree complex wavelet transform, DT-CWT) Feature face recognition algorithm.
  • PCA Principal Component Analysis
  • ICA Independent Component Analysis
  • SVD Singular value Decomposition
  • KL Kullback-Leibler
  • the feature point set of the source face image may be calculated by using an Active Shape Model (ASM) to calculate a feature point set of the source face image.
  • ASM Active Shape Model
  • the source face image may include an image other than the image formed by the feature point set
  • the image of the map area is calculated according to the feature point set of the source face image, so that the source face image may be composed of the feature point set.
  • the image other than the image is removed.
  • the source face image may not include an image other than the image composed of the feature point set, that is, the source face image is the above-described map area image.
  • it may be that a map area including a feature point set of the source face image is calculated, and the image included in the map area is the above-mentioned map area image.
  • the foregoing feature point set may include at least one of the following:
  • Eyebrows eyes, nose, mouth and contours of the face.
  • the face image of the source face image can be reflected by the above-mentioned eyebrows, eyes, nose, mouth and face contours, thereby realizing the replacement of the face image.
  • this embodiment can also implement the replacement of the ear and the head.
  • the specific calculation process can refer to the process of replacing the face image.
  • the face region in the target image is calculated by the face recognition algorithm, and the image of the region is the target face image.
  • the face recognition algorithm used includes, but is not limited to, the following algorithm:
  • a face recognition algorithm based on PCA and ICA a face recognition algorithm based on SVD and KL projection, and a DT-CWT feature face recognition algorithm based on orthogonal field preservation projection.
  • the process of calculating the image of the map area in this step can be calculated by referring to the above calculation of the image of the map area. Cheng, here is not repeated.
  • at least one of the size, the angle, and the position of the image of the map area may be adjusted to obtain the image of the replacement map area; where the position refers to the feature point (such as the mouth) in the image of the map area. position.
  • the size of the target face image is larger than the size of the image of the map area, the size of the image of the map area needs to be adjusted; or the angle of the image of the map area is different from the angle of the image of the source face, and the image of the map area needs to be adjusted.
  • the angle is the same as the angle of the image of the texture area; or the mouth of the image of the texture area is open, and the mouth of the image of the cutout area is closed, that is, the position of the mouth of the target face image is different from the position of the mouth of the image of the cutout area, It is necessary to adjust the position of the mouth of the image of the map area so that the mouth of the image of the map area is consistent with the mouth of the image of the map area, so that the expression of the face image after replacement and the expression of the face image before replacement can be realized. Maintain consistency.
  • the angle may specifically refer to a visual angle of the face image.
  • the visual angle of the target face image is leftward, that is, the left face of the target face image is more than the right face, and the source face is The visual angle of the image is centered, so that the visual angle of the source face image needs to be adjusted to the left so that the visual angle of the source face image is consistent with the visual angle of the target face image.
  • the image of the map area is replaced according to the image parameter of the feature point set of the target face image to obtain a replacement map area image.
  • the entire image of the image of the map area may be replaced, and the partial image of the image of the map area may be replaced.
  • the replacement processing includes at least one of zooming, stretching, rotating, and translating. For example: pan the upper lip of the mouth, or stretch the eye to change the look of the eye.
  • the image parameter of the feature point set of the map area image the image parameter of the feature point set included in the map area image and the image parameter set of the feature point set of the image of the map area image by the replacement processing Alignment; wherein the image parameters include at least one of the following: size, angle, and position.
  • the image parameter alignment may specifically mean that the image parameter of the feature point set in the image of the map area is consistent with the image parameter of the feature point set of the map area image.
  • the angle of the mouth in the image of the map area is adjusted to the angle of the mouth in the image of the map area
  • the size of the outline of the face in the image of the map area is adjusted to the size of the outline of the face in the image of the map area
  • Adjusting the ratio of the size of the mouth and the outline of the face in the image of the map area to adjust the image in the image of the map area
  • the size of the mouth, as well as the size of the eyes, eyebrows, and nose in the image of the map area can be adjusted according to the image parameters of the feature point set of the map area image, the expression of the map area image and the expression of the map area image can be consistent.
  • the image of the map area is replaced by the image of the map area, or the image of the map area is removed, and the image of the replacement map area is pasted to the removed area.
  • the foregoing method may be applied to any device having an image processing function, that is, the device may implement the foregoing method.
  • the device may implement the foregoing method.
  • tablet mobile phone, e-reader, remote control, personal computer (PC), laptop, car device, network TV, wearable device and other network-enabled smart devices.
  • the face replacement is not required manually, and the replacement of the face image can be automatically performed, so that the embodiment of the present invention can simplify the process of replacing the face image.
  • FIG. 2 is a schematic flowchart diagram of another image processing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
  • S201 Acquire a source face image, calculate a feature point set of the source face image, and calculate a map area image of the source face image including the feature point set of the source face image.
  • a photo including a source face is acquired, and the source face image is calculated by a face recognition algorithm (for example, a face detection algorithm of a Boost cascade frame), and specifically, the image may be calculated.
  • the face area of the photo, the image of the area is the source face image.
  • the feature point set for calculating the source face image may specifically be a feature point set of the source face image calculated by the ASM. Since the source face image may include an image other than the image formed by the feature point set, the image of the map area is calculated according to the feature point set of the source face image, so that the source face image may be composed of the feature point set. The image other than the image is removed.
  • the source face image may not include an image other than the image composed of the feature point set, that is, the source face image is the above-described map area image. Specifically, it may be that a map area including a feature point set of the source face image is calculated, and the image included in the map area is the above-mentioned map area image.
  • the foregoing feature point set may include at least one of the following:
  • Eyebrows eyes, nose, mouth and contours of the face.
  • the face image of the source face image can be reflected by the above-mentioned eyebrows, eyes, nose, mouth and face contours, thereby realizing the replacement of the face image.
  • this embodiment can also implement the replacement of the ear and the head.
  • the specific calculation process can refer to the process of replacing the face image.
  • At least one of the size, the angle and the position of the image of the map area may be adjusted to obtain the image of the replacement map area.
  • the pixels of the image of the replacement image area are adjusted to the pixels of the target image, that is, the pixels of the image of the replacement image area after the adjustment are the same as the pixels of the target image.
  • the visual effect produced by this is more realistic.
  • step S205 only gives pixels for adjusting the image of the replacement map area so that the pixels of the replacement map area image are visually consistent with the pixels of the target image.
  • step S203 may specifically include:
  • the image of the image of the map area may be replaced as a whole, or the partial image of the image of the map area may be replaced, for example, the upper lip of the mouth is translated upward, or the eye is stretched to change the look of the eye. .
  • the replacement process may include at least one of the following:
  • the size of the image of the map area is larger than the size of the image of the map area, so that the size of the image of the map area can be adjusted according to the size of the image of the map area; or the angle and image of the image of the map area
  • the angle of the area image is different, and it is necessary to adjust the angle of the image of the map area according to the angle of the image of the map area; or the mouth of the image of the map area is open, and the mouth of the image of the map area is closed, that is, the image of the target face
  • the mouth of the mouth is different from the position of the mouth of the image of the map area, so that the position of the mouth of the image of the map area needs to be adjusted so that the mouth of the image of the map area is consistent with the mouth of the image of the map area, so that the replacement can be realized.
  • the expression of the face image is consistent with the expression of the face image before the replacement.
  • the angle may specifically refer to a visual angle of the face image.
  • the visual angle of the target face image is leftward, that is, the left face of the target face image is more than the right face, and the source face is The visual angle of the image is centered, so that the visual angle of the source face image needs to be adjusted to the left so that the visual angle of the source face image is consistent with the visual angle of the target face image.
  • the replacing the image of the image of the image according to the image parameter of the feature point set of the target face image may include:
  • image parameters include at least one of the following:
  • the image parameter alignment may specifically mean that the image parameter of the feature point set in the image of the map area is consistent with the image parameter of the feature point set of the map area image.
  • the angle of the mouth in the image of the map area is adjusted to the angle of the mouth in the image of the map area, or the size of the outline of the face in the image of the map area is adjusted to the size of the outline of the face in the image of the map area, and then According to the size ratio of the mouth and the outline of the face in the image of the map area, the size of the mouth in the image of the map area is adjusted, and the size of the eyes, eyebrows and nose in the image of the map area is adjusted. Since the image parameters of the feature point set included in the map area image can be adjusted according to the image parameters of the feature point set of the map area image, the expression of the map area image and the expression of the map area image can be consistent.
  • the embodiment of the present invention may further perform decoding processing on the target image processed in step S205, and display the target image after the decoding process.
  • the image including the source face image may be encoded, and then the source face image is acquired by the encoded image.
  • the target image may be encoded and processed. The encoded target image acquires the source face image.
  • the device embodiment of the present invention is used to perform the method for implementing the first to second embodiments of the present invention.
  • the device embodiment of the present invention is used to perform the method for implementing the first to second embodiments of the present invention.
  • Only parts related to the embodiment of the present invention are shown, and the specific technical details are not disclosed. Please refer to Embodiment 1 and Embodiment 2 of the present invention.
  • FIG. 3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the method includes: an obtaining unit 31, a calculating unit 32, a first adjusting unit 33, and a replacing unit 34, wherein:
  • the acquiring unit 31 is configured to acquire a source face image, calculate a feature point set of the source face image, and calculate a map area of the source face image including the feature point set of the source face image image.
  • a photo including a source face is acquired, and the source face image is calculated by a face recognition algorithm (for example, a face detection algorithm of a Boost cascade frame), and specifically, the image may be calculated.
  • the face area of the photo, the image of the area is the source face image; the photo may be that the device receives a photo sent by another device, or obtains the photo locally.
  • the feature point set for calculating the source face image may specifically be a feature point set of the source face image calculated by the ASM. Since the source face image may include an image other than the image formed by the feature point set, the image of the map area is calculated according to the feature point set of the source face image, so that the source face image includes the feature point set. The image other than the image is removed.
  • the source face image may not include an image other than the image composed of the feature point set, that is, the source face image is the above-described map area image. Specifically, it may be that a map area including a feature point set of the source face image is calculated, and the image included in the map area is the above-mentioned map area image.
  • the foregoing feature point set may include at least one of the following:
  • Eyebrows eyes, nose, mouth and contours of the face.
  • the face image of the source face image can be reflected by the above-mentioned eyebrows, eyes, nose, mouth and face contours, thereby realizing the replacement of the face image.
  • this embodiment can also implement the replacement of the ear and the head.
  • the specific calculation process can refer to the process of replacing the face image.
  • the calculating unit 32 is configured to calculate a target face image in the target image, calculate a feature point set of the target face image, and calculate that the target face image includes the target face image A map area image of a feature point collection.
  • the face region in the target image is calculated by the face recognition algorithm, and the image of the region is the target face image.
  • the face recognition algorithm used includes, but is not limited to, the following algorithm:
  • a face recognition algorithm based on PCA and ICA a face recognition algorithm based on SVD and KL projection, and a DT-CWT feature face recognition algorithm based on orthogonal field preservation projection.
  • the first adjusting unit 33 is configured to adjust the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image.
  • the first adjusting unit 33 may specifically adjust the size, angle or position of the image of the map area to obtain the image of the replacement map area. For example, if the size of the target face image is larger than the image size of the map area, the size of the image of the map area needs to be adjusted; or the angle of the image of the map area is different from the angle of the image of the source face, and the image of the map area needs to be adjusted.
  • the angle is the same as the angle of the image of the texture area; or the mouth of the image of the texture area is open, and the mouth of the image of the cutout area is closed, that is, the position of the mouth of the target face image is different from the position of the mouth of the image of the cutout area, It is necessary to adjust the position of the mouth of the image of the map area so that the mouth of the image of the map area is consistent with the mouth of the image of the map area, so that the expression of the face image after replacement and the expression of the face image before replacement can be realized. Maintain consistency.
  • the angle may specifically refer to a visual angle of the face image.
  • the visual angle of the target face image is leftward, that is, the left face of the target face image is more than the right face, and the source face is The visual angle of the image is centered, so that the visual angle of the source face image needs to be adjusted to the left so that the visual angle of the source face image is consistent with the visual angle of the target face image.
  • the replacing unit 34 is configured to replace the replacement map area image with the map area image.
  • the replacing unit 34 may specifically cover the image of the map area by replacing the image of the map area, or remove the image of the map area, and paste the image of the replacement map area to the removed area.
  • the above device may be specifically applied to any device having an image processing function, that is, the device includes the above device.
  • the device includes the above device.
  • tablet computers mobile phones, e-readers, remote controls, PCs, laptops, car devices, Internet TVs, wearable devices and other smart devices with network capabilities.
  • the face replacement is not required manually, and the replacement of the face image can be automatically performed, so that the embodiment of the present invention can simplify the process of replacing the face image.
  • FIG. 4 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the method includes: an obtaining unit 41, a calculating unit 42, a first adjusting unit 43, a replacing unit 44, and a second adjusting unit 45. among them:
  • An acquiring unit 41 configured to acquire a source face image, calculate a feature point set of the source face image, and calculate a map area of the source face image including the feature point set of the source face image image.
  • the calculating unit 42 is configured to calculate a target face image in the target image, calculate a feature point set of the target face image, and calculate feature points including the target face image in the target face image A collection of map area images.
  • the first adjusting unit 43 is configured to adjust the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image.
  • the replacing unit 44 is configured to replace the map area image with the replacement map area image.
  • the second adjusting unit 45 is configured to adjust, according to the pixel of the target image, the pixel of the replacement graphic area image and the pixel of the target image to maintain visual consistency.
  • the second adjusting unit 45 may specifically adjust the pixels of the image of the replacement image area to the pixels of the target image, that is, the pixels of the image of the replacement image area after the adjustment are the same as the pixels of the target image.
  • the visual effect produced by this is more realistic.
  • the second adjustment unit 45 only gives pixels that replace the image of the cutout area so that the pixels of the replacement face image maintain visual consistency with the pixels of the target image.
  • the first adjusting unit 43 is further configured to perform a replacement process on the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image.
  • the image of the image of the map area may be replaced as a whole, or the partial image of the image of the map area may be replaced, for example, the upper lip of the mouth is translated upward, or the eye is stretched to change the look of the eye. .
  • the replacement process may include at least one of the following:
  • the size of the image of the map area is larger than the size of the image of the map area, so that the size of the image of the map area can be different according to the size of the image of the map area; or the angle of the image of the map area is different from the angle of the image of the map area, The angle of the image of the map area is adjusted to the angle of the image of the map area.
  • the first adjusting unit 43 is further configured to: according to the image parameter of the feature point set of the map area image, image parameters of the feature point set included in the map area image by using the replacement processing Aligning the image parameters of the feature point set of the map area image; wherein the image parameter includes at least one of the following:
  • the image parameter alignment may specifically mean that the image parameter of the feature point set in the image of the map area is consistent with the image parameter of the feature point set of the map area image.
  • the angle of the mouth in the image of the map area is adjusted to the angle of the mouth in the image of the map area
  • the size of the outline of the face in the image of the map area is adjusted to the size of the outline of the face in the image of the map area
  • the size ratio of the mouth and the outline of the face in the image of the map area the size of the mouth in the image of the area of the device, and the size of the eyes, eyebrows and nose in the image of the map area are adjusted. Since the image parameters of the feature point set included in the image of the map area can be adjusted according to the image parameters of the feature point set, the expression of the image of the map area and the expression of the image of the map area can be consistent.
  • the embodiment of the present invention may further perform decoding processing on the target image processed by the second adjusting unit 45, and display the target image after the decoding process.
  • the image including the source face image may be encoded, and then the source face image is acquired by the encoded image, and the target face image is calculated in the calculating unit 42.
  • the target image may be encoded, and the source face image may be acquired through the encoded target image.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
  • an embodiment of the present invention provides a hardware structure of a terminal device that performs an image processing method, where the terminal device includes a processor 501, a memory 502, an input device 503, and an output device 504.
  • the number of processors 501 in the terminal device may be One or more, one processor 501 is taken as an example in FIG. 5; the processor 501, the memory 502, the input device 503, and the output device 504 in the terminal device may be connected by a bus or other manner, and the bus is connected in FIG. For example.
  • the memory 502 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, and a module, such as a program instruction/module corresponding to the image processing method in the embodiment of the present invention (for example, FIG. 3 to FIG. 4
  • the processor 501 executes various functional applications and data processing of the terminal device by executing software programs, instructions, and modules stored in the memory 502, that is, implementing the image processing method in the above method embodiments.
  • the memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like.
  • memory 502 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • memory 502 can further include memory remotely located relative to processor 501, which can be connected to the server over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Input device 503 can be used to receive input digital or character information and to generate key signal inputs related to user settings and function control of the terminal.
  • Output device 504 can include a display device such as a display screen.
  • the processor 501 may perform the following steps: acquiring a source face image, calculating a feature point set of the source face image, and calculating a feature point set including the source face image in the source face image. a map area image; calculating a target face image in the target image, calculating a feature point set of the target face image, and calculating feature points including the target face image in the target face image a map image of the map; adjusting the map area image according to image parameters of the feature point set of the target face image to obtain a replacement map area image; and replacing the map area image with the replacement map area image .
  • the pixel of the replacement map area image may be adjusted according to the pixel of the target image to be compared with the target image.
  • the pixels remain visually consistent.
  • the feature point set includes at least one of the following: an eyebrow, an eye, a nose, a mouth, and a contour of a human face.
  • the processor 501 adjusts the image of the map area according to the image parameter of the feature point set of the target face image to obtain the image of the replacement map area
  • the processor 501 is specifically implemented according to the feature of the target face image. And replacing the image of the map area with the image parameter of the point set to obtain a replacement map area image; wherein the replacement processing includes at least one of the following: zooming, stretching, and rotating Turn and pan.
  • the processor 501 when the processor 501 performs the replacement process on the image of the image of the image according to the image parameter of the feature point set of the target face image, the processor 501 is specifically implemented as: an image parameter according to the feature point set of the image of the texture image Aligning, by the replacement process, an image parameter of the feature point set included in the map area image with the image parameter of the feature point set of the image of the map area image; wherein the image parameter includes at least one of the following : size, angle and position.
  • Embodiments of the present invention also provide a storage medium containing computer executable instructions for performing an image processing method when executed by a computer processor, the method comprising:
  • the replacement map area image is replaced with the map area image.
  • the method further includes:
  • the feature point set includes at least one of the following: an eyebrow, an eye, a nose, a mouth, and a contour of a human face.
  • the image of the map area is adjusted according to the image parameter of the feature point set of the target face image, and the image of the replacement map area is obtained, including:
  • the replacement process includes at least one of the following: zooming, stretching, rotating, and panning.
  • the replacement processing including:
  • the image parameter of the feature point set of the map area image the image parameter of the feature point set included in the map area image and the image parameter set of the feature point set of the image of the map area image by the replacement processing Alignment; wherein the image parameters include at least one of the following: size, angle, and position.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

An image processing method comprises: acquiring a source human face image, computing a feature point set of the source human face image, and computing a cutout area image, which comprises the feature point set of the source human face image, in the source human face image; computing a target human face image in a target image, computing a feature point set of the target human face image, and computing a paste area image, which comprises the feature point set of the target human face image, in the target human face image; adjusting the cutout area image according to an image parameter of the feature point set of the target human face image, to obtain a replacement cutout area image; and replacing the paste area image with the replacement cutout area image. A process of replacing a human face can be simplified. In addition, correspondingly further disclosed are an image processing apparatus and a storage medium.

Description

一种图像处理方法、装置和存储介质Image processing method, device and storage medium
本专利申请要求于2013年11月25日提交的、申请号为2013106068732、申请人为腾讯科技(深圳)有限公司、发明名称为“一种图像处理方法及装置、终端”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。This patent application claims priority from Chinese patent application filed on November 25, 2013, the application number is 2013106068732, the applicant is Tencent Technology (Shenzhen) Co., Ltd., and the invention name is "an image processing method and device, terminal". The entire content of this application is incorporated herein by reference.
技术领域Technical field
本发明涉及图像处理领域,尤其涉及一种图像处理方法、装置和存储介质。The present invention relates to the field of image processing, and in particular, to an image processing method, apparatus, and storage medium.
背景技术Background technique
随着相机和手机等具有拍摄功能的设备的普及,照片在人们生活出现的次数越来越多。例如:外出游玩、聚会、会议等场所中人们都会通过照片记录这些场所,且目前拍摄的照片大多数都是人物照片。随着互联网的普及,人们经常会在网上浏览或者发表照片,为了美观,人们经常会将网上的照片进行美化操作。例如,将自己或者别人的人脸替换掉,以形成新的合成图像。但目前的图像处理技术是很难实现人脸的替换,只是非常少量的图像处理专业人员才可以通过一些图像处理软件实现人脸的替换,且实现过程都是通过手动操作的,例如:手动抠出人脸区域,再手动将人脸覆盖至其它人脸区域。可见,目前人脸替换的过程过于复杂。With the popularity of devices with shooting capabilities such as cameras and mobile phones, photos are appearing more and more in people's lives. For example, in places such as outings, parties, meetings, etc., people will record these places through photos, and most of the photos taken at present are photos of people. With the popularity of the Internet, people often browse or post photos on the Internet. For the sake of beauty, people often make photos on the Internet beautify. For example, replace yourself or someone else's face to form a new composite image. However, the current image processing technology is difficult to replace the face, only a very small number of image processing professionals can use some image processing software to achieve face replacement, and the implementation process is manually operated, for example: manual 抠Face the face area and manually cover the face to other face areas. It can be seen that the current process of face replacement is too complicated.
发明内容Summary of the invention
本发明实施例提供了一种图像处理方法、装置和存储介质,可以简化人脸图像替换的过程。Embodiments of the present invention provide an image processing method, apparatus, and storage medium, which can simplify the process of replacing a face image.
第一方面,本发明实施例提供一种图像处理方法,包括:In a first aspect, an embodiment of the present invention provides an image processing method, including:
获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像;Obtaining a source face image, calculating a feature point set of the source face image, and calculating a map area image of the source face image including the feature point set of the source face image;
计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集 合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像;Calculating a target face image in the target image, and calculating a feature point set of the target face image And calculating a map area image including the feature point set of the target face image in the target face image;
根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像;Adjusting the image of the map area according to image parameters of the feature point set of the target face image to obtain a replacement map area image;
将所述替换抠图区域图像替换掉所述贴图区域图像。The replacement map area image is replaced with the map area image.
第二方面,本发明实施例提供一种图像处理装置,包括:获取单元、计算单元、第一调整单元和替换单元,其中:In a second aspect, an embodiment of the present invention provides an image processing apparatus, including: an acquiring unit, a calculating unit, a first adjusting unit, and a replacing unit, where:
所述获取单元,用于获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像;The acquiring unit is configured to acquire a source face image, calculate a feature point set of the source face image, and calculate a map of the feature point set including the source face image in the source face image. Area image
所述计算单元,用于计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像;The calculating unit is configured to calculate a target face image in the target image, calculate a feature point set of the target face image, and calculate a feature including the target face image in the target face image An image of the map area of the point set;
所述第一调整单元,用于根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像;The first adjusting unit is configured to adjust the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image;
所述替换单元,用于将所述替换抠图区域图像替换掉所述贴图区域图像。The replacing unit is configured to replace the replacement map area image with the map area image.
第三方面,本发明实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种图像处理方法,该方法包括:In a third aspect, an embodiment of the present invention further provides a storage medium including computer executable instructions for performing an image processing method when executed by a computer processor, the method comprising:
获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像;Obtaining a source face image, calculating a feature point set of the source face image, and calculating a map area image of the source face image including the feature point set of the source face image;
计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像;Calculating a target face image in the target image, calculating a feature point set of the target face image, and calculating a map area image including the feature point set of the target face image in the target face image;
根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像;Adjusting the image of the map area according to image parameters of the feature point set of the target face image to obtain a replacement map area image;
将所述替换抠图区域图像替换掉所述贴图区域图像。The replacement map area image is replaced with the map area image.
上述技术方案中,获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像;计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合, 并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像;根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像;将所述替换抠图区域图像替换掉所述贴图区域图像。相比当前的技术,本发明实施例中不需要手工进行人脸图像替换,可以自动完成人脸图像的替换,从而本发明实施例可以简化人脸图像替换的过程。In the above technical solution, acquiring a source face image, calculating a feature point set of the source face image, and calculating a map area image of the source face image including the feature point set of the source face image Calculating a target face image in the target image, and calculating a feature point set of the target face image, And calculating a map area image including the feature point set of the target face image in the target face image; adjusting the map area image according to the image parameter of the feature point set of the target face image, and obtaining the replacement a map area image; replacing the map area image with the replacement map area image. Compared with the current technology, the face image replacement is not required to be manually performed in the embodiment of the present invention, and the replacement of the face image can be automatically performed, so that the embodiment of the present invention can simplify the process of replacing the face image.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1是本发明实施例提供的一种图像处理方法的流程示意图;1 is a schematic flowchart of an image processing method according to an embodiment of the present invention;
图2是本发明实施例提供的另一种图像处理方法的流程示意图;2 is a schematic flowchart of another image processing method according to an embodiment of the present invention;
图3是本发明实施例提供的一种图像处理装置的结构示意图;3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
图4是本发明实施例提供的另一种图像处理装置的结构示意图;4 is a schematic structural diagram of another image processing apparatus according to an embodiment of the present invention;
图5为本发明实施例提供的终端设备的结构示意图。FIG. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图1是本发明实施例提供的一种图像处理方法的流程示意图,如图1所示,包括以下步骤:1 is a schematic flowchart of an image processing method according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
S101、获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像。S101. Acquire a source face image, calculate a feature point set of the source face image, and calculate a map area image of the source face image including the feature point set of the source face image.
本实施例中,具体可以是获取一张包括源人脸的照片,再通过人脸识别算法(例如:Boost级联框架的人脸检测算法)计算出源人脸图像,具体可以是计算出该照片的人脸区域,该区域的图像就是源人脸图像;上述照片可以是执行 本方法的设备接收其它设备发送的照片,或者从本地获取上述照片。当然还可以是直接获取到源人脸图像。即计算源人脸图像的过程在其它设备上已经完成。In this embodiment, a specific photo of the source face is obtained, and the source face image is calculated by a face recognition algorithm (for example, a face detection algorithm of the Boost cascade frame), and specifically, the image may be calculated. The face area of the photo, the image of the area is the source face image; the above photo can be executed The device of the method receives photos sent by other devices, or obtains the photos locally. Of course, it is also possible to directly obtain the source face image. That is, the process of calculating the source face image has been completed on other devices.
其中,采用的人脸识别算法包括但不限于如下算法:基于主成份分析(Principal Component Analysis,PCA)与独立成份分析(Independent Component Analysis,ICA)的人脸识别算法、基于奇异值分解(Singular value Decomposition,SVD)和库尔贝克-雷柏(Kullback-Leibler,KL)投影相融合的有脸识别算法、基于正交领域保持投射的双树复小波变换(dual tree complex wavelet transform,DT-CWT)特征人脸识别算法。Among them, the face recognition algorithms used include but are not limited to the following algorithms: face recognition algorithm based on Principal Component Analysis (PCA) and Independent Component Analysis (ICA), based on Singular value decomposition (Singular value) Decomposition, SVD) and Kullback-Leibler (KL) projection combined face recognition algorithm, orthogonal tree domain-based wavelet transform (Dual tree complex wavelet transform, DT-CWT) Feature face recognition algorithm.
本实施例中,计算源人脸图像的特征点集合具体可以是通过主动形状模型(Active Shape Model,ASM)计算出源人脸图像的特征点集合。由于上述源人脸图像可能会包括特征点集合构成的图像之外的图像,这样根据源人脸图像的特征点集合计算出抠图区域图像,从而可以将源人脸图像包括特征点集合构成的图像之外的图像去掉,当然,源人脸图像可能也不会包括特征点集合构成的图像之外的图像,即源人脸图像就为上述抠图区域图像。具体还可以是计算出包括所述源人脸图像的特征点集合的抠图区域,而该抠图区域包括的图像就是上述抠图区域图像。In this embodiment, the feature point set of the source face image may be calculated by using an Active Shape Model (ASM) to calculate a feature point set of the source face image. Since the source face image may include an image other than the image formed by the feature point set, the image of the map area is calculated according to the feature point set of the source face image, so that the source face image may be composed of the feature point set. The image other than the image is removed. Of course, the source face image may not include an image other than the image composed of the feature point set, that is, the source face image is the above-described map area image. Specifically, it may be that a map area including a feature point set of the source face image is calculated, and the image included in the map area is the above-mentioned map area image.
本实施例中,上述特征点集合可以包括如下至少一项:In this embodiment, the foregoing feature point set may include at least one of the following:
眉毛、眼睛、鼻子、嘴巴和人脸外轮廓。Eyebrows, eyes, nose, mouth and contours of the face.
由于通过上述眉毛、眼睛、鼻子、嘴巴和人脸外轮廓就可以将源人脸图像的人脸特征反应出,从而实现人脸图像的替换。当然本实施例还可以实现对耳朵和头部的替换,具体的计算过程可以参考人脸图像替换的过程。The face image of the source face image can be reflected by the above-mentioned eyebrows, eyes, nose, mouth and face contours, thereby realizing the replacement of the face image. Of course, this embodiment can also implement the replacement of the ear and the head. The specific calculation process can refer to the process of replacing the face image.
S102、计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像。S102. Calculate a target face image in the target image, calculate a feature point set of the target face image, and calculate a texture area of the target face image that includes the feature point set of the target face image. image.
本实施例中,具体可以是通过人脸识别算法计算出目标图像中的人脸区域,而该区域的图像就是上述目标人脸图像。其中,采用的人脸识别算法包括但不限于如下算法:In this embodiment, specifically, the face region in the target image is calculated by the face recognition algorithm, and the image of the region is the target face image. The face recognition algorithm used includes, but is not limited to, the following algorithm:
基于PCA与ICA的人脸识别算法、基于SVD和KL投影相融合的有脸识别算法、基于正交领域保持投射的DT-CWT特征人脸识别算法。A face recognition algorithm based on PCA and ICA, a face recognition algorithm based on SVD and KL projection, and a DT-CWT feature face recognition algorithm based on orthogonal field preservation projection.
该步骤计算贴图区域图像的过程可以参考上述计算抠图区域图像的计算过 程,此处不作重复说明。The process of calculating the image of the map area in this step can be calculated by referring to the above calculation of the image of the map area. Cheng, here is not repeated.
S103、根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像。本实施例中,具体可以是调整抠图区域图像的尺寸、角度和位置中的至少一个,以得到上述替换抠图区域图像;这里的位置是指抠图区域图像中特征点(比如嘴巴)的位置。例如:目标人脸图像的尺寸比贴图区域图像的尺寸要大,就需要调整抠图区域图像的尺寸;或者贴图区域图像的角度不同于源人脸图像的角度,就需要调整抠图区域图像的角度与贴图区域图像的角度一致;或者贴图区域图像的嘴巴是张开的,而抠图区域图像的嘴巴是闭合的,即目标人脸图像的嘴巴与抠图区域图像的嘴巴的位置不同,这样就需要调整抠图区域图像的嘴巴的位置,以使得抠图区域图像的嘴巴与贴图区域图像的嘴巴保持一致性,这样可以实现替换后的人脸图像的表情与替换前的人脸图像的表情保持一致性。其中,上述角度具体可以是指人脸图像的视觉角度,例如:目标人脸图像的视觉角度是朝左的,即目标人脸图像的左脸会比较右脸展现的区域多,而源人脸图像的视觉角度是居中的,这样就需要将源人脸图像的视觉角度往左边调整,以使源人脸图像的视觉角度与目标人脸图像的视觉角度保持一致性。S103. Adjust the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image. In this embodiment, at least one of the size, the angle, and the position of the image of the map area may be adjusted to obtain the image of the replacement map area; where the position refers to the feature point (such as the mouth) in the image of the map area. position. For example, if the size of the target face image is larger than the size of the image of the map area, the size of the image of the map area needs to be adjusted; or the angle of the image of the map area is different from the angle of the image of the source face, and the image of the map area needs to be adjusted. The angle is the same as the angle of the image of the texture area; or the mouth of the image of the texture area is open, and the mouth of the image of the cutout area is closed, that is, the position of the mouth of the target face image is different from the position of the mouth of the image of the cutout area, It is necessary to adjust the position of the mouth of the image of the map area so that the mouth of the image of the map area is consistent with the mouth of the image of the map area, so that the expression of the face image after replacement and the expression of the face image before replacement can be realized. Maintain consistency. The angle may specifically refer to a visual angle of the face image. For example, the visual angle of the target face image is leftward, that is, the left face of the target face image is more than the right face, and the source face is The visual angle of the image is centered, so that the visual angle of the source face image needs to be adjusted to the left so that the visual angle of the source face image is consistent with the visual angle of the target face image.
也即:根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理,得到替换抠图区域图像。具体可以是对抠图区域图像整体进行替换处理,还可以是对抠图区域图像的局部图像进行替换处理,该替换处理包括如下至少一项:缩放、拉伸、旋转和平移。例如:对嘴巴的上嘴唇往上平移,或者将眼睛拉伸,以改变眼睛的神态。That is, the image of the map area is replaced according to the image parameter of the feature point set of the target face image to obtain a replacement map area image. Specifically, the entire image of the image of the map area may be replaced, and the partial image of the image of the map area may be replaced. The replacement processing includes at least one of zooming, stretching, rotating, and translating. For example: pan the upper lip of the mouth, or stretch the eye to change the look of the eye.
根据所述贴图区域图像的特征点集合的图像参数,通过所述替换处理将所述抠图区域图像包括的特征点集合的图像参数与所述述贴图区域图像的特征点集合的所述图像参数对齐;其中,所述图像参数包括如下至少一项:尺寸、角度和位置。And according to the image parameter of the feature point set of the map area image, the image parameter of the feature point set included in the map area image and the image parameter set of the feature point set of the image of the map area image by the replacement processing Alignment; wherein the image parameters include at least one of the following: size, angle, and position.
本实施例中,上述图像参数对齐具体可以是指抠图区域图像中的特征点集合的图像参数与贴图区域图像的特征点集合的图像参数保持一致性。例如:抠图区域图像中的嘴巴的角度调整为贴图区域图像中的嘴巴的角度,或者抠图区域图像中的人脸外轮廓的尺寸调整为贴图区域图像中的人脸外轮廓的尺寸,再根据抠图区域图像中的嘴巴与人脸外轮廓的尺寸比例,调整抠图区域图像中的 嘴巴的尺寸,以及调整抠图区域图像中的眼睛、眉毛和鼻子的尺寸。由于上述可以根据贴图区域图像的特征点集合的图像参数,调整抠图区域图像包括的特征点集合的图像参数,这样可以实现抠图区域图像的表情与贴图区域图像的表情保持一致性。In this embodiment, the image parameter alignment may specifically mean that the image parameter of the feature point set in the image of the map area is consistent with the image parameter of the feature point set of the map area image. For example, the angle of the mouth in the image of the map area is adjusted to the angle of the mouth in the image of the map area, or the size of the outline of the face in the image of the map area is adjusted to the size of the outline of the face in the image of the map area, and then Adjusting the ratio of the size of the mouth and the outline of the face in the image of the map area to adjust the image in the image of the map area The size of the mouth, as well as the size of the eyes, eyebrows, and nose in the image of the map area. Since the image parameters of the feature point set included in the map area image can be adjusted according to the image parameters of the feature point set of the map area image, the expression of the map area image and the expression of the map area image can be consistent.
S104、利用所述替换抠图区域图像替换掉所述贴图区域图像。S104. Replace the map area image with the replacement map area image.
本实施例中,具体可以是替换抠图区域图像覆盖掉贴图区域图像,或者将贴图区域图像移除,再将替换抠图区域图像贴至被移除的区域。In this embodiment, specifically, the image of the map area is replaced by the image of the map area, or the image of the map area is removed, and the image of the replacement map area is pasted to the removed area.
本实施例中,上述方法具体可以是应用于任何具备图像处理功能的设备,即该设备可以实现上述方法。例如:平板电脑、手机、电子阅读器、遥控器、个人计算机(Personal Computer,PC)、笔记本电脑、车载设备、网络电视、可穿戴设备等具有网络功能的智能设备。In this embodiment, the foregoing method may be applied to any device having an image processing function, that is, the device may implement the foregoing method. For example: tablet, mobile phone, e-reader, remote control, personal computer (PC), laptop, car device, network TV, wearable device and other network-enabled smart devices.
上述技术方案中,不需要手工进行人脸替换,可以自动完成人脸图像的替换,从而本发明实施例可以简化人脸图像替换的过程。In the above technical solution, the face replacement is not required manually, and the replacement of the face image can be automatically performed, so that the embodiment of the present invention can simplify the process of replacing the face image.
图2是本发明实施例提供的另一种图像处理方法的流程示意图,如图2所示,包括以下步骤:FIG. 2 is a schematic flowchart diagram of another image processing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
S201、获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像。S201: Acquire a source face image, calculate a feature point set of the source face image, and calculate a map area image of the source face image including the feature point set of the source face image.
本实施例中的,具体可以是获取一张包括源人脸的照片,再通过人脸识别算法(例如:Boost级联框架的人脸检测算法)计算出源人脸图像,具体可以是计算出该照片的人脸区域,该区域的图像就是源人脸图像。当然还可以是直接获取到源人脸图像。即计算源人脸图像的过程在其它设备上已经完成。In this embodiment, specifically, a photo including a source face is acquired, and the source face image is calculated by a face recognition algorithm (for example, a face detection algorithm of a Boost cascade frame), and specifically, the image may be calculated. The face area of the photo, the image of the area is the source face image. Of course, it is also possible to directly obtain the source face image. That is, the process of calculating the source face image has been completed on other devices.
本实施例中的,计算源人脸图像的特征点集合具体可以是通过ASM计算出源人脸图像的特征点集合。由于上述源人脸图像可能会包括特征点集合构成的图像之外的图像,这样根据源人脸图像的特征点集合计算出抠图区域图像,从而可以将源人脸图像包括特征点集合构成的图像之外的图像去掉,当然,源人脸图像可能也不会包括特征点集合构成的图像之外的图像,即源人脸图像就为上述抠图区域图像。具体还可以是计算出包括所述源人脸图像的特征点集合的抠图区域,而该抠图区域包括的图像就是上述抠图区域图像。In this embodiment, the feature point set for calculating the source face image may specifically be a feature point set of the source face image calculated by the ASM. Since the source face image may include an image other than the image formed by the feature point set, the image of the map area is calculated according to the feature point set of the source face image, so that the source face image may be composed of the feature point set. The image other than the image is removed. Of course, the source face image may not include an image other than the image composed of the feature point set, that is, the source face image is the above-described map area image. Specifically, it may be that a map area including a feature point set of the source face image is calculated, and the image included in the map area is the above-mentioned map area image.
本实施例中的,上述特征点集合可以包括如下至少一项: In this embodiment, the foregoing feature point set may include at least one of the following:
眉毛、眼睛、鼻子、嘴巴和人脸外轮廓。Eyebrows, eyes, nose, mouth and contours of the face.
由于通过上述眉毛、眼睛、鼻子、嘴巴和人脸外轮廓就可以将源人脸图像的人脸特征反应出,从而实现人脸图像的替换。当然本实施例还可以实现对耳朵和头部的替换,具体的计算过程可以参考人脸图像替换的过程。The face image of the source face image can be reflected by the above-mentioned eyebrows, eyes, nose, mouth and face contours, thereby realizing the replacement of the face image. Of course, this embodiment can also implement the replacement of the ear and the head. The specific calculation process can refer to the process of replacing the face image.
S202、计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像。S202. Calculate a target face image in the target image, calculate a feature point set of the target face image, and calculate a texture area of the target face image including the feature point set of the target face image. image.
S203、根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像。S203. Adjust the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image.
本实施例中的,具体可以是调整抠图区域图像的尺寸、角度和位置中的至少一个,以得到上述替换抠图区域图像。In this embodiment, at least one of the size, the angle and the position of the image of the map area may be adjusted to obtain the image of the replacement map area.
S204、将所述替换抠图区域图像替换掉所述贴图区域图像。S204. Replace the map area image with the replacement map area image.
S205、根据所述目标图像的像素,调整所述替换抠图区域图像的像素以与所述目标图像的像素保持视觉一致性。S205. Adjust pixels of the replacement map area image to maintain visual consistency with pixels of the target image according to pixels of the target image.
本实施例中的,具体可以是将替换抠图区域图像的像素调整为目标图像的像素,即调整后替换抠图区域图像的像素与目标图像的像素相同。这样所产生的视觉效果就更加逼真。当然步骤S205仅是给出了调整替换抠图区域图像的像素以使替换抠图区域图像的像素与所述目标图像的像素保持视觉一致性。其实还可以根据替换抠图区域图像的像素调整目标图像的像素,以使替换抠图区域图像的像素与所述目标图像的像素保持视觉一致性。In this embodiment, specifically, the pixels of the image of the replacement image area are adjusted to the pixels of the target image, that is, the pixels of the image of the replacement image area after the adjustment are the same as the pixels of the target image. The visual effect produced by this is more realistic. Of course, step S205 only gives pixels for adjusting the image of the replacement map area so that the pixels of the replacement map area image are visually consistent with the pixels of the target image. In fact, it is also possible to adjust the pixels of the target image according to the pixels of the replacement image area image so that the pixels of the replacement image area image are visually consistent with the pixels of the target image.
本实施例中的,步骤S203具体可以包括:In this embodiment, step S203 may specifically include:
根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理,得到替换抠图区域图像。Substituting the image of the map area according to image parameters of the feature point set of the target face image to obtain a replacement map area image.
具体可以是对抠图区域图像整体进行替换处理,还可以是对抠图区域图像的局部图像进行替换处理,例如:对嘴巴的上嘴唇往上平移,或者将眼睛拉伸,以改变眼睛的神态。Specifically, the image of the image of the map area may be replaced as a whole, or the partial image of the image of the map area may be replaced, for example, the upper lip of the mouth is translated upward, or the eye is stretched to change the look of the eye. .
其中,所述替换处理可以包括如下至少一项:The replacement process may include at least one of the following:
缩放、拉伸、旋转和平移。Zoom, stretch, rotate, and pan.
例如:贴图区域图像的尺寸大于抠图区域图像的尺寸,这样就可以根据贴图区域图像的尺寸调整抠图区域图像的尺寸;或者贴图区域图像的角度与抠图 区域图像的角度不同,就需要根据贴图区域图像的角度调整抠图区域图像的角度等;或者贴图区域图像的嘴巴是张开的,而抠图区域图像的嘴巴是闭合的,即目标人脸图像的嘴巴与抠图区域图像的嘴巴的位置不同,这样就需要调整抠图区域图像的嘴巴的位置,以使得抠图区域图像的嘴巴与贴图区域图像的嘴巴保持一致性,这样可以实现替换后的人脸图像的表情与替换前的人脸图像的表情示保持一致性。其中,上述角度具体可以是指人脸图像的视觉角度,例如:目标人脸图像的视觉角度是朝左的,即目标人脸图像的左脸会比较右脸展现的区域多,而源人脸图像的视觉角度是居中的,这样就需要将源人脸图像的视觉角度往左边调整,以使源人脸图像的视觉角度与目标人脸图像的视觉角度保持一致性。For example, the size of the image of the map area is larger than the size of the image of the map area, so that the size of the image of the map area can be adjusted according to the size of the image of the map area; or the angle and image of the image of the map area The angle of the area image is different, and it is necessary to adjust the angle of the image of the map area according to the angle of the image of the map area; or the mouth of the image of the map area is open, and the mouth of the image of the map area is closed, that is, the image of the target face The mouth of the mouth is different from the position of the mouth of the image of the map area, so that the position of the mouth of the image of the map area needs to be adjusted so that the mouth of the image of the map area is consistent with the mouth of the image of the map area, so that the replacement can be realized. The expression of the face image is consistent with the expression of the face image before the replacement. The angle may specifically refer to a visual angle of the face image. For example, the visual angle of the target face image is leftward, that is, the left face of the target face image is more than the right face, and the source face is The visual angle of the image is centered, so that the visual angle of the source face image needs to be adjusted to the left so that the visual angle of the source face image is consistent with the visual angle of the target face image.
本实施例中的,上述根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理具体可以包括:In the embodiment, the replacing the image of the image of the image according to the image parameter of the feature point set of the target face image may include:
根据所述贴图区域图像的特征点集合的图像参数,通过所述替换处理将所述抠图区域图像包括的特征点集合的图像参数与所述贴图区域图像的特征点集合的所述图像参数对齐;其中,所述图像参数包括如下至少一项:Aligning image parameters of the feature point set included in the map area image with the image parameters of the feature point set of the map area image according to the image parameter of the feature point set of the map area image Wherein the image parameters include at least one of the following:
尺寸、角度和位置。Size, angle and position.
本实施例中的,上述图像参数对齐具体可以是指抠图区域图像中的特征点集合的图像参数与贴图区域图像的特征点集合的图像参数保持一致性。例如:抠图区域图像中的嘴巴的角度调整为贴图区域图像中的嘴巴的角度,或者抠图区域图像中的人脸外轮廓的尺寸调整为贴图区域图像中的人脸外轮廓的尺寸,再根据抠图区域图像中的嘴巴与人脸外轮廓的尺寸比例,调整抠图区域图像中的嘴巴的尺寸,以及调整抠图区域图像中的眼睛、眉毛和鼻子的尺寸。由于上述可以根据贴图区域图像的特征点集合的图像参数,调整抠图区域图像包括的特征点集合的图像参数,这样可以实现抠图区域图像的表情与贴图区域图像的表情保持一致性。In the embodiment, the image parameter alignment may specifically mean that the image parameter of the feature point set in the image of the map area is consistent with the image parameter of the feature point set of the map area image. For example, the angle of the mouth in the image of the map area is adjusted to the angle of the mouth in the image of the map area, or the size of the outline of the face in the image of the map area is adjusted to the size of the outline of the face in the image of the map area, and then According to the size ratio of the mouth and the outline of the face in the image of the map area, the size of the mouth in the image of the map area is adjusted, and the size of the eyes, eyebrows and nose in the image of the map area is adjusted. Since the image parameters of the feature point set included in the map area image can be adjusted according to the image parameters of the feature point set of the map area image, the expression of the map area image and the expression of the map area image can be consistent.
本实施例中的,本发明实施例还可以对步骤S205处理后的目标图像进行解码处理,将显示解码处理后的目标图像。同理,在步骤S201之前还可以对包括源人脸图像的图像进行编码处理,再通过编码后的图像获取到源人脸图像,在步骤S202之前,还可以对目标图像进行编码处理,再通过编码后的目标图像获取到源人脸图像。 In this embodiment, the embodiment of the present invention may further perform decoding processing on the target image processed in step S205, and display the target image after the decoding process. Similarly, before the step S201, the image including the source face image may be encoded, and then the source face image is acquired by the encoded image. Before the step S202, the target image may be encoded and processed. The encoded target image acquires the source face image.
上述技术方案中,在上面实施例的基础上,实现了多种本实施例中的实施方式,且都可以实现简化人脸图像替换的过程。In the above technical solution, on the basis of the above embodiments, various embodiments in the present embodiment are implemented, and a process of simplifying face image replacement can be realized.
下面为本发明装置实施例,本发明装置实施例用于执行本发明方法实施例一至二实现的方法,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例一和实施例二。The following is a device embodiment of the present invention. The device embodiment of the present invention is used to perform the method for implementing the first to second embodiments of the present invention. For the convenience of description, only parts related to the embodiment of the present invention are shown, and the specific technical details are not disclosed. Please refer to Embodiment 1 and Embodiment 2 of the present invention.
图3是本发明实施例提供的一种图像处理装置的结构示意图,如图3所示,包括:获取单元31、计算单元32、第一调整单元33和替换单元34,其中:FIG. 3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the method includes: an obtaining unit 31, a calculating unit 32, a first adjusting unit 33, and a replacing unit 34, wherein:
获取单元31,用于获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像。The acquiring unit 31 is configured to acquire a source face image, calculate a feature point set of the source face image, and calculate a map area of the source face image including the feature point set of the source face image image.
本实施例中的,具体可以是获取一张包括源人脸的照片,再通过人脸识别算法(例如:Boost级联框架的人脸检测算法)计算出源人脸图像,具体可以是计算出该照片的人脸区域,该区域的图像就是源人脸图像;上述照片可以是所述装置接收其它装置发送的照片,或者从本地获取上述照片。当然还可以是直接获取到源人脸图像。即计算源人脸图像的过程在其它设备上已经完成。In this embodiment, specifically, a photo including a source face is acquired, and the source face image is calculated by a face recognition algorithm (for example, a face detection algorithm of a Boost cascade frame), and specifically, the image may be calculated. The face area of the photo, the image of the area is the source face image; the photo may be that the device receives a photo sent by another device, or obtains the photo locally. Of course, it is also possible to directly obtain the source face image. That is, the process of calculating the source face image has been completed on other devices.
本实施例中的,计算源人脸图像的特征点集合具体可以是通过ASM计算出源人脸图像的特征点集合。由于上述源人脸图像可能会包括特征点集合构成的图像之外的图像,这样再根据源人脸图像的特征点集合计算出抠图区域图像,从而可以将源人脸图像包括特征点集合构成的图像之外的图像去掉,当然,源人脸图像可能也不会包括特征点集合构成的图像之外的图像,即源人脸图像就为上述抠图区域图像。具体还可以是计算出包括所述源人脸图像的特征点集合的抠图区域,而该抠图区域包括的图像就是上述抠图区域图像。In this embodiment, the feature point set for calculating the source face image may specifically be a feature point set of the source face image calculated by the ASM. Since the source face image may include an image other than the image formed by the feature point set, the image of the map area is calculated according to the feature point set of the source face image, so that the source face image includes the feature point set. The image other than the image is removed. Of course, the source face image may not include an image other than the image composed of the feature point set, that is, the source face image is the above-described map area image. Specifically, it may be that a map area including a feature point set of the source face image is calculated, and the image included in the map area is the above-mentioned map area image.
本实施例中的,上述特征点集合可以包括如下至少一项:In this embodiment, the foregoing feature point set may include at least one of the following:
眉毛、眼睛、鼻子、嘴巴和人脸外轮廓。Eyebrows, eyes, nose, mouth and contours of the face.
由于通过上述眉毛、眼睛、鼻子、嘴巴和人脸外轮廓就可以将源人脸图像的人脸特征反应出,从而实现人脸图像的替换。当然本实施例还可以实现对耳朵和头部的替换,具体的计算过程可以参考人脸图像替换的过程。The face image of the source face image can be reflected by the above-mentioned eyebrows, eyes, nose, mouth and face contours, thereby realizing the replacement of the face image. Of course, this embodiment can also implement the replacement of the ear and the head. The specific calculation process can refer to the process of replacing the face image.
计算单元32,用于计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的 特征点集合的贴图区域图像。The calculating unit 32 is configured to calculate a target face image in the target image, calculate a feature point set of the target face image, and calculate that the target face image includes the target face image A map area image of a feature point collection.
本实施例中的,具体可以是通过人脸识别算法计算出目标图像中的人脸区域,而该区域的图像就是上述目标人脸图像。其中,采用的人脸识别算法包括但不限于如下算法:In this embodiment, specifically, the face region in the target image is calculated by the face recognition algorithm, and the image of the region is the target face image. The face recognition algorithm used includes, but is not limited to, the following algorithm:
基于PCA与ICA独的人脸识别算法、基于SVD和KL投影相融合的有脸识别算法、基于正交领域保持投射的DT-CWT特征人脸识别算法。A face recognition algorithm based on PCA and ICA, a face recognition algorithm based on SVD and KL projection, and a DT-CWT feature face recognition algorithm based on orthogonal field preservation projection.
第一调整单元33,用于根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像。。The first adjusting unit 33 is configured to adjust the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image. .
本实施例中的,第一调整单元33具体可以是调整抠图区域图像的尺寸、角度或者位置,以得到上述替换抠图区域图像。例如:目标人脸图像的尺寸比较贴图区域图像的尺寸要大,就需要调整抠图区域图像的尺寸;或者贴图区域图像的角度不同于源人脸图像的角度,就需要调整抠图区域图像的角度与贴图区域图像的角度一致;或者贴图区域图像的嘴巴是张开的,而抠图区域图像的嘴巴是闭合的,即目标人脸图像的嘴巴与抠图区域图像的嘴巴的位置不同,这样就需要调整抠图区域图像的嘴巴的位置,以使得抠图区域图像的嘴巴与贴图区域图像的嘴巴保持一致性,这样可以实现替换后的人脸图像的表情与替换前的人脸图像的表情保持一致性。其中,上述角度具体可以是指人脸图像的视觉角度,例如:目标人脸图像的视觉角度是朝左的,即目标人脸图像的左脸会比较右脸展现的区域多,而源人脸图像的视觉角度是居中的,这样就需要将源人脸图像的视觉角度往左边调整,以使源人脸图像的视觉角度与目标人脸图像的视觉角度保持一致性。In this embodiment, the first adjusting unit 33 may specifically adjust the size, angle or position of the image of the map area to obtain the image of the replacement map area. For example, if the size of the target face image is larger than the image size of the map area, the size of the image of the map area needs to be adjusted; or the angle of the image of the map area is different from the angle of the image of the source face, and the image of the map area needs to be adjusted. The angle is the same as the angle of the image of the texture area; or the mouth of the image of the texture area is open, and the mouth of the image of the cutout area is closed, that is, the position of the mouth of the target face image is different from the position of the mouth of the image of the cutout area, It is necessary to adjust the position of the mouth of the image of the map area so that the mouth of the image of the map area is consistent with the mouth of the image of the map area, so that the expression of the face image after replacement and the expression of the face image before replacement can be realized. Maintain consistency. The angle may specifically refer to a visual angle of the face image. For example, the visual angle of the target face image is leftward, that is, the left face of the target face image is more than the right face, and the source face is The visual angle of the image is centered, so that the visual angle of the source face image needs to be adjusted to the left so that the visual angle of the source face image is consistent with the visual angle of the target face image.
替换单元34,用于将所述替换抠图区域图像替换掉所述贴图区域图像。The replacing unit 34 is configured to replace the replacement map area image with the map area image.
本实施例中的,替换单元34具体可以是将替换抠图区域图像覆盖掉贴图区域图像,或者将贴图区域图像移除,再将替换抠图区域图像贴至被移除的区域。In this embodiment, the replacing unit 34 may specifically cover the image of the map area by replacing the image of the map area, or remove the image of the map area, and paste the image of the replacement map area to the removed area.
本实施例中的,上述装置具体可以是应用于任何具备图像处理功能的设备,即该设备包括上述装置。例如:平板电脑、手机、电子阅读器、遥控器、PC、笔记本电脑、车载设备、网络电视、可穿戴设备等具有网络功能的智能设备。In the embodiment, the above device may be specifically applied to any device having an image processing function, that is, the device includes the above device. For example: tablet computers, mobile phones, e-readers, remote controls, PCs, laptops, car devices, Internet TVs, wearable devices and other smart devices with network capabilities.
上述技术方案中,不需要手工进行人脸替换,可以自动完成人脸图像的替换,从而本发明实施例可以简化人脸图像替换的过程。 In the above technical solution, the face replacement is not required manually, and the replacement of the face image can be automatically performed, so that the embodiment of the present invention can simplify the process of replacing the face image.
图4是本发明实施例提供的一种图像处理装置的结构示意图,如图4所示,包括:获取单元41、计算单元42、第一调整单元43、替换单元44和第二调整单元45,其中:4 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the method includes: an obtaining unit 41, a calculating unit 42, a first adjusting unit 43, a replacing unit 44, and a second adjusting unit 45. among them:
获取单元41,用于获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像。An acquiring unit 41, configured to acquire a source face image, calculate a feature point set of the source face image, and calculate a map area of the source face image including the feature point set of the source face image image.
计算单元42,用于计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像。The calculating unit 42 is configured to calculate a target face image in the target image, calculate a feature point set of the target face image, and calculate feature points including the target face image in the target face image A collection of map area images.
第一调整单元43,用于根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像。The first adjusting unit 43 is configured to adjust the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image.
替换单元44,用于利用所述替换抠图区域图像替换掉所述贴图区域图像。The replacing unit 44 is configured to replace the map area image with the replacement map area image.
第二调整单元45,用于根据所述目标图像的像素,调整所述替换抠图区域图像的像素与所述目标图像的像素以保持视觉一致性。The second adjusting unit 45 is configured to adjust, according to the pixel of the target image, the pixel of the replacement graphic area image and the pixel of the target image to maintain visual consistency.
本实施例中的,第二调整单元45具体可以是将替换抠图区域图像的像素调整为目标图像的像素,即调整后替换抠图区域图像的像素与目标图像的像素相同。这样所产生的视觉效果就更加逼真。当然第二调整单元45仅是给出了替换抠图区域图像的像素以使替换人脸图像的像素与所述目标图像的像素保持视觉一致性。其实还可以根据替换抠图区域图像的像素调整目标图像的像素,以使替换抠图区域图像的像素与所述目标图像的像素保持视觉一致性。In the embodiment, the second adjusting unit 45 may specifically adjust the pixels of the image of the replacement image area to the pixels of the target image, that is, the pixels of the image of the replacement image area after the adjustment are the same as the pixels of the target image. The visual effect produced by this is more realistic. Of course, the second adjustment unit 45 only gives pixels that replace the image of the cutout area so that the pixels of the replacement face image maintain visual consistency with the pixels of the target image. In fact, it is also possible to adjust the pixels of the target image according to the pixels of the replacement image area image so that the pixels of the replacement image area image are visually consistent with the pixels of the target image.
本实施例中的,第一调整单元43还可以用于根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理,得到替换抠图区域图像。In this embodiment, the first adjusting unit 43 is further configured to perform a replacement process on the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image.
具体可以是对抠图区域图像整体进行替换处理,还可以是对抠图区域图像的局部图像进行替换处理,例如:对嘴巴的上嘴唇往上平移,或者将眼睛拉伸,以改变眼睛的神态。Specifically, the image of the image of the map area may be replaced as a whole, or the partial image of the image of the map area may be replaced, for example, the upper lip of the mouth is translated upward, or the eye is stretched to change the look of the eye. .
其中,所述替换处理可以包括如下至少一项:The replacement process may include at least one of the following:
缩放、拉伸、旋转和平移。Zoom, stretch, rotate, and pan.
例如:贴图区域图像的尺寸大于抠图区域图像的尺寸,这样就可以根据贴图区域图像的尺寸根据抠图区域图像的尺寸;或者贴图区域图像的角度与抠图区域图像的角度不同,就需要根据贴图区域图像的角度调整抠图区域图像的角度等。 For example, the size of the image of the map area is larger than the size of the image of the map area, so that the size of the image of the map area can be different according to the size of the image of the map area; or the angle of the image of the map area is different from the angle of the image of the map area, The angle of the image of the map area is adjusted to the angle of the image of the map area.
本实施例中的,第一调整单元43还可以用于根据所述贴图区域图像的特征点集合的图像参数,通过所述替换处理将所述抠图区域图像包括的特征点集合的图像参数与所述贴图区域图像的特征点集合的所述图像参数对齐;其中,所述图像参数包括如下至少一项:In this embodiment, the first adjusting unit 43 is further configured to: according to the image parameter of the feature point set of the map area image, image parameters of the feature point set included in the map area image by using the replacement processing Aligning the image parameters of the feature point set of the map area image; wherein the image parameter includes at least one of the following:
尺寸、角度和位置。Size, angle and position.
本实施例中的,上述图像参数对齐具体可以是指抠图区域图像中的特征点集合的图像参数与贴图区域图像的特征点集合的图像参数保持一致性。例如:抠图区域图像中的嘴巴的角度调整为贴图区域图像中的嘴巴的角度,或者抠图区域图像中的人脸外轮廓的尺寸调整为贴图区域图像中的人脸外轮廓的尺寸,再根据抠图区域图像中的嘴巴与人脸外轮廓的尺寸比例,设备抠图区域图像中的嘴巴的尺寸,以及调整抠图区域图像中的眼睛、眉毛和鼻子的尺寸。由于上述可以根据特征点集合的图像参数,调整抠图区域图像包括的特征点集合的图像参数,这样可以实现抠图区域图像的表情与贴图区域图像的表情保持一致性。In the embodiment, the image parameter alignment may specifically mean that the image parameter of the feature point set in the image of the map area is consistent with the image parameter of the feature point set of the map area image. For example, the angle of the mouth in the image of the map area is adjusted to the angle of the mouth in the image of the map area, or the size of the outline of the face in the image of the map area is adjusted to the size of the outline of the face in the image of the map area, and then According to the size ratio of the mouth and the outline of the face in the image of the map area, the size of the mouth in the image of the area of the device, and the size of the eyes, eyebrows and nose in the image of the map area are adjusted. Since the image parameters of the feature point set included in the image of the map area can be adjusted according to the image parameters of the feature point set, the expression of the image of the map area and the expression of the image of the map area can be consistent.
本实施例中的,本发明实施例还可以对第二调整单元45处理后的目标图像进行解码处理,将显示解码处理后的目标图像。同理,在获取单元41获取源人脸图像之前还可以对包括源人脸图像的图像进行编码处理,再通过编码后的图像获取到源人脸图像,在计算单元42计算出目标人脸图像之前,还可以对目标图像进行编码处理,再通过编码后的目标图像获取到源人脸图像。In this embodiment, the embodiment of the present invention may further perform decoding processing on the target image processed by the second adjusting unit 45, and display the target image after the decoding process. Similarly, before the acquiring unit 41 acquires the source face image, the image including the source face image may be encoded, and then the source face image is acquired by the encoded image, and the target face image is calculated in the calculating unit 42. Previously, the target image may be encoded, and the source face image may be acquired through the encoded target image.
上述技术方案中,在上面实施例的基础上,实现了多种本实施例中的实施方式,且都可以实现简化人脸图像替换的过程。In the above technical solution, on the basis of the above embodiments, various embodiments in the present embodiment are implemented, and a process of simplifying face image replacement can be realized.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存取存储器(RandomAccess Memory,简称RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
参见图5,本发明实施例提供一种执行图像处理方法的终端设备的硬件结构,该终端设备包括处理器501、存储器502、输入装置503和输出装置504;终端设备中处理器501的数量可以是一个或多个,图5中以一个处理器501为例;终端设备中的处理器501、存储器502、输入装置503和输出装置504可以通过总线或其他方式连接,图5中以通过总线连接为例。 Referring to FIG. 5, an embodiment of the present invention provides a hardware structure of a terminal device that performs an image processing method, where the terminal device includes a processor 501, a memory 502, an input device 503, and an output device 504. The number of processors 501 in the terminal device may be One or more, one processor 501 is taken as an example in FIG. 5; the processor 501, the memory 502, the input device 503, and the output device 504 in the terminal device may be connected by a bus or other manner, and the bus is connected in FIG. For example.
存储器502作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本发明实施例中的图像处理方法对应的程序指令/模块(例如,附图3-附图4所示的图像处理装置中的获取单元41、计算单元42、第一调整单元43、替换单元44和第二调整单元45)。处理器501通过运行存储在存储器502中的软件程序、指令以及模块,从而执行终端设备的各种功能应用以及数据处理,即实现上述方法实施例中的图像处理方法。The memory 502 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, and a module, such as a program instruction/module corresponding to the image processing method in the embodiment of the present invention (for example, FIG. 3 to FIG. 4 The acquisition unit 41, the calculation unit 42, the first adjustment unit 43, the replacement unit 44, and the second adjustment unit 45) in the illustrated image processing apparatus. The processor 501 executes various functional applications and data processing of the terminal device by executing software programs, instructions, and modules stored in the memory 502, that is, implementing the image processing method in the above method embodiments.
存储器502可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器502可进一步包括相对于处理器501远程设置的存储器,这些远程存储器可以通过网络连接至服务器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Moreover, memory 502 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 502 can further include memory remotely located relative to processor 501, which can be connected to the server over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
输入装置503可用于接收输入的数字或字符信息,以及产生与终端的用户设置以及功能控制有关的键信号输入。输出装置504可包括显示屏等显示设备。 Input device 503 can be used to receive input digital or character information and to generate key signal inputs related to user settings and function control of the terminal. Output device 504 can include a display device such as a display screen.
其中,处理器501可以执行如下步骤:获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像;计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像;根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像;将所述替换抠图区域图像替换掉所述贴图区域图像。The processor 501 may perform the following steps: acquiring a source face image, calculating a feature point set of the source face image, and calculating a feature point set including the source face image in the source face image. a map area image; calculating a target face image in the target image, calculating a feature point set of the target face image, and calculating feature points including the target face image in the target face image a map image of the map; adjusting the map area image according to image parameters of the feature point set of the target face image to obtain a replacement map area image; and replacing the map area image with the replacement map area image .
进一步的,处理器501将所述替换抠图区域图像替换掉所述贴图区域图像之后,还可以根据所述目标图像的像素,调整所述替换抠图区域图像的像素以与所述目标图像的像素保持视觉一致性。所述特征点集合包括如下至少一项:眉毛、眼睛、鼻子、嘴巴和人脸外轮廓。Further, after the processor 501 replaces the replacement map area image with the map area image, the pixel of the replacement map area image may be adjusted according to the pixel of the target image to be compared with the target image. The pixels remain visually consistent. The feature point set includes at least one of the following: an eyebrow, an eye, a nose, a mouth, and a contour of a human face.
进一步的,处理器501在根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像时,具体实现为:根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理,得到替换抠图区域图像;其中,所述替换处理包括如下至少一项:缩放、拉伸、旋 转和平移。Further, when the processor 501 adjusts the image of the map area according to the image parameter of the feature point set of the target face image to obtain the image of the replacement map area, the processor 501 is specifically implemented according to the feature of the target face image. And replacing the image of the map area with the image parameter of the point set to obtain a replacement map area image; wherein the replacement processing includes at least one of the following: zooming, stretching, and rotating Turn and pan.
进一步的,处理器501在根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理时,具体实现为:根据所述贴图区域图像的特征点集合的图像参数,通过所述替换处理将所述抠图区域图像包括的特征点集合的图像参数与所述述贴图区域图像的特征点集合的所述图像参数对齐;其中,所述图像参数包括如下至少一项:尺寸、角度和位置。Further, when the processor 501 performs the replacement process on the image of the image of the image according to the image parameter of the feature point set of the target face image, the processor 501 is specifically implemented as: an image parameter according to the feature point set of the image of the texture image Aligning, by the replacement process, an image parameter of the feature point set included in the map area image with the image parameter of the feature point set of the image of the map area image; wherein the image parameter includes at least one of the following : size, angle and position.
本发明实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种图像处理方法,该方法包括:Embodiments of the present invention also provide a storage medium containing computer executable instructions for performing an image processing method when executed by a computer processor, the method comprising:
获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像;Obtaining a source face image, calculating a feature point set of the source face image, and calculating a map area image of the source face image including the feature point set of the source face image;
计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像;Calculating a target face image in the target image, calculating a feature point set of the target face image, and calculating a map area image including the feature point set of the target face image in the target face image;
根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像;Adjusting the image of the map area according to image parameters of the feature point set of the target face image to obtain a replacement map area image;
将所述替换抠图区域图像替换掉所述贴图区域图像。The replacement map area image is replaced with the map area image.
所述将所述替换抠图区域图像替换掉所述贴图区域图像之后,所述方法还包括:After the replacing the image of the replacement area to replace the image of the texture area, the method further includes:
根据所述目标图像的像素,调整所述替换抠图区域图像的像素以与所述目标图像的像素保持视觉一致性。And adjusting pixels of the replacement map area image to maintain visual consistency with pixels of the target image according to pixels of the target image.
进一步的,所述特征点集合包括如下至少一项:眉毛、眼睛、鼻子、嘴巴和人脸外轮廓。Further, the feature point set includes at least one of the following: an eyebrow, an eye, a nose, a mouth, and a contour of a human face.
进一步的,所述根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像,包括:Further, the image of the map area is adjusted according to the image parameter of the feature point set of the target face image, and the image of the replacement map area is obtained, including:
根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理,得到替换抠图区域图像;Substituting the image of the map area according to image parameters of the feature point set of the target face image to obtain a replacement map area image;
其中,所述替换处理包括如下至少一项:缩放、拉伸、旋转和平移。Wherein, the replacement process includes at least one of the following: zooming, stretching, rotating, and panning.
进一步的,所述根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理,包括: Further, the replacing, by the image parameter of the feature point set of the target face image, the replacement processing, including:
根据所述贴图区域图像的特征点集合的图像参数,通过所述替换处理将所述抠图区域图像包括的特征点集合的图像参数与所述述贴图区域图像的特征点集合的所述图像参数对齐;其中,所述图像参数包括如下至少一项:尺寸、角度和位置。And according to the image parameter of the feature point set of the map area image, the image parameter of the feature point set included in the map area image and the image parameter set of the feature point set of the image of the map area image by the replacement processing Alignment; wherein the image parameters include at least one of the following: size, angle, and position.
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。 The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and thus equivalent changes made in the claims of the present invention are still within the scope of the present invention.

Claims (11)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, comprising:
    获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像;Obtaining a source face image, calculating a feature point set of the source face image, and calculating a map area image of the source face image including the feature point set of the source face image;
    计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像;Calculating a target face image in the target image, calculating a feature point set of the target face image, and calculating a map area image including the feature point set of the target face image in the target face image;
    根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像;Adjusting the image of the map area according to image parameters of the feature point set of the target face image to obtain a replacement map area image;
    利用所述替换抠图区域图像替换掉所述贴图区域图像。The map area image is replaced with the replacement map area image.
  2. 如权利要求1所述的方法,其特征在于,所述将所述替换抠图区域图像替换掉所述贴图区域图像之后,所述方法还包括:The method of claim 1, wherein after the replacing the image of the map area with the image of the map area, the method further comprises:
    根据所述目标图像的像素,调整所述替换抠图区域图像的像素以与所述目标图像的像素保持视觉一致性。And adjusting pixels of the replacement map area image to maintain visual consistency with pixels of the target image according to pixels of the target image.
  3. 如权利要求1或2所述的方法,其特征在于,所述特征点集合包括如下至少一项:The method according to claim 1 or 2, wherein the set of feature points comprises at least one of the following:
    眉毛、眼睛、鼻子、嘴巴和人脸外轮廓。Eyebrows, eyes, nose, mouth and contours of the face.
  4. 如权利要求1或2所述的方法,其特征在于,所述根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像,包括:The method according to claim 1 or 2, wherein the adjusting the image of the map area according to the image parameter of the feature point set of the target face image to obtain the image of the replacement map area comprises:
    根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理,得到替换抠图区域图像;Substituting the image of the map area according to image parameters of the feature point set of the target face image to obtain a replacement map area image;
    其中,所述替换处理包括如下至少一项:The replacement process includes at least one of the following:
    缩放、拉伸、旋转和平移。Zoom, stretch, rotate, and pan.
  5. 如权利要求4所述的方法,其特征在于,所述根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理,包括:The method according to claim 4, wherein the performing the replacement processing on the image of the image according to the image parameter of the feature point set of the target face image comprises:
    根据所述贴图区域图像的特征点集合的图像参数,通过所述替换处理将所 述抠图区域图像包括的特征点集合的图像参数与所述贴图区域图像的特征点集合的所述图像参数对齐;其中,所述图像参数包括如下至少一项:According to the image parameter of the feature point set of the map area image, by the replacement processing The image parameter of the feature point set included in the image of the map area is aligned with the image parameter of the feature point set of the map area image; wherein the image parameter includes at least one of the following:
    尺寸、角度和位置。Size, angle and position.
  6. 一种图像处理装置,其特征在于,包括:获取单元、计算单元、第一调整单元和替换单元,其中:An image processing apparatus, comprising: an acquisition unit, a calculation unit, a first adjustment unit, and a replacement unit, wherein:
    所述获取单元,用于获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像;The acquiring unit is configured to acquire a source face image, calculate a feature point set of the source face image, and calculate a map of the feature point set including the source face image in the source face image. Area image
    所述计算单元,用于计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像;The calculating unit is configured to calculate a target face image in the target image, calculate a feature point set of the target face image, and calculate a feature including the target face image in the target face image An image of the map area of the point set;
    所述第一调整单元,用于根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像;The first adjusting unit is configured to adjust the image of the map area according to the image parameter of the feature point set of the target face image to obtain a replacement map area image;
    所述替换单元,用于利用所述替换抠图区域图像替换掉所述贴图区域图像。The replacing unit is configured to replace the map area image with the replacement map area image.
  7. 如权利要求6所述的装置,其特征在于,所述装置还包括:The device of claim 6 wherein said device further comprises:
    第二调整单元,用于根据所述目标图像的像素,调整所述替换抠图区域图像的像素以与所述目标图像的像素保持视觉一致性。a second adjusting unit, configured to adjust pixels of the replacement graphic area image to maintain visual consistency with pixels of the target image according to pixels of the target image.
  8. 如权利要求6或7所述的装置,其特征在于,所述特征点集合包括如下至少一项:The apparatus according to claim 6 or 7, wherein said set of feature points comprises at least one of the following:
    眉毛、眼睛、鼻子、嘴巴和人脸外轮廓。Eyebrows, eyes, nose, mouth and contours of the face.
  9. 如权利要求6或7所述的装置,其特征在于,所述第一调整单元还用于根据所述目标人脸图像的特征点集合的图像参数对所述抠图区域图像进行替换处理,得到替换抠图区域图像;The apparatus according to claim 6 or 7, wherein the first adjusting unit is further configured to perform a replacement process on the image of the map area according to an image parameter of the feature point set of the target face image, Replace the image of the map area;
    其中,所述替换处理包括如下至少一项:The replacement process includes at least one of the following:
    缩放、拉伸、旋转和平移。 Zoom, stretch, rotate, and pan.
  10. 如权利要求9所述的装置,其特征在于,所述第一调整单元还用于根据所述贴图区域图像的特征点集合的图像参数,通过所述替换处理将所述抠图区域图像包括的特征点集合的图像参数与所述贴图区域图像的特征点集合的所述图像参数对齐;其中,所述图像参数包括如下至少一项:The apparatus according to claim 9, wherein the first adjusting unit is further configured to: include, according to the image parameter of the feature point set of the map area image, the image of the map area included by the replacing process An image parameter of the feature point set is aligned with the image parameter of the feature point set of the map area image; wherein the image parameter includes at least one of the following:
    尺寸、角度和位置。Size, angle and position.
  11. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种图像处理方法,其特征在于,该方法包括:A storage medium comprising computer executable instructions for performing an image processing method when executed by a computer processor, the method comprising:
    获取源人脸图像,计算出所述源人脸图像的特征点集合,并计算出所述源人脸图像中包括所述源人脸图像的特征点集合的抠图区域图像;Obtaining a source face image, calculating a feature point set of the source face image, and calculating a map area image of the source face image including the feature point set of the source face image;
    计算出目标图像中的目标人脸图像,计算出所述目标人脸图像的特征点集合,并计算出所述目标人脸图像中包括所述目标人脸图像的特征点集合的贴图区域图像;Calculating a target face image in the target image, calculating a feature point set of the target face image, and calculating a map area image including the feature point set of the target face image in the target face image;
    根据所述目标人脸图像的特征点集合的图像参数调整所述抠图区域图像,得到替换抠图区域图像;Adjusting the image of the map area according to image parameters of the feature point set of the target face image to obtain a replacement map area image;
    将所述替换抠图区域图像替换掉所述贴图区域图像。 The replacement map area image is replaced with the map area image.
PCT/CN2014/089694 2013-11-25 2014-10-28 Image processing method, apparatus, and storage medium WO2015074476A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310606873.2A CN104657974A (en) 2013-11-25 2013-11-25 Image processing method and device
CN201310606873.2 2013-11-25

Publications (1)

Publication Number Publication Date
WO2015074476A1 true WO2015074476A1 (en) 2015-05-28

Family

ID=53178915

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/089694 WO2015074476A1 (en) 2013-11-25 2014-10-28 Image processing method, apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN104657974A (en)
WO (1) WO2015074476A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085822A (en) * 2016-02-16 2017-08-22 北京小米移动软件有限公司 Face image processing process and device
CN107424117A (en) * 2017-07-17 2017-12-01 广东欧珀移动通信有限公司 Image U.S. face method, apparatus, computer-readable recording medium and computer equipment
CN107507217A (en) * 2017-08-17 2017-12-22 北京觅己科技有限公司 Preparation method, device and the storage medium of certificate photo
CN109788312A (en) * 2019-01-28 2019-05-21 北京易捷胜科技有限公司 The replacement method of personage in a kind of video
CN111179285A (en) * 2019-12-31 2020-05-19 珠海方图智能科技有限公司 Image processing method, system and storage medium
CN111861863A (en) * 2019-04-26 2020-10-30 北京陌陌信息技术有限公司 Image processing method, device, equipment and computer storage medium
CN112712459A (en) * 2019-10-24 2021-04-27 北京字节跳动网络技术有限公司 Matting method and device
CN113205451A (en) * 2021-03-30 2021-08-03 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113763411A (en) * 2021-03-25 2021-12-07 北京京东拓先科技有限公司 Image processing method, client and storage medium
US11455729B2 (en) * 2018-07-23 2022-09-27 Tencent Technology (Shenzhen) Company Limited Image processing method and apparatus, and storage medium

Families Citing this family (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106887024B (en) * 2015-12-16 2019-09-17 腾讯科技(深圳)有限公司 The processing method and processing system of photo
CN105741229B (en) * 2016-02-01 2019-01-08 成都通甲优博科技有限责任公司 The method for realizing facial image rapid fusion
CN107103271A (en) * 2016-02-23 2017-08-29 芋头科技(杭州)有限公司 A kind of method for detecting human face
CN105787982B (en) * 2016-02-29 2018-11-09 腾讯科技(北京)有限公司 A kind of method and apparatus making e-book
CN106875329A (en) * 2016-12-20 2017-06-20 北京光年无限科技有限公司 A kind of face replacement method and device
CN106682632B (en) * 2016-12-30 2020-07-28 百度在线网络技术(北京)有限公司 Method and device for processing face image
CN106874861A (en) * 2017-01-22 2017-06-20 北京飞搜科技有限公司 A kind of face antidote and system
CN106909892A (en) * 2017-01-24 2017-06-30 珠海市魅族科技有限公司 A kind of image processing method and system
CN107146199B (en) * 2017-05-02 2020-01-17 厦门美图之家科技有限公司 Fusion method and device of face images and computing equipment
CN107154030B (en) * 2017-05-17 2023-06-09 腾讯科技(上海)有限公司 Image processing method and device, electronic equipment and storage medium
CN107316020B (en) * 2017-06-26 2020-05-08 司马大大(北京)智能系统有限公司 Face replacement method and device and electronic equipment
CN107481317A (en) * 2017-07-31 2017-12-15 广东欧珀移动通信有限公司 The facial method of adjustment and its device of face 3D models
CN107507216B (en) * 2017-08-17 2020-06-09 北京觅己科技有限公司 Method and device for replacing local area in image and storage medium
CN107767325A (en) * 2017-09-12 2018-03-06 深圳市朗形网络科技有限公司 Method for processing video frequency and device
CN107749062B (en) * 2017-09-18 2020-10-30 深圳市朗形网络科技有限公司 Image processing method and device
CN108205822B (en) * 2017-12-13 2020-09-08 中兴通讯股份有限公司 Picture pasting method and device
CN108010032A (en) * 2017-12-25 2018-05-08 北京奇虎科技有限公司 Video landscape processing method and processing device based on the segmentation of adaptive tracing frame
CN108171716B (en) * 2017-12-25 2021-11-26 北京奇虎科技有限公司 Video character decorating method and device based on self-adaptive tracking frame segmentation
CN109978754A (en) * 2017-12-28 2019-07-05 广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN108509915B (en) * 2018-04-03 2021-10-26 百度在线网络技术(北京)有限公司 Method and device for generating face recognition model
CN110418146B (en) * 2018-04-27 2022-02-08 武汉斗鱼网络科技有限公司 Face changing method, storage medium, electronic device and system applied to live scene
CN108921795A (en) * 2018-06-04 2018-11-30 腾讯科技(深圳)有限公司 A kind of image interfusion method, device and storage medium
CN109285160B (en) * 2018-08-29 2022-08-02 成都品果科技有限公司 Image matting method and system
CN109255814A (en) * 2018-09-20 2019-01-22 北京字节跳动网络技术有限公司 Method and apparatus for handling image
CN109285205A (en) * 2018-10-29 2019-01-29 重庆中科云丛科技有限公司 A kind of face exchanges method, system, computer readable storage medium and equipment
CN109658480A (en) * 2018-12-04 2019-04-19 深圳市子瑜杰恩科技有限公司 Short video glass stacking method and Related product
CN111353929A (en) * 2018-12-21 2020-06-30 北京字节跳动网络技术有限公司 Image processing method and device and electronic equipment
CN113569791B (en) * 2019-07-30 2022-06-21 北京市商汤科技开发有限公司 Image processing method and device, processor, electronic device and storage medium
CN110717373B (en) * 2019-08-19 2023-01-03 咪咕文化科技有限公司 Image simulation method, electronic device, and computer-readable storage medium
CN110446066B (en) * 2019-08-28 2021-11-19 北京百度网讯科技有限公司 Method and apparatus for generating video
CN112991358A (en) * 2020-09-30 2021-06-18 北京字节跳动网络技术有限公司 Method for generating style image, method, device, equipment and medium for training model
CN113177879A (en) * 2021-04-30 2021-07-27 北京百度网讯科技有限公司 Image processing method, image processing apparatus, electronic device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1560795A (en) * 2004-03-12 2005-01-05 彦 冯 Substitute method of role head of digital TV. program
CN101051392A (en) * 2006-04-04 2007-10-10 罗技欧洲公司 Real-time automatic facial feature replacement
US20090252435A1 (en) * 2008-04-04 2009-10-08 Microsoft Corporation Cartoon personalization
CN102004897A (en) * 2009-08-31 2011-04-06 索尼公司 Apparatus, method, and program for processing image
CN102483854A (en) * 2009-09-11 2012-05-30 皇家飞利浦电子股份有限公司 Image processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1560795A (en) * 2004-03-12 2005-01-05 彦 冯 Substitute method of role head of digital TV. program
CN101051392A (en) * 2006-04-04 2007-10-10 罗技欧洲公司 Real-time automatic facial feature replacement
US20090252435A1 (en) * 2008-04-04 2009-10-08 Microsoft Corporation Cartoon personalization
CN102004897A (en) * 2009-08-31 2011-04-06 索尼公司 Apparatus, method, and program for processing image
CN102483854A (en) * 2009-09-11 2012-05-30 皇家飞利浦电子股份有限公司 Image processing system

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085822B (en) * 2016-02-16 2020-09-04 北京小米移动软件有限公司 Face image processing method and device
CN107085822A (en) * 2016-02-16 2017-08-22 北京小米移动软件有限公司 Face image processing process and device
CN107424117A (en) * 2017-07-17 2017-12-01 广东欧珀移动通信有限公司 Image U.S. face method, apparatus, computer-readable recording medium and computer equipment
CN107507217A (en) * 2017-08-17 2017-12-22 北京觅己科技有限公司 Preparation method, device and the storage medium of certificate photo
CN107507217B (en) * 2017-08-17 2020-10-16 北京觅己科技有限公司 Method and device for making certificate photo and storage medium
US11455729B2 (en) * 2018-07-23 2022-09-27 Tencent Technology (Shenzhen) Company Limited Image processing method and apparatus, and storage medium
CN109788312A (en) * 2019-01-28 2019-05-21 北京易捷胜科技有限公司 The replacement method of personage in a kind of video
CN109788312B (en) * 2019-01-28 2022-10-21 北京易捷胜科技有限公司 Method for replacing people in video
CN111861863A (en) * 2019-04-26 2020-10-30 北京陌陌信息技术有限公司 Image processing method, device, equipment and computer storage medium
CN112712459A (en) * 2019-10-24 2021-04-27 北京字节跳动网络技术有限公司 Matting method and device
CN112712459B (en) * 2019-10-24 2023-09-19 抖音视界有限公司 Matting method and device
CN111179285A (en) * 2019-12-31 2020-05-19 珠海方图智能科技有限公司 Image processing method, system and storage medium
CN111179285B (en) * 2019-12-31 2023-06-20 珠海方图智能科技有限公司 Image processing method, system and storage medium
CN113763411A (en) * 2021-03-25 2021-12-07 北京京东拓先科技有限公司 Image processing method, client and storage medium
CN113205451A (en) * 2021-03-30 2021-08-03 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113205451B (en) * 2021-03-30 2024-05-24 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN104657974A (en) 2015-05-27

Similar Documents

Publication Publication Date Title
WO2015074476A1 (en) Image processing method, apparatus, and storage medium
US11410284B2 (en) Face beautification method and apparatus, computer device, and storage medium
WO2020199906A1 (en) Facial keypoint detection method, apparatus and device, and storage medium
EP3272115B1 (en) Background modification in video conferencing
WO2016110199A1 (en) Expression migration method, electronic device and system
CN106682632B (en) Method and device for processing face image
US10165201B2 (en) Image processing method and apparatus and terminal device to obtain a group photo including photographer
WO2021218040A1 (en) Image processing method and apparatus
EP3271870A1 (en) Emotion recognition in video conferencing
US10929982B2 (en) Face pose correction based on depth information
US8687039B2 (en) Diminishing an appearance of a double chin in video communications
US9384384B1 (en) Adjusting faces displayed in images
US20140176548A1 (en) Facial image enhancement for video communication
US11917158B2 (en) Static video recognition
US20240046538A1 (en) Method for generating face shape adjustment image, model training method, apparatus and device
WO2022148248A1 (en) Image processing model training method, image processing method and apparatus, electronic device, and computer program product
CN113453027B (en) Live video and virtual make-up image processing method and device and electronic equipment
US20220207917A1 (en) Facial expression image processing method and apparatus, and electronic device
US10354125B2 (en) Photograph processing method and system
WO2022261856A1 (en) Image processing method and apparatus, and storage medium
WO2021155666A1 (en) Method and apparatus for generating image
WO2019205566A1 (en) Method and device for displaying image
CN113628144B (en) Portrait restoration method and device, electronic equipment and storage medium
WO2022213795A1 (en) Image processing method and apparatus, and electronic device
US20220292753A1 (en) Animation generation method for tracking facial expression and neural network training method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14863545

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14863545

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC, EPO FORM 1205N DATED 02.08.2016

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.10.2016)

122 Ep: pct application non-entry in european phase

Ref document number: 14863545

Country of ref document: EP

Kind code of ref document: A1