CN104657974A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN104657974A
CN104657974A CN201310606873.2A CN201310606873A CN104657974A CN 104657974 A CN104657974 A CN 104657974A CN 201310606873 A CN201310606873 A CN 201310606873A CN 104657974 A CN104657974 A CN 104657974A
Authority
CN
China
Prior art keywords
image
point set
unique point
graph region
facial image
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201310606873.2A
Other languages
Chinese (zh)
Inventor
郑志昊
黄飞跃
侯方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shanghai Co Ltd
Original Assignee
Tencent Technology Shanghai Co Ltd
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 Tencent Technology Shanghai Co Ltd filed Critical Tencent Technology Shanghai Co Ltd
Priority to CN201310606873.2A priority Critical patent/CN104657974A/en
Priority to PCT/CN2014/089694 priority patent/WO2015074476A1/en
Publication of CN104657974A publication Critical patent/CN104657974A/en
Pending legal-status Critical Current

Links

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

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

The embodiment of the invention discloses a face replacing method which comprises the following steps: obtaining a source face image, figuring out a feature point set of the source face image, and figuring out a sectional drawing region image, including the feature point set of the source face image, in the source face image; figuring out a target face image in a target image, figuring out a feature point set of the target face image, and figuring out a chartlet region image, including the feature point set of the target face image, in the target face image; regulating the sectional drawing region image according to an image parameter of the feature point set of the target face image to obtain a replaced sectional drawing region image; replacing the chartlet region image by the replaced sectional drawing region image. Correspondingly, the embodiment of the invention further discloses an image processing device. According to the embodiment of the invention, a process of replacing a face can be simplified.

Description

A kind of image processing method and device
Technical field
The present invention relates to image processing field, particularly relate to a kind of image processing method and device.
Background technology
Along with camera and mobile phone etc. have the universal of the equipment of shoot function, photo gets more and more at people's number of times occurred of living.Such as: travel outdoors, get together, people can pass through photo for recording these places in the place such as meeting, and the photo great majority of shooting are at present all portrait photographs.Along with popularizing of internet, people often in online browsing or can deliver photo, and in order to attractive in appearance, online photo often can carry out beautifying operation by people.Such as, the face of oneself or others is replaced, to form new composograph.But current image processing techniques is the replacement being difficult to realize face, just very small amount of image procossing professional just can realize the replacement of face by some image processing softwares, and implementation procedure all manually operates, such as: manually pluck out human face region, more manual face is covered to other human face region.Visible, the process that current face is replaced is too complicated.
Summary of the invention
Embodiments provide a kind of image processing method and device, the process that face is replaced can be simplified.
First aspect, the embodiment of the present invention provides a kind of image processing method, comprising:
Acquisition source facial image, calculates the unique point set of described source facial image, and calculates the stingy graph region image that described source facial image comprises the unique point set of described source facial image;
Calculate the target facial image in target image, calculate the unique point set of described target facial image, and calculate the Maps area image that described target face figure comprises the unique point set of described target facial image;
According to the described stingy graph region image of image parameter adjustment of the unique point set of described target facial image, obtain replacing stingy graph region image;
Described replacement is scratched graph region image and replace described Maps area image.
Second aspect, the embodiment of the present invention provides a kind of image processing apparatus, comprising: acquiring unit, computing unit, the first adjustment unit and replacement unit, wherein:
Described acquiring unit, for obtaining source facial image, calculates the unique point set of described source facial image, and calculates the stingy graph region image that described source facial image comprises the unique point set of described source facial image;
Described computing unit, for calculating the target facial image in target image, calculates the unique point set of described target facial image, and calculates the Maps area image that described target face figure comprises the unique point set of described target facial image;
Described first adjustment unit, for the described stingy graph region image of image parameter adjustment of the unique point set according to described target facial image, obtains replacing stingy graph region image;
Described replacement unit, replaces described Maps area image for described replacement being scratched graph region image.
In technique scheme, obtain source facial image, calculate the unique point set of described source facial image, and calculate the stingy graph region image that described source facial image comprises the unique point set of described source facial image; Calculate the target facial image in target image, calculate the unique point set of described target facial image, and calculate the Maps area image that described target face figure comprises the unique point set of described target facial image; According to the described stingy graph region image of image parameter adjustment of the unique point set of described target facial image, obtain replacing stingy graph region image; Described replacement is scratched graph region image and replace described Maps area image.Compared to existing technology, do not need in the embodiment of the present invention to carry out face replacement by hand, automatically can complete the replacement of face, thus the embodiment of the present invention can simplify the process that face is replaced.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of a kind of image processing method that the embodiment of the present invention provides;
Fig. 2 is the schematic flow sheet of the another kind of image processing method that the embodiment of the present invention provides;
Fig. 3 is the structural representation of a kind of image processing apparatus that the embodiment of the present invention provides;
Fig. 4 is the structural representation of the another kind of image processing apparatus that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the schematic flow sheet of a kind of image processing method that the embodiment of the present invention provides, and as shown in Figure 1, comprises the following steps:
S101, obtain source facial image, calculate the unique point set of described source facial image, and calculate the stingy graph region image that described source facial image comprises the unique point set of described source facial image.
Optionally, it can be specifically the photo that acquisition one comprises source face, calculate source facial image by face recognition algorithms (such as: the Face datection algorithm of Boost cascade framework) again, can be specifically the human face region calculating this photo, the image in this region be exactly source facial image; Above-mentioned photo can be the photo that the equipment reception miscellaneous equipment performing this method sends, or obtains above-mentioned photo from this locality.Certainly can also be directly get source facial image.Namely the process calculating source facial image completes on miscellaneous equipment.
Optionally, the unique point set calculating source facial image can be specifically the unique point set being calculated source facial image by active shape model (Active Shape Model, ASM).Due to above-mentioned source facial image may comprise unique point set form image outside image, add up to according to the feature point set of source facial image so again and calculate stingy graph region image, thus source facial image can be comprised unique point set form image outside image remove, certainly, source facial image also may can not comprise the image outside the image of unique point set formation, and namely source facial image is just above-mentioned stingy graph region image.Can also be specifically the stingy graph region calculating the unique point set comprising described source facial image, and the image that this stingy graph region comprises be exactly above-mentioned stingy graph region image.
Optionally, above-mentioned unique point set can comprise following at least one item:
Eyebrow, eyes, nose, face and face outline.
Owing to just the face characteristic of source facial image can be reflected by above-mentioned eyebrow, eyes, nose, face and face outline, thus realize the replacement of face.Certain the present embodiment can also realize the replacement to ear and head, the process that concrete computation process can be replaced with reference to face.
S102, the target facial image calculated in target image, calculate the unique point set of described target facial image, and calculate the Maps area image that described target face figure comprises the unique point set of described target facial image.
Optionally, can be specifically the human face region calculated by face recognition algorithms in target image, and the image in this region be exactly above-mentioned target facial image.Wherein, the face recognition algorithms of employing includes but not limited to following algorithm:
Based on principal component analysis (PCA) (Principal Component Analysis, PCA) with independent component analysis (Independent Component Analysis, ICA) only face recognition algorithms, based on svd (Singular value Decomposition, SVD) project with KL the recognizer of having the face merged mutually, dual-tree complex wavelet transform (dual tree complex wavelet transform, DT-CWT) the eigenface recognizer keeping projection based on orthogonal field.
The process of this step calculating Maps area image can scratch the computation process of graph region image with reference to above-mentioned calculating, do not do repeat specification herein.
S103, according to the described stingy graph region image of the image parameter of the unique point set of described target facial image adjustment, obtain replacing stingy graph region image.
Optionally, can be specifically the size of the stingy graph region image of adjustment, angle or position, scratch graph region image to obtain above-mentioned replacement.Such as: the size that the size of target facial image compares Maps area image wants large, just needs adjustment to scratch the size of graph region image; Or the angle of Maps area image is different from the angle of source facial image, just need the angle of the stingy graph region image of adjustment consistent with the angle of Maps area image; Or the face of Maps area image opens, and the face scratching graph region image is closed, namely the face of target facial image is different from the position of the face of stingy graph region image, adjustment is so just needed to scratch the position of the face of graph region image, keep consistency with the face of the face and Maps area image that make stingy graph region image, the expression that can realize the expression of the facial image after replacing and the facial image before replacing like this keeps consistency.Wherein, above-mentioned angle specifically can refer to the visual angle of facial image, such as: the visual angle of target facial image is towards a left side, namely target facial image left face can the region that represents of righter face many, and the visual angle of source facial image is placed in the middle, so just need the visual angle of source facial image to adjust toward the left side, keep consistency to make the visual angle of the visual angle of source facial image and target facial image.
S104, graph region image is scratched in described replacement replace described Maps area image.
Optionally, can be specifically graph region image is scratched in replacement override Maps area image, or Maps area image is removed, more stingy for replacement graph region image is labelled to by the region be removed.
Optionally, said method can be specifically be applied to any equipment possessing image processing function, and namely this equipment can be to implement the above described method.Such as: panel computer, mobile phone, electronic reader, telepilot, personal computer (Personal Computer, PC), notebook computer, mobile unit, Web TV, wearable device etc. have the smart machine of network function.
In technique scheme, obtain source facial image, calculate the unique point set of described source facial image, and calculate the stingy graph region image that described source facial image comprises the unique point set of described source facial image; Calculate the target facial image in target image, calculate the unique point set of described target facial image, and calculate the Maps area image that described target face figure comprises the unique point set of described target facial image; According to the described stingy graph region image of image parameter adjustment of the unique point set of described target facial image, obtain replacing stingy graph region image; Described replacement is scratched graph region image and replace described Maps area image.Compared to existing technology, do not need in the embodiment of the present invention to carry out face replacement by hand, automatically can complete the replacement of face, thus the embodiment of the present invention can simplify the process that face is replaced.
Fig. 2 is the schematic flow sheet of the another kind of image processing method that the embodiment of the present invention provides, and as shown in Figure 2, comprises the following steps:
S201, obtain source facial image, calculate the unique point set of described source facial image, and calculate the stingy graph region image that described source facial image comprises the unique point set of described source facial image.
Optionally, it can be specifically the photo that acquisition one comprises source face, calculate source facial image by face recognition algorithms (such as: the Face datection algorithm of Boost cascade framework) again, can be specifically the human face region calculating this photo, the image in this region be exactly source facial image.Certainly can also be directly get source facial image.Namely the process calculating source facial image completes on miscellaneous equipment.
Optionally, the unique point set calculating source facial image can be specifically the unique point set being calculated source facial image by ASM.Due to above-mentioned source facial image may comprise unique point set form image outside image, add up to according to the feature point set of source facial image so again and calculate stingy graph region image, thus source facial image can be comprised unique point set form image outside image remove, certainly, source facial image also may can not comprise the image outside the image of unique point set formation, and namely source facial image is just above-mentioned stingy graph region image.Can also be specifically the stingy graph region calculating the unique point set comprising described source facial image, and the image that this stingy graph region comprises be exactly above-mentioned stingy graph region image.
Optionally, above-mentioned unique point set can comprise following at least one item:
Eyebrow, eyes, nose, face and face outline.
Owing to just the face characteristic of source facial image can be reflected by above-mentioned eyebrow, eyes, nose, face and face outline, thus realize the replacement of face.Certain the present embodiment can also realize the replacement to ear and head, the process that concrete computation process can be replaced with reference to face.
S202, the target facial image calculated in target image, calculate the unique point set of described target facial image, and calculate the Maps area image that described target face figure comprises the unique point set of described target facial image.
S203, according to the described stingy graph region image of the image parameter of the unique point set of described target facial image adjustment, obtain replacing stingy graph region image.
Optionally, can be specifically the size of the stingy graph region image of adjustment, angle or position, scratch graph region image to obtain above-mentioned replacement.
S204, graph region image is scratched in described replacement replace described Maps area image.
S205, pixel according to described target image, the pixel adjusting the pixel and described target image that graph region image is scratched in described replacement keeps visual consistency.
Optionally, can be specifically be adjusted to the pixel with target image by replacing the pixel of scratching graph region image, namely the rear pixel of scratching graph region image of replacing of adjustment be identical with the pixel of target image.Give the visual effect produced just more true to nature like this.Certain step S205 is only that the pixel giving the stingy graph region image of adjustment replacement keeps visual consistency with the pixel of the pixel and described target image that make replacement scratch graph region image.In fact can also according to the pixel of replacing the pixel adjustment aim image scratching graph region image, the pixel of the pixel and described target image of scratching graph region image to make replacement keeps visual consistency.
Optionally, step S203 specifically can comprise:
Image parameter according to the unique point set of described target facial image carries out replacement process to described stingy graph region image, obtains replacing stingy graph region image.
Can be specifically that replacement process is carried out to stingy graph region integral image, can also be that replacement process is carried out to the topography of stingy graph region image, such as: to the upper lip up translation of face, or eyes be stretched, to change the expression of eyes.
Wherein, described replacement process can comprise following at least one item:
Convergent-divergent, stretching, rotation and translation.
Such as: the size of Maps area image is greater than the size of stingy graph region image, so just can according to the size of Maps area image according to the size of scratching graph region image; Or the angle of Maps area image is different from the angle of stingy graph region image, just need the angle etc. of scratching graph region image according to the angular setting of Maps area image.
Optionally, the above-mentioned unique point set according to described target facial image image parameter to described stingy graph region image carry out replacement process specifically can comprise:
According to the image parameter of the unique point set of described Maps area image, alignd with the described described image parameter stating the unique point set of Maps area image by the described image parameter processing the unique point set comprised by described stingy graph region image of replacing; Wherein, described image parameter comprises following at least one item:
Size, angle and position.
Optionally, the alignment of above-mentioned image parameter specifically can refer to that the image parameter of the image parameter of unique point set in stingy graph region image and the unique point set of Maps area image keeps consistency.Such as: the angular setting of scratching the face in graph region image is the angle of the face in Maps area image, or the adjusted size of the face outline in stingy graph region image is the size of the face outline in Maps area image, face again in the stingy graph region image of basis and the dimension scale of face outline, equipment scratches the size of the face in graph region image, and the size of eyes, eyebrow and nose in graph region image is scratched in adjustment.Due to above-mentioned can according to the image parameter of unique point set, the image parameter of the unique point set that graph region image comprises is scratched in adjustment, and the expression of the expression and Maps area image that can realize stingy graph region image like this keeps consistency.
Optionally, the embodiment of the present invention can also carry out decoding process to the target image after step S205 process, by the target image after display decoding process.In like manner, coded treatment can also be carried out to the image comprising source facial image before step S201, then by the Image Acquisition after coding to source facial image, before step S202, coded treatment can also be carried out to target image, then get source facial image by the target image after coding.
In technique scheme, on the basis of embodiment above, achieve the embodiment of plurality of optional, and can realize simplifying the process that face replaces.
Be apparatus of the present invention embodiment below, the method that apparatus of the present invention embodiment realizes for performing the inventive method embodiment one to two, for convenience of explanation, illustrate only the part relevant to the embodiment of the present invention, concrete ins and outs do not disclose, and please refer to the embodiment of the present invention one and embodiment two.
Fig. 3 is the structural representation of a kind of image processing apparatus that the embodiment of the present invention provides, and as shown in Figure 3, comprising: acquiring unit 31, computing unit 32, first adjustment unit 33 and replacement unit 34, wherein:
Acquiring unit 31, for obtaining source facial image, calculates the unique point set of described source facial image, and calculates the stingy graph region image that described source facial image comprises the unique point set of described source facial image.
Optionally, it can be specifically the photo that acquisition one comprises source face, calculate source facial image by face recognition algorithms (such as: the Face datection algorithm of Boost cascade framework) again, can be specifically the human face region calculating this photo, the image in this region be exactly source facial image; Above-mentioned photo can be the photo that described device receives the transmission of other device, or obtains above-mentioned photo from this locality.Certainly can also be directly get source facial image.Namely the process calculating source facial image completes on miscellaneous equipment.
Optionally, the unique point set calculating source facial image can be specifically the unique point set being calculated source facial image by ASM.Due to above-mentioned source facial image may comprise unique point set form image outside image, add up to according to the feature point set of source facial image so again and calculate stingy graph region image, thus source facial image can be comprised unique point set form image outside image remove, certainly, source facial image also may can not comprise the image outside the image of unique point set formation, and namely source facial image is just above-mentioned stingy graph region image.Can also be specifically the stingy graph region calculating the unique point set comprising described source facial image, and the image that this stingy graph region comprises be exactly above-mentioned stingy graph region image.
Optionally, above-mentioned unique point set can comprise following at least one item:
Eyebrow, eyes, nose, face and face outline.
Owing to just the face characteristic of source facial image can be reflected by above-mentioned eyebrow, eyes, nose, face and face outline, thus realize the replacement of face.Certain the present embodiment can also realize the replacement to ear and head, the process that concrete computation process can be replaced with reference to face.
Computing unit 32, for calculating the target facial image in target image, calculates the unique point set of described target facial image, and calculates the Maps area image that described target face figure comprises the unique point set of described target facial image.
Optionally, can be specifically the human face region calculated by face recognition algorithms in target image, and the image in this region be exactly above-mentioned target facial image.Wherein, the face recognition algorithms of employing includes but not limited to following algorithm:
The only face recognition algorithms of Based PC A and ICA, project based on SVD with KL the recognizer of having the face merged mutually, the DT-CWT eigenface recognizer keeping projection based on orthogonal field.
First adjustment unit 33, for the described stingy graph region image of image parameter adjustment of the unique point set according to described target facial image, obtains replacing stingy graph region image.。
Optionally, the first adjustment unit 33 can be specifically that the size of graph region image, angle or position are scratched in adjustment, scratches graph region image to obtain above-mentioned replacement.Such as: the size that the size of target facial image compares Maps area image wants large, just needs adjustment to scratch the size of graph region image; Or the angle of Maps area image is different from the angle of source facial image, just need the angle of the stingy graph region image of adjustment consistent with the angle of Maps area image; Or the face of Maps area image opens, and the face scratching graph region image is closed, namely the face of target facial image is different from the position of the face of stingy graph region image, adjustment is so just needed to scratch the position of the face of graph region image, keep consistency with the face of the face and Maps area image that make stingy graph region image, the expression that can realize the expression of the facial image after replacing and the facial image before replacing like this keeps consistency.Wherein, above-mentioned angle specifically can refer to the visual angle of facial image, such as: the visual angle of target facial image is towards a left side, namely target facial image left face can the region that represents of righter face many, and the visual angle of source facial image is placed in the middle, so just need the visual angle of source facial image to adjust toward the left side, keep consistency to make the visual angle of the visual angle of source facial image and target facial image.
Replacement unit 34, replaces described Maps area image for described replacement being scratched graph region image.
Optionally, replacement unit 34 can be specifically graph region image is scratched in replacement override Maps area image, or is removed by Maps area image, then is labelled to stingy for replacement graph region image by the region be removed.
Optionally, said apparatus can be specifically be applied to any equipment possessing image processing function, and namely this equipment comprises said apparatus.Such as: panel computer, mobile phone, electronic reader, telepilot, PC, notebook computer, mobile unit, Web TV, wearable device etc. have the smart machine of network function.
In technique scheme, obtain source facial image, calculate the unique point set of described source facial image, and calculate the stingy graph region image that described source facial image comprises the unique point set of described source facial image; Calculate the target facial image in target image, calculate the unique point set of described target facial image, and calculate the Maps area image that described target face figure comprises the unique point set of described target facial image; According to the described stingy graph region image of image parameter adjustment of the unique point set of described target facial image, obtain replacing stingy graph region image; Described replacement is scratched graph region image and replace described Maps area image.Compared to existing technology, do not need in the embodiment of the present invention to carry out face replacement by hand, automatically can complete the replacement of face, thus the embodiment of the present invention can simplify the process that face is replaced.
Fig. 4 is the structural representation of a kind of image processing apparatus that the embodiment of the present invention provides, and as shown in Figure 4, comprising: acquiring unit 41, computing unit 42, first adjustment unit 43, replacement unit 44 and the second adjustment unit 45, wherein:
Acquiring unit 41, for obtaining source facial image, calculates the unique point set of described source facial image, and calculates the stingy graph region image that described source facial image comprises the unique point set of described source facial image.
Computing unit 42, for calculating the target facial image in target image, calculates the unique point set of described target facial image, and calculates the Maps area image that described target face figure comprises the unique point set of described target facial image.
First adjustment unit 43, for the described stingy graph region image of image parameter adjustment of the unique point set according to described target facial image, obtains replacing stingy graph region image.
Replacement unit 44, replaces described Maps area image for described replacement being scratched graph region image.
Second adjustment unit 45, for the pixel according to described target image, the pixel adjusting the pixel and described target image that graph region image is scratched in described replacement keeps visual consistency.
Optionally, the second adjustment unit 45 can be specifically be adjusted to the pixel with target image by replacing the pixel of scratching graph region image, and namely the rear pixel of scratching graph region image of replacing of adjustment is identical with the pixel of target image.Give the visual effect produced just more true to nature like this.Certain second adjustment unit 45 is only give the pixel of replacing stingy graph region image to keep visual consistency to make the pixel of the pixel of replacement facial image and described target image.In fact can also according to the pixel of replacing the pixel adjustment aim image scratching graph region image, the pixel of the pixel and described target image of scratching graph region image to make replacement keeps visual consistency.
Optionally, the first adjustment unit 43 can also be used for carrying out replacement process according to the image parameter of the unique point set of described target facial image to described stingy graph region image, obtains replacing stingy graph region image.
Can be specifically that replacement process is carried out to stingy graph region integral image, can also be that replacement process is carried out to the topography of stingy graph region image, such as: to the upper lip up translation of face, or eyes be stretched, to change the expression of eyes.
Wherein, described replacement process can comprise following at least one item:
Convergent-divergent, stretching, rotation and translation.
Such as: the size of Maps area image is greater than the size of stingy graph region image, so just can according to the size of Maps area image according to the size of scratching graph region image; Or the angle of Maps area image is different from the angle of stingy graph region image, just need the angle etc. of scratching graph region image according to the angular setting of Maps area image.
Optionally, first adjustment unit 43 can also be used for the image parameter of the unique point set according to described Maps area image, is alignd with the described described image parameter stating the unique point set of Maps area image by the described image parameter processing the unique point set comprised by described stingy graph region image of replacing; Wherein, described image parameter comprises following at least one item:
Size, angle and position.
Optionally, the alignment of above-mentioned image parameter specifically can refer to that the image parameter of the image parameter of unique point set in stingy graph region image and the unique point set of Maps area image keeps consistency.Such as: the angular setting of scratching the face in graph region image is the angle of the face in Maps area image, or the adjusted size of the face outline in stingy graph region image is the size of the face outline in Maps area image, face again in the stingy graph region image of basis and the dimension scale of face outline, equipment scratches the size of the face in graph region image, and the size of eyes, eyebrow and nose in graph region image is scratched in adjustment.Due to above-mentioned can according to the image parameter of unique point set, the image parameter of the unique point set that graph region image comprises is scratched in adjustment, and the expression of the expression and Maps area image that can realize stingy graph region image like this keeps consistency.
Optionally, the embodiment of the present invention can also carry out decoding process to the target image after the second adjustment unit 45 process, will show the target image after decoding process.In like manner, coded treatment can also be carried out to the image comprising source facial image before acquiring unit 41 obtains source facial image, pass through the Image Acquisition after coding again to source facial image, before computing unit 42 calculates target facial image, coded treatment can also be carried out to target image, then get source facial image by the target image after coding.
In technique scheme, on the basis of embodiment above, achieve the embodiment of plurality of optional, and can realize simplifying the process that face replaces.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random access memory (Random Access Memory is called for short RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (10)

1. an image processing method, is characterized in that, comprising:
Acquisition source facial image, calculates the unique point set of described source facial image, and calculates the stingy graph region image that described source facial image comprises the unique point set of described source facial image;
Calculate the target facial image in target image, calculate the unique point set of described target facial image, and calculate the Maps area image that described target face figure comprises the unique point set of described target facial image;
According to the described stingy graph region image of image parameter adjustment of the unique point set of described target facial image, obtain replacing stingy graph region image;
Described replacement is scratched graph region image and replace described Maps area image.
2. the method for claim 1, is characterized in that, describedly described replacement is scratched after graph region image replaces described Maps area image, and described method also comprises:
According to the pixel of described target image, the pixel adjusting the pixel and described target image that graph region image is scratched in described replacement keeps visual consistency.
3. method as claimed in claim 1 or 2, it is characterized in that, described unique point set comprises following at least one item:
Eyebrow, eyes, nose, face and face outline.
4. method as claimed in claim 3, is characterized in that, the described stingy graph region image of image parameter adjustment of the described unique point set according to described target facial image, obtains replacing stingy graph region image, comprising:
Image parameter according to the unique point set of described target facial image carries out replacement process to described stingy graph region image, obtains replacing stingy graph region image;
Wherein, described replacement process comprises following at least one item:
Convergent-divergent, stretching, rotation and translation.
5. method as claimed in claim 4, is characterized in that, the image parameter of the described unique point set according to described target facial image carries out replacement process to described stingy graph region image, comprising:
According to the image parameter of the unique point set of described Maps area image, alignd with the described described image parameter stating the unique point set of Maps area image by the described image parameter processing the unique point set comprised by described stingy graph region image of replacing; Wherein, described image parameter comprises following at least one item:
Size, angle and position.
6. an image processing apparatus, is characterized in that, comprising: acquiring unit, computing unit, the first adjustment unit and replacement unit, wherein:
Described acquiring unit, for obtaining source facial image, calculates the unique point set of described source facial image, and calculates the stingy graph region image that described source facial image comprises the unique point set of described source facial image;
Described computing unit, for calculating the target facial image in target image, calculates the unique point set of described target facial image, and calculates the Maps area image that described target face figure comprises the unique point set of described target facial image;
Described first adjustment unit, for the described stingy graph region image of image parameter adjustment of the unique point set according to described target facial image, obtains replacing stingy graph region image;
Described replacement unit, replaces described Maps area image for described replacement being scratched graph region image.
7. device as claimed in claim 6, it is characterized in that, described device also comprises:
Second adjustment unit, for the pixel according to described target image, the pixel adjusting the pixel and described target image that graph region image is scratched in described replacement keeps visual consistency.
8. device as claimed in claims 6 or 7, it is characterized in that, described unique point set comprises following at least one item:
Eyebrow, eyes, nose, face and face outline.
9. device as claimed in claim 8, is characterized in that, described first adjustment unit also carries out replacement process for the image parameter of the unique point set according to described target facial image to described stingy graph region image, obtains replacing stingy graph region image;
Wherein, described replacement process comprises following at least one item:
Convergent-divergent, stretching, rotation and translation.
10. device as claimed in claim 9, it is characterized in that, described first adjustment unit, also for the image parameter of the unique point set according to described Maps area image, is alignd with the described described image parameter stating the unique point set of Maps area image by the described image parameter processing the unique point set comprised by described stingy graph region image of replacing; Wherein, described image parameter comprises following at least one item:
Size, angle and position.
CN201310606873.2A 2013-11-25 2013-11-25 Image processing method and device Pending CN104657974A (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN104657974A true CN104657974A (en) 2015-05-27

Family

ID=53178915

Family Applications (1)

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

Country Status (2)

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

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105741229A (en) * 2016-02-01 2016-07-06 成都通甲优博科技有限责任公司 Method for realizing quick fusion of face image
CN105787982A (en) * 2016-02-29 2016-07-20 腾讯科技(北京)有限公司 Method and device for manufacturing e-book
CN106682632A (en) * 2016-12-30 2017-05-17 百度在线网络技术(北京)有限公司 Method and device for processing face images
CN106875329A (en) * 2016-12-20 2017-06-20 北京光年无限科技有限公司 A kind of face replacement method and device
CN106874861A (en) * 2017-01-22 2017-06-20 北京飞搜科技有限公司 A kind of face antidote and system
WO2017101570A1 (en) * 2015-12-16 2017-06-22 腾讯科技(深圳)有限公司 Photo processing method and processing system
CN106909892A (en) * 2017-01-24 2017-06-30 珠海市魅族科技有限公司 A kind of image processing method and system
CN107103271A (en) * 2016-02-23 2017-08-29 芋头科技(杭州)有限公司 A kind of method for detecting human face
CN107154030A (en) * 2017-05-17 2017-09-12 腾讯科技(上海)有限公司 Image processing method and device, electronic equipment and storage medium
CN107316020A (en) * 2017-06-26 2017-11-03 司马大大(北京)智能系统有限公司 Face replacement method, device and electronic equipment
CN107481317A (en) * 2017-07-31 2017-12-15 广东欧珀移动通信有限公司 The facial method of adjustment and its device of face 3D models
CN107507216A (en) * 2017-08-17 2017-12-22 北京觅己科技有限公司 The replacement method of regional area, device and storage medium in image
CN107749062A (en) * 2017-09-18 2018-03-02 深圳市朗形网络科技有限公司 Image processing method and device
CN107767325A (en) * 2017-09-12 2018-03-06 深圳市朗形网络科技有限公司 Method for processing video frequency 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
CN108171716A (en) * 2017-12-25 2018-06-15 北京奇虎科技有限公司 Video personage based on the segmentation of adaptive tracing frame dresss up method and device
CN108205822A (en) * 2017-12-13 2018-06-26 中兴通讯股份有限公司 Chart pasting method and device
CN108509915A (en) * 2018-04-03 2018-09-07 百度在线网络技术(北京)有限公司 The generation method and device of human face recognition model
WO2018201551A1 (en) * 2017-05-02 2018-11-08 厦门美图之家科技有限公司 Facial image fusion method and apparatus and computing device
CN108921795A (en) * 2018-06-04 2018-11-30 腾讯科技(深圳)有限公司 A kind of image interfusion method, device and storage medium
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
CN109285160A (en) * 2018-08-29 2019-01-29 成都品果科技有限公司 One kind is scratched as method and system
CN109658480A (en) * 2018-12-04 2019-04-19 深圳市子瑜杰恩科技有限公司 Short video glass stacking method and Related product
CN109788312A (en) * 2019-01-28 2019-05-21 北京易捷胜科技有限公司 The replacement method of personage in a kind of video
WO2019128508A1 (en) * 2017-12-28 2019-07-04 Oppo广东移动通信有限公司 Method and apparatus for processing image, storage medium, and electronic device
CN110418146A (en) * 2018-04-27 2019-11-05 武汉斗鱼网络科技有限公司 Method of changing face, storage medium, electronic equipment and system applied to live scene
CN110446066A (en) * 2019-08-28 2019-11-12 北京百度网讯科技有限公司 Method and apparatus for generating video
CN110717373A (en) * 2019-08-19 2020-01-21 咪咕文化科技有限公司 Image simulation method, electronic device, and computer-readable storage medium
CN111353929A (en) * 2018-12-21 2020-06-30 北京字节跳动网络技术有限公司 Image processing method and device and electronic equipment
CN112712459A (en) * 2019-10-24 2021-04-27 北京字节跳动网络技术有限公司 Matting method and device
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
CN113569790A (en) * 2019-07-30 2021-10-29 北京市商汤科技开发有限公司 Image processing method and device, processor, electronic device and storage medium

Families Citing this family (9)

* 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
CN107424117B (en) * 2017-07-17 2021-03-30 Oppo广东移动通信有限公司 Image beautifying method and device, computer readable storage medium and computer equipment
CN107507217B (en) * 2017-08-17 2020-10-16 北京觅己科技有限公司 Method and device for making certificate photo and storage medium
CN108985241B (en) * 2018-07-23 2023-05-02 腾讯科技(深圳)有限公司 Image processing method, device, computer equipment and storage medium
CN111861863B (en) * 2019-04-26 2024-08-27 北京陌陌信息技术有限公司 Image processing method, device, equipment and computer 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
CN113205451B (en) * 2021-03-30 2024-05-24 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium
CN117152192A (en) * 2022-05-24 2023-12-01 腾讯科技(深圳)有限公司 Image processing method, apparatus, device, storage medium, and program product

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 (50)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10354125B2 (en) 2015-12-16 2019-07-16 Tencent Technology(Shenzhen) Company Limited Photograph processing method and system
WO2017101570A1 (en) * 2015-12-16 2017-06-22 腾讯科技(深圳)有限公司 Photo processing method and processing system
CN106887024A (en) * 2015-12-16 2017-06-23 腾讯科技(深圳)有限公司 The processing method and processing system of photo
CN105741229A (en) * 2016-02-01 2016-07-06 成都通甲优博科技有限责任公司 Method for realizing quick fusion of face image
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
CN105787982A (en) * 2016-02-29 2016-07-20 腾讯科技(北京)有限公司 Method and device for manufacturing e-book
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
CN106682632A (en) * 2016-12-30 2017-05-17 百度在线网络技术(北京)有限公司 Method and device for processing face images
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
WO2018201551A1 (en) * 2017-05-02 2018-11-08 厦门美图之家科技有限公司 Facial image fusion method and apparatus and computing device
CN107154030A (en) * 2017-05-17 2017-09-12 腾讯科技(上海)有限公司 Image processing method and device, electronic equipment and storage medium
CN107316020A (en) * 2017-06-26 2017-11-03 司马大大(北京)智能系统有限公司 Face replacement method, 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
CN107507216A (en) * 2017-08-17 2017-12-22 北京觅己科技有限公司 The replacement method of regional area, device and storage medium in image
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
CN107749062A (en) * 2017-09-18 2018-03-02 深圳市朗形网络科技有限公司 Image processing method and device
CN108205822B (en) * 2017-12-13 2020-09-08 中兴通讯股份有限公司 Picture pasting method and device
CN108205822A (en) * 2017-12-13 2018-06-26 中兴通讯股份有限公司 Chart pasting method and device
CN108171716B (en) * 2017-12-25 2021-11-26 北京奇虎科技有限公司 Video character decorating method and device based on self-adaptive tracking frame segmentation
CN108171716A (en) * 2017-12-25 2018-06-15 北京奇虎科技有限公司 Video personage based on the segmentation of adaptive tracing frame dresss up 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
WO2019128508A1 (en) * 2017-12-28 2019-07-04 Oppo广东移动通信有限公司 Method and apparatus for processing image, storage medium, and electronic device
CN108509915B (en) * 2018-04-03 2021-10-26 百度在线网络技术(北京)有限公司 Method and device for generating face recognition model
CN108509915A (en) * 2018-04-03 2018-09-07 百度在线网络技术(北京)有限公司 The generation method and device of human face recognition model
CN110418146B (en) * 2018-04-27 2022-02-08 武汉斗鱼网络科技有限公司 Face changing method, storage medium, electronic device and system applied to live scene
CN110418146A (en) * 2018-04-27 2019-11-05 武汉斗鱼网络科技有限公司 Method of changing face, storage medium, electronic equipment 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
CN109285160A (en) * 2018-08-29 2019-01-29 成都品果科技有限公司 One kind is scratched as 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
CN109788312B (en) * 2019-01-28 2022-10-21 北京易捷胜科技有限公司 Method for replacing people in video
CN109788312A (en) * 2019-01-28 2019-05-21 北京易捷胜科技有限公司 The replacement method of personage in a kind of video
CN113569790B (en) * 2019-07-30 2022-07-29 北京市商汤科技开发有限公司 Image processing method and device, processor, electronic device and storage medium
CN113569790A (en) * 2019-07-30 2021-10-29 北京市商汤科技开发有限公司 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
CN110717373A (en) * 2019-08-19 2020-01-21 咪咕文化科技有限公司 Image simulation method, electronic device, and computer-readable storage medium
CN110446066B (en) * 2019-08-28 2021-11-19 北京百度网讯科技有限公司 Method and apparatus for generating video
CN110446066A (en) * 2019-08-28 2019-11-12 北京百度网讯科技有限公司 Method and apparatus for generating video
CN112712459A (en) * 2019-10-24 2021-04-27 北京字节跳动网络技术有限公司 Matting method and device
CN112712459B (en) * 2019-10-24 2023-09-19 抖音视界有限公司 Matting method and device
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

Also Published As

Publication number Publication date
WO2015074476A1 (en) 2015-05-28

Similar Documents

Publication Publication Date Title
CN104657974A (en) Image processing method and device
Shih et al. Style transfer for headshot portraits
US10360710B2 (en) Method of establishing virtual makeup data and electronic device using the same
CN108012081B (en) Intelligent beautifying method, device, terminal and computer readable storage medium
CN104680121B (en) Method and device for processing face image
CN106682632B (en) Method and device for processing face image
JP7448652B2 (en) Image-to-image conversion using unpaired data for supervised learning
US9589178B2 (en) Image processing with facial features
CN109063539B (en) Virtual glasses wearing method and device, computer equipment and storage medium
CN104346136A (en) Method and device for picture processing
KR102390252B1 (en) Technique for providing virtual lighting adjustments to image data
CN111161395A (en) Method and device for tracking facial expression and electronic equipment
Kumar et al. Structure-preserving NPR framework for image abstraction and stylization
CN103995911A (en) Beauty matching method and system based on intelligent information terminal
WO2023155533A1 (en) Image driving method and apparatus, device and medium
JP2023523745A (en) Character string recognition method, apparatus, equipment and medium based on computer vision
CN109087240B (en) Image processing method, image processing apparatus, and storage medium
CN105931204B (en) Picture restoring method and system
CN113379623B (en) Image processing method, device, electronic equipment and storage medium
Tang et al. Making 3D eyeglasses try-on practical
CN104715505A (en) Three-dimensional head portrait generating system and generating device and generating method thereof
CN204791190U (en) Three -dimensional head portrait generation system and device thereof
CN108109158B (en) Video crossing processing method and device based on self-adaptive threshold segmentation
CN112561787A (en) Image processing method, image processing device, electronic equipment and storage medium
US9563940B2 (en) Smart image enhancements

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150527

RJ01 Rejection of invention patent application after publication