CN107507217A - Preparation method, device and the storage medium of certificate photo - Google Patents

Preparation method, device and the storage medium of certificate photo Download PDF

Info

Publication number
CN107507217A
CN107507217A CN201710706884.6A CN201710706884A CN107507217A CN 107507217 A CN107507217 A CN 107507217A CN 201710706884 A CN201710706884 A CN 201710706884A CN 107507217 A CN107507217 A CN 107507217A
Authority
CN
China
Prior art keywords
human face
face region
image
region
deformation
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.)
Granted
Application number
CN201710706884.6A
Other languages
Chinese (zh)
Other versions
CN107507217B (en
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.)
Beijing Foraging Technology Co Ltd
Original Assignee
Beijing Foraging Technology 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 Beijing Foraging Technology Co Ltd filed Critical Beijing Foraging Technology Co Ltd
Priority to CN201710706884.6A priority Critical patent/CN107507217B/en
Publication of CN107507217A publication Critical patent/CN107507217A/en
Application granted granted Critical
Publication of CN107507217B publication Critical patent/CN107507217B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • G06T3/04
    • 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

Abstract

The invention provides a kind of preparation method of certificate photo, device and storage medium, preparation method includes generating standardized face's image according to user's picture and determines target model's image;Obtain the characteristic point of the second human face region and the positional information of characteristic point in the first human face region and standardized face's image in target model's image;Foreground segmentation process is carried out to the first human face region and the second human face region;According to the positional information of characteristic point, global deformation process is carried out to standardized face's image first;Local deformation processing then is carried out to the first human face region and its neighboring region;The first human face region after deformation is replaced with into the second human face region after deformation, the certificate photo after being replaced.The preparation method of the present invention is accurately and securely, on the premise of can not changed ensureing the feature for being standardized facial image, minimally change target model's image for replacement, improve the naturalization degree of certificate photo so that visually look no the vestige of synthesis.

Description

Preparation method, device and the storage medium of certificate photo
Technical field
The present invention relates to technical field of image processing, and in particular to a kind of preparation method of certificate photo, device and storage are situated between Matter.
Background technology
In today's society, all kinds of certificates just like have become identity indispensable in people's life and work and right card It is bright;And with the demand of all kinds of certificates, the people that need to also become for making certificate photo handle essential one of additional clause Step;And in order to substitute cumbersome time-consuming entity photographic means, the software that enables to the face that user directly operated to replace Program is also arisen at the historic moment.
At present, the production method of the certificate photo to being replaced based on human face region mainly has two kinds, and first way is to pass through Extract the set of characteristic points of the first face area image and correspondingly " scratch graph region image ";Calculate in the second human face region image Set of characteristic points and corresponding " textures area image ";According to the parameter of the set of characteristic points of the first face area image " the textures area image " of the second human face region image is adjusted, is obtained " replacing textures area image ";" textures administrative division map will be replaced Picture " replaces described " scratching graph region image ";The second way is the key position of identification region, including first human face region The key position of key position and the second human face region;The key of key position and the second human face region to the first human face region Position is positioned;The key position of the second human face region is calculated to the motion vector field of the key position of the first human face region; According to the motion vector field by the second human face region be deformed to the first human face region position deformed after region;To institute State the region after deformation and carry out naturalization processing.
However, all there occurs changing on geometry on the human face region image finally used for both above-mentioned modes Become;So that the picture shape of the first human face region and the second human face region somewhat difference will be unable to recognize what is finally synthesized Content used in image is provided by which region, and it is one basic to keep information not change in some applications It is required that;Due to technological deficiency as presence, such method is caused to be simply possible to use in recreational application.
The content of the invention
For the problems of the prior art, the present invention provides a kind of preparation method of certificate photo, device and storage medium, system Make process accurately and securely, can minimally change on the premise of the feature for ensureing user's facial image does not change Become target model's image for replacement, improve the naturalization degree of certificate photo so that visually look no the vestige of synthesis.
In order to solve the above technical problems, the present invention provides following technical scheme:
In a first aspect, the present invention provides a kind of preparation method of certificate photo, the preparation method includes:
Standardized face's image is generated according to user's picture of reception, and determines target model's image;
The second face in the first human face region and standardized face's image in the target model image is obtained respectively The characteristic point in region and the positional information of characteristic point;
Respectively to first human face region and the second face in the target model image and standardized face's image Region carries out foreground segmentation process;
According to first human face region and the positional information of the characteristic point of the second human face region, to the standardized face Image carries out global deformation process so that the size of the second human face region in the standardized face's image after deformation and position with The size of first human face region and the difference of position are in preset range;
According to the first human face region and the positional information of the characteristic point of the second human face region after deformation, to the target mould The first human face region in special image and its neighboring region carry out local deformation processing so that first human face region with it is described The geometry of second human face region is identical;Wherein, the neighboring region is the extension centered on first human face region Region in region and adjacent with first human face region;
The first human face region after deformation is replaced with into the second human face region after deformation, obtains including second face Target model's image in region.
Further, before the generation standardized face's image according to user's picture of reception, methods described is also wrapped Include:
Obtain certificate photo material picture;
Each certificate photo material picture is verified successively, and the certificate photo material picture all by verification is set For identical picture format;
And by all by verification and form identical described in certificate photo material picture be stored in certificate photo image In database;
Corresponding, it is described that standardized face's image is generated according to user's picture of reception, and target model's image is determined, Including:
Receive user's picture;
User's picture is verified;
If user's picture generates standardized face's image by verification according to user's picture;
Model's image selection instruction that user sends is received, wherein, model's image selection instruction includes target mould Corresponding mark of the special image in the certificate photo image data base;
And the corresponding mark in being instructed according to model's image selection, transferred in the certificate photo image data base Target model's image.
Further, methods described also includes:
Target model's image including second human face region is shown;
And if receiving secondary edit instruction, according to the secondary edit instruction to described including second people Target model's image in face region enters edlin;
Instruction is developed and printed if receiving, instruction is developed and printed according to, by the corresponding mesh for including second human face region Mark model's image is sent to developing and printing equipment so that the target for including second human face region developed and printed equipment interconnection and received Model's image is developed and printed.
Further, in first human face region and standardized face's image obtained respectively in target model's image The characteristic point of second human face region and the positional information of characteristic point, including:
Target area detection of attribute is carried out to the target model image and standardized face's image respectively, and extracted respectively Each characteristic point of first human face region and the second human face region and the positional information of each characteristic point.
Further, it is described in the target model image and standardized face's image to first human face region and Second human face region carries out foreground segmentation process, including:
According to the structural relation between each characteristic point of first human face region, by the target model image One human face region is split with environmental background, obtains the mask of first human face region and first human face region;
And according to the structural relation between each characteristic point of second human face region, scheme in the standardized face The second human face region is split with environmental background as in, obtains covering for second human face region and second human face region Mould.
Further, it is described according to first human face region and the positional information of the characteristic point of the second human face region, it is right The standardized face's image carries out global deformation process so that the second human face region in the standardized face's image after deformation Size and the size of position and first human face region and the difference of position be in preset range, including:
According to the characteristic point of first human face region and the second human face region, established using global distortion removal method several What deformation model;
Global deformation process is carried out to the standardized face's image based on the geometric deformation model;
And the deformation results according to the standardized face's image, the corresponding feature for adjusting second human face region The positional information of point and the mask of second human face region.
Further, the position letter of the characteristic point of first human face region according to after deformation and the second human face region Breath, local deformation processing is carried out to the first human face region in the target model image and its neighboring region so that described the One human face region is identical with the geometry of second human face region, including:
The second face area in the first human face region and the standardized face's image in the target model image Protecting frame is set respectively outside each characteristic point in domain, wherein, the position of the protecting frame is built according to the central point of protecting frame, its In, the central point of protecting frame is the center in the closing convex closure region being made up of the circumference of whole characteristic points;
And according to the first human face region and the positional information of the characteristic point of the second human face region after deformation, described In protecting frame outside each characteristic point of the first human face region in target model's image, the first face for being controlled each characteristic point The carry out deformation process in region so that first human face region is identical with the geometry of second human face region.
Further, first human face region by after deformation replaces with the second human face region after deformation, is wrapped Target model's image of second human face region is included, including:
The first human face region after deformation is replaced with into the second human face region after deformation, and the region replaced is after deformation The first human face region mask and deformation after the second human face region mask intersection area, obtain including second people Target model's image in face region;
And nature is carried out to second human face region in target model's image including second human face region Change fusion treatment.
Second aspect, the present invention also provide a kind of producing device of certificate photo, and the producing device includes:Memory, place The computer program managed device and storage on a memory and can run on a processor, computer journey described in the computing device The step of preparation method of the certificate photo is realized during sequence.
The third aspect, the present invention also provide a kind of computer-readable recording medium, are stored thereon with computer program, the meter The step of calculation machine program realizes the preparation method of the certificate photo when being executed by processor.
As shown from the above technical solution, preparation method, device and the storage medium of a kind of certificate photo provided by the invention, its In preparation method include generating standardized face's image according to user's picture and determine target model's image;Obtain target model The characteristic point of the second human face region in the first human face region and standardized face's image in image and the position letter of characteristic point Breath;Foreground segmentation process is carried out to the first human face region and the second human face region;According to the positional information of characteristic point, first to mark Standardization facial image carries out global deformation process;Local deformation processing then is carried out to the first human face region and its neighboring region; The first human face region after deformation is replaced with into the second human face region after deformation, the certificate photo after being replaced.The present invention's Preparation method accurately and securely, can ensure be standardized facial image feature not change on the premise of, minimum journey Degree ground changes target model's image for replacement, improves the naturalization degree of certificate photo,.The present invention manufacturing process and make The vestige for visually looking no synthesis is obtained, can ensure that the human face region of the certificate photo after replacing does not change, and solve Regional area deforms composograph caused by with local area periphery gross distortion not in human face region replacement technology in certificate photo Real problems.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the preparation method of certificate photo of the present invention;
Fig. 2 be the certificate photo of the present invention preparation method in step A01 to A03 before step 100 schematic flow sheet;
Fig. 3 be the present invention certificate photo preparation method in step 100 schematic flow sheet;
Fig. 4 be the certificate photo of the present invention preparation method in step 600 front and rear step B01 to B03 journey schematic diagram;
Fig. 5 be the present invention certificate photo preparation method in step 200 schematic flow sheet;
Fig. 6 be the present invention certificate photo preparation method in step 400 schematic flow sheet;
Fig. 7 be the present invention certificate photo preparation method in step 500 schematic flow sheet;
Fig. 8 be the present invention certificate photo preparation method in step 600 schematic flow sheet;
Fig. 9 is the schematic flow sheet of the preparation method of the certificate photo in application example of the present invention;
Figure 10 be the certificate photo in application example of the present invention preparation method in certificate photo data classification schematic diagram;
Figure 11 be the certificate photo in application example of the present invention preparation method in user input human face data data type Schematic diagram;
Figure 12 be the certificate photo in application example of the present invention preparation method in face replace schematic flow sheet;
Figure 13 be the certificate photo in application example of the present invention preparation method in face replace feasibility method of calibration Schematic flow sheet;
Figure 14 is a kind of structural representation of the manufacturing system of certificate photo of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, clear, complete description is carried out to the technical scheme in the embodiment of the present invention, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
The defects of certificate photo of the prior art is made present in case is directed to, the invention provides a kind of certificate photo Preparation method, the advantage of preparation method of the invention, which essentially consists in, keeps user's shape of face not change, thus effect looks It is more natural and can pick out or user, and the preparation method of the application reality compared with 3D mode is transformed into from 2D The saving in computing resource is showed, while the feature that can ensure to be standardized facial image does not change.
Embodiments of the invention one provide a kind of a kind of embodiment of the preparation method of certificate photo, referring to Fig. 1, The preparation method of the certificate photo specifically includes following content:
Step 100:Standardized face's image is generated according to user's picture of reception, and determines target model's image.
In step 100, the producing device of certificate photo generates standardized face's image according to user's picture of reception, and really Set the goal model's image.It is understood that after target model image and standardized face's image is acquired respectively, then may be used The face of user is replaced with to enter to be about to face in target model's image to operate.
Step 200:Second in the first human face region and standardized face's image in target model's image is obtained respectively The characteristic point of human face region and the positional information of characteristic point.
In step 200, the producing device of certificate photo obtains the first human face region and mark in target model's image respectively The characteristic point of the second human face region and the positional information of characteristic point in standardization facial image;It is it will be appreciated that described the first Area attribute of the face region in the target model image is with second human face region in the target model image Area attribute is identical, and it is target model's image to be provided with the image obtained after the final replacement of processor of characteristic point acquiring unit The second human face region in background area and the standardized face's image.Positional information can be comprising key feature, profile Etc. relevant location information.
In order to which the first human face region in target model's image is accurately replaced with into the second human face region, determining The characteristic point of the second human face region in the first human face region and standardized face's image of target model's image and characteristic point , it is necessary to which the first human face region is distinguished from the environmental background of target model's image after positional information, and by the first face Region also distinguishes from the environmental background of standardized face's image, so could be to the first human face region and the second face area Domain accurately handle and replace.
Step 300:To first human face region and second in the target model image and standardized face's image Human face region carries out foreground segmentation process.
In step 300, the producing device of certificate photo in the target model image and standardized face's image to institute State the first human face region and the second human face region carries out foreground segmentation process.It is understood that can according to each characteristic point it Between structural relation background segment processing is carried out to first human face region and the second human face region;The characteristic point of face includes Eyebrow, eyes, nose, mouth, the position etc. of face mask, therefore, the structural relation between the characteristic point of face can be according to people The priori of face structure obtains, and the priori of human face structure is the time-space relationship of facial muscles interaction, i.e., by people The anatomical structure of face is determined, is not influenceed by imaging circumstances.
Because the profile of the first human face region and the profile of the second human face region are normally present difference, and benchmark image The first human face region outside generally corresponds to background suitable for different certificate requirements, therefore the prospect in through step 200 point Cut processing obtain benchmark image the first human face region and replace image in the second human face region after, it is necessary to replace image in The second human face region carry out profile on global adaptation, with reduce replace image in the second human face region and the first face area Difference between the profile in domain.
Step 400:According to first human face region and the positional information of the characteristic point of the second human face region, to the mark Standardization facial image carries out global deformation process so that the size of the second human face region in the standardized face's image after deformation It is in the difference of the size and position of position and first human face region in preset range.
In step 400, the producing device of certificate photo is according to the feature of first human face region and the second human face region The positional information of point, global deformation process is carried out to the standardized face's image so that the standardized face's image after deformation In the size of the second human face region and the size of position and first human face region and the difference of position be in preset range It is interior.It is understood that the preset range determines according to practical situation in actual applications, and preset range setting Principle is consistent with the size of first human face region to cause the size of the second human face region as far as possible.By taking face as an example, in order to Ensure that size is consistent with position, can by rigid body translation (Rigid Transformation), according to target model image and The key coordinate of face in standardized face's image, using least square method and the constant algorithm of stochastical sampling (RANSAC), calculate Transformation matrix is obtained, and then standardized face's image is mapped in target model's image coordinate system.
Step 500:According to the first human face region and the positional information of the characteristic point of the second human face region after deformation, to institute State the first human face region in target model's image and its neighboring region carries out local deformation processing so that the first face area Domain is identical with the geometry of second human face region;Wherein, the neighboring region be using first human face region in Region in the extended area of the heart and adjacent with first human face region.
Wherein, the extended area can be arranged to arbitrary shape according to practical situations, for example, the extended area For rectangular area or border circular areas etc..
In step 500, after the global adaptation that the second human face region in standardized face's image carries out on profile, To improve the accuracy replaced between the first human face region and the second human face region, it is also necessary to first in target model's image Human face region carries out local directed complete set, i.e., the producing device of certificate photo is according to the first human face region and the second human face region after deformation Characteristic point positional information, local deformation is carried out to the first human face region in the target model image and its neighboring region Processing so that first human face region is identical with the geometry of second human face region.It is to be appreciated that this step is The important step of the application, the accurate effect of image after manufacturing process can be realized simultaneously quickly and replaced.Wherein, geometry knot Structure refers to the position where appearance profile and characteristic point;And geometry it is identical including:First human face region and described second The appearance profile of human face region is identical, a certain characteristic point in first human face region is corresponding with second human face region Characteristic point where position be respectively positioned in a default scope for this feature point;Specifically, first face Position where a certain characteristic point eyes characteristic point eyes corresponding with the face of second human face region of the face in region Setting in one in the default scope of this feature point eyes;This can set for the default scope of this feature point eyes It is corresponding with the face of second human face region for 3mm, i.e., a certain characteristic point eyes of the face of described first human face region Characteristic point eyes where the difference of position coordinates be less than or equal to 3mm.
Step 600:The first human face region after deformation is replaced with into the second human face region after deformation, obtains including described Target model's image of second human face region.
In step 600, the first human face region after the second human face region and local deformation after obtaining global deformation Afterwards, the first human face region after deformation is replaced with the second human face region after deformation by the producing device of certificate photo, including Target model's image of second human face region.Here, suppose that target model image is P, standardized face's image Q, treat Replacement region is S, and non-replaced region is NS, and the image finally synthesized is that P ' needs to meet
P ' (S)=Q (S)
P ' (NS)=P (NS)
It was found from foregoing description, the manufacturing process of the preparation method of the certificate photo in embodiments of the invention is rapidly and reliably Property it is high, and improve the accuracy of the replacement of the regional area of facial image, can ensure that the human face region after making does not occur Change, solve in certificate photo in human face region replacement technology caused by regional area deformation and local area periphery gross distortion Composograph invalidity problem, while reduce the time-consuming and cost of manufacturing process.
Embodiments of the invention two provide step A01 in the preparation method of above-mentioned certificate photo before step 100 to walking A kind of rapid A03 embodiment, referring to Fig. 2, the step A01 to step A03 specifically includes following content:
Step A01:Obtain certificate photo material picture.
Step A02:Each certificate photo material picture is verified successively, and will all pass through the certificate photo material of verification Picture is arranged to identical picture format.
Step A03:By all by verification and form identical described in certificate photo material picture be stored in certificate photo figure As in database.
Corresponding, referring to Fig. 3, the step 100 includes:
Step 101:Receive user's picture.
Step 102:User's picture is verified;
If user's picture is by verification, into step 103;Otherwise, then unsuccessfully believe in user terminal displays verification Breath, and prompt shooting skill of the user on user's picture.
In a step 102, verification is carried out to user's picture to specifically include:
The characteristic point and characteristic point of the second human face region in first human face region and standardized face's image Positional information, judge first human face region be used for examine attribute information and the use in corresponding second human face region In inspection attribute information whether in default range of attributes, that is, judge whether the standardized face's image passes through inspection.
It is understood that the spy of the second human face region in first human face region and standardized face's image Sign point and characteristic point positional information, judge first human face region and the second human face region attribute information to be tested whether In tolerance interval, that is to say, that whether criterion facial image passes through verification.
If so, then enter step 103.
Otherwise, then into step 106.
Step 103:Standardized face's image is generated according to user's picture;
Step 104:Model's image selection instruction that user sends is received, wherein, wrapped in model's image selection instruction Include corresponding mark of the target model image in the certificate photo image data base.
Step 105:Corresponding mark in being instructed according to model's image selection, is adjusted in the certificate photo image data base Take target model's image.
Step 106:Judge that the second human face region in current standardized facial image can not be replaced in target model's image The first human face region, and export can not replace inform prompting.It is understood that judging current standardized facial image In the second human face region can not replace the first human face region in target model's image after, export can not replace inform and carry Show so that user knows respective feedback information.
It was found from foregoing description, the manufacturing process of the preparation method of the certificate photo in embodiments of the invention is complete and can Lean on, improve user and carrying out the Consumer's Experience of certificate photo making.
Embodiments of the invention three provide step B01 in the preparation method of above-mentioned certificate photo after step 600 to walking A kind of rapid B03 embodiment, referring to Fig. 4, the step B01 to step B03 specifically includes following content.
Step B01:Target model's image including second human face region is shown;
Step B02:If receiving secondary edit instruction, according to the secondary edit instruction to described including described second Target model's image of human face region enters edlin.
Step B03:Instruction is developed and printed if receiving, instruction is developed and printed according to, includes second face by corresponding to Target model's image in region is sent to developing and printing equipment so that it is described develop and print that equipment interconnection receives include the second face area Target model's image in domain is developed and printed.
It was found from foregoing description, the preparation method of the certificate photo in embodiments of the invention, there is provided it is a kind of reliable and The method of calibration of the replaceability of quick regional area, if verifying successfully, then carries out the making of certificate photo, and then after ensure that The accuracy and availability of the replacement result of continuous regional area, improve the practicality and reliability of whole preparation method, and carry The high integrated degree of manufacturing process, improves user and is carrying out the Consumer's Experience of certificate photo making.
Embodiments of the invention four provide a kind of specific embodiment party of step 200 in the preparation method of above-mentioned certificate photo Formula, referring to Fig. 5, the step 200 specifically includes following content:
Step 201:Target area detection of attribute is carried out to the target model image and standardized face's image respectively, really The positional information of fixed first human face region and the second human face region.
Step 202:Each characteristic point of first human face region and the second human face region and each characteristic point are extracted respectively Positional information.
In step 202, the operations such as the feature extraction of usual model, foreground segmentation are just completed when making database , the response speed so handled faster, of course simultaneously processing can also, knowledge needs more computing resource, and algorithm is placed on this Extraction process is not needed during ground processing then, the positional information of the characteristic point is that position of this feature point in region is sat Mark.It is understood that first human face region is carried out to input target model image and standardized face's image first With the feature point detection of the second human face region.The basis of feature point detection is advanced row Face datection to position target model's image With standardized face's image position.
It is presently disclosed for example, if the first human face region and the second human face region are positive and unobstructed face A large amount of Face datection algorithms (AdaBoost, NPD, MTCNN etc.) can be achieved accurately to detect face.Complete Face datection Afterwards, feature point extraction is carried out to the face detected, the method for feature point extraction includes but is not limited to based on deep learning (as deeply Spend autoencoder network, depth Recurrent networks etc.) and method based on active contour model (such as ASM, AAM etc.).
It was found from foregoing description, in the preparation method of the certificate photo of embodiments of the invention, there is provided a kind of reliable and fast The characteristic point of the second human face region in the first human face region and standardized face's image in acquisition target model's image of speed And the method for the positional information of characteristic point, and the degree of accuracy of the characteristic point and the positional information of characteristic point obtained is high, is follow-up office The replacement in portion region provides accurate data basis.
In a kind of embodiment, a kind of embodiment of step 300 in the preparation method of above-mentioned certificate photo. The setting target of the step 300 is the structural relation between each characteristic point according to first human face region, in the mesh The first human face region is split with environmental background in mark model's image, obtains first human face region and first face The mask in region, and, according to the structural relation between each characteristic point of second human face region, in the standardized face The second human face region is split with environmental background in image, obtains second human face region and second human face region Mask, it specifically includes following content:
On the whole, the step 300 includes:
(1) according to the profile point of the first human face region or the second human face region to contract and expand outwardly generation prospect and Background area;Obtain the first doubtful foreground and background mask.
(2) mask being previously obtained and original image are split using oneCut algorithms, further refine background and Foreground area, obtain the second doubtful foreground and background mask.
(3) finally, foreground area is handled using morphology (including opening operation and profile repairing, fill depression area Domain), obtain final foreground and background mask.
Specifically, step 301:Doubtful foreground and background region initialization.Here auxiliary information is the face of face Key point positional information, although having obtained the outline position of face in step 200, these positional information degrees of accuracy are not It is enough, can not directly generate segmentation result, but can by the way that face mask to contract and is expanded outwardly, obtain doubtful prospect and Background area is as initial segmentation region.Specifically, according to each feature of first human face region and the second human face region Structural relation between point, the first human face region and environmental background are subjected to initial segmentation in the target model image, and The second human face region and environmental background are subjected to initial segmentation in the standardized face's image.
Step 302:On the basis of primary segmentation can utilize many efficiently and accuratelies dividing method (such as graphCut, GrabCut, oneCut, ACM etc.) carry out secondary Accurate Segmentation.A kind of preferable scheme is one cut in grabcut algorithms, Algorithm is cut different from traditional figure, for the algorithm without iteration, segmentation can be achieved in once-through operation, and then obtains foreground area;
Step 303:Post-process the foreground area optimized, including gray value limitation and Morphological scale-space (opening and closing operation With filling hole), on the one hand ensure face area grey similarity, on the other hand ensure the integrality of face mask.
In a kind of embodiment, the step 400 of the application specifically may be summarized to be following content to step 500:
(1) integral position, direction and size change over are carried out to standardized face's image;
(2) benchmark image local geometric is converted;
(3) in order to obtain naturally replacing result, the first human face region and its neighboring region are also adjusted accordingly.
Specifically implementation process is described as follows described in embodiment five and the content of embodiment six:
Embodiments of the invention five provide a kind of specific embodiment party of step 400 in the preparation method of above-mentioned certificate photo Formula, referring to Fig. 6, the step 400 specifically includes following content:
Step 401:According to the characteristic point of first human face region and the second human face region, using global deformation correction side The mode of affine transformation in method establishes geometric deformation model.
It is understood that the mode of affine transformation is not the unique translation mode used in the present embodiment, global deformation Any-mode in antidote can realize the present embodiment step 401 to the conversion process of step 403.
Step 402:Based on the geometric deformation model, the feature of second human face region is determined according to least square method Affine transformation parameter of the point transformation to the characteristic point of the first human face region.
Step 403:Deformation is carried out to the standardized face's image according to the affine transformation parameter so that after deformation The size of the second human face region in standardized face's image and position and the size of first human face region and the difference of position Value is in preset range.
Step 404:According to the deformation results of the standardized face's image, the corresponding spy for adjusting second human face region Levy the positional information of point and the mask of second human face region.
In above-mentioned steps 401 to 404, standardized face's image alignment target model is schemed using the characteristic point extracted Picture.Such as it is used as geometric deformation mould using the first face provincial characteristics point and the second human face region characteristic point, and by the use of affine transformation Type, joined by Least Square Method from the second human face region characteristic point to the affine transformation of the first face provincial characteristics point transformation Number.And it is identical with target model's image size to standardized face's image progress deformation acquisition using the affine transformation parameter, the The standardized face's image that the position of one human face region and the second human face region matches substantially.Carried out to standardized face's image It is also required to carry out deformation to the feature point coordinates of mask and the second human face region with identical parameter while deformation.
It was found from foregoing description, in the preparation method of the certificate photo of embodiments of the invention, there is provided a kind of reliable and fast The characteristic point according to first human face region and the second human face region of speed, the standardized face's image is carried out at deformation Reason method, and then improve the practicality and reliability of whole preparation method.
Embodiments of the invention six provide a kind of specific embodiment party of step 500 in the preparation method of above-mentioned certificate photo Formula, referring to Fig. 7, the step 500 concrete application triangulation network construction method:(1) Feature Points Matching so that the first human face region and The key point of second human face region corresponds;(2) triangulation network is built, and using Delaunay scheduling algorithms, it is netted to establish characteristic point Graph of a relation;(3) loop subdivision algorithms are utilized, to being previously obtained network of personal connections refinement, build the dense triangulation network;(4) Affine parameter estimation and local interpolation are carried out respectively to each subgraph in the network relation figure of structure so that the first after conversion The characteristic point in face region matches completely with the characteristic point position information of the second human face region, specifically includes following content:
Step 501:The characteristic point of first human face region and the second human face region is matched so that the spy of identical label The expressed attribute of sign point is identical;:
Step 502:In addition to key point inside the first human face region and the second human face region and profile point, it is also necessary to increase Outside control point, ensure the first human face region to the second human face region change when, target area and its neighborhood linkage change.
Specifically, the specific set-up mode of extended area is:All characteristic points can just be included by being calculated first The positive rectangle of restriction;Then according to limiting the ratio of positive rectangle, positive rectangle will be limited to external expansion, the rectangular extension area is obtained Domain.
Wherein, multiple quantiles on four summits and four edges of the rectangle after extension are to be used to produce extended area And the characteristic point newly increased.
That is, just ensure human face region and the geometry of peripheral background by adds additional some protective features points Structure does not change, and to the region in the range of protection zone only there occurs trickle geometric deformation beyond human face region, And this geometric deformation is weakened by the triangle gridding of refinement so that visually looks and varies less and almost it is difficult to discover.
Step 503:The triangulation network is built using Delaunay algorithms, spatial relation is built between different characteristic point. The position relationship network of the characteristic point of the first human face region is built according to the positional information of N number of characteristic point of the first human face region; And the position relationship of the characteristic point of the second human face region is built according to the positional information of N number of characteristic point of the second human face region Network;
Step 504:To ensure the follow-up naturality for replacing effect, using Loop subdivison algorithms, in original triangle On the basis of net, the denser triangulation network of structure.Specifically, the position relationship network of first human face region can be entered Row subdivision, obtains M characteristic point so that the characteristic point sum of first human face region is M+N;And to described second The position relationship network of human face region is finely divided, and obtains M characteristic point so that the characteristic point sum of second human face region For M+N;Wherein, N and M is positive integer.
Step 505:After triangulation network structure is completed, each subnet in target model image and standardized face's image can be directed to The position structure affine Transform Model of corresponding three angle points, causes target model image and standardized face's image by projection The position of subnet corresponding region is completely the same.
In step 501 to 505, using the relative coordinate of characteristic point, more characteristic points are generated, by the second human face region The face deformation of model's image is carried out the face geometry with the second human face region by the feature point coordinates after geometric transformation as benchmark Structure is consistent.The protecting frame can be circular frame or rectangle frame, and the position of the protecting frame is according to the central point of protecting frame Structure, wherein, the central point of protecting frame is the center in the closing convex closure region being made up of the circumference of whole characteristic points.
It was found from foregoing description, in the preparation method of the certificate photo of embodiments of the invention, there is provided a kind of reliable and fast Speed according to the first human face region and the positional information of the characteristic point of the second human face region after deformation, the target model is schemed The method that the first human face region as in carries out deformation process, improves the accuracy of the replacement of regional area, can ensure Regional area after replacement does not change, and solves in image regional area deformation and regional area in regional area replacement technology Composograph invalidity problem caused by peripheral gross distortion.
Embodiments of the invention seven provide a kind of specific embodiment party of step 600 in the preparation method of above-mentioned certificate photo Formula, referring to Fig. 8, the step 600 specifically includes following content:
Step 601:The first human face region after deformation is replaced with into the second human face region after deformation, and the region replaced The intersection area of the mask of the second human face region after mask and deformation for the first human face region after deformation, obtains including institute State target model's image of the second human face region.
Step 602:Second human face region in target model's image including second human face region is carried out Naturalization fusion treatment.
The first human face region of target model's image after deformation is replaced using second human face region, is included after replacement The second human face region in target model's image of second human face region is the first human face region and after two width deformation The common factor of two human face region masks;And the second human face region in target model's image including second human face region is entered Row naturalization processing so that the color of target model's image including second human face region is consistent.A kind of feasible method For Poisson editing Poisson editor's algorithms, the algorithm is a kind of seamless spliced algorithm of excellent performance, passes through construction The method of Poisson equation solution pixel optimal values, while source images gradient information is remained, can be very good fusion source The background of image and target image.Simultaneously in order to accelerate to merge speed, input picture is to include the first human face region and the second people Minimum enclosed rectangle including face region.
It was found from foregoing description, in the preparation method of the certificate photo of embodiments of the invention, there is provided a kind of reliable and fast Speed replaces with the first human face region after deformation the second human face region after deformation, obtains including second human face region Target model's image method, and then improve the practicality and reliability of whole preparation method.
It is understood that producing device described above can be a kind of electronic equipment provided with software program, also may be used Think a kind of pre- application program mounted in device end, can also be a kind of pre- function in the application program of device end Module, wherein, device end includes but is not limited to mobile phone, tablet personal computer, PC or embedded system etc..
It is understood that the realization order of the step in the preparation method of above-mentioned certificate photo can according to practical application situation To do any adjustment, however it is not limited to the execution sequence of above steps.
Further to illustrate this programme, present invention also offers a kind of application example of the preparation method of certificate photo, ginseng See Fig. 9 to 13, in the application example, target model's image has particular application as model's image, and standardized face's image specifically should With for user images, second human face region and second human face region are positive facial image, the application example Specifically include following content:
Referring to Fig. 9, this application example is used to illustrate the marketing side for how realizing certificate photo service by the image method of changing face Case, people usually require formal clothes, beautiful hair style when shooting certificate photo.But only carried by the present invention, user Can be just that it generates beautiful certificate photo in the case of for facial image.
First, substantial amounts of certificate photo material is prepared, whether verify material by checking algorithm can be changed face that (verification is A pair of images are carried out, it is assumed here that user images are all direct pictures), specified format is generated if verifying and passing through and is deposited It is placed in database, it is shown in Figure 10.
After user uploads an image, (when comparing posture compared with true face face) is verified to it, verification passes through Standardized face is then generated, as shown in figure 11.
The certificate photo photo of formulation is pushed to by user by Internet software platform (such as App), user selects model to shine System is changed face to model after piece, then by picture presentation to user, if user selects hair dyeing, or selection to change the back of the body Scape, then handled corresponding to the progress of backstage and image effect is showed into user.If user likes corresponding picture, software platform Photo can be rinsed service and be pushed to user, complete the network marketing to the service of rinsing.
Referring to Figure 12, facial feature points detection is carried out to input model's image and user images first and is split with face. The basis of feature point detection be advanced row Face datection with locating human face's image position, because this patent is mainly for front And unobstructed face, presently disclosed a large amount of Face datection algorithms can be achieved accurately to detect.It is right after completing Face datection The face that detects carries out feature point extraction, and characteristic point is commonly referred to as the eyebrow of face, eyes, nose, mouth, face mask Position, the method for feature point extraction is more including based on deep learning, based on active contour model, and the application is not limited to make With which kind of method, it is only necessary to ensure that the extraction of characteristic point is accurate.
Using the human face characteristic point extracted, using the priori of human face structure, face foreground and background can be obtained A primary segmentation.The dividing method of many efficiently and accuratelies can be utilized on the basis of this primary segmentation (such as GraphCut, grabCut, oneCut, ACM etc.) carry out face segmentation.The mask of human face region can be obtained by above step With the coordinate of characteristic point.
Then using the human face characteristic point extracted by user images align model's image.Such as:Utilize model's characteristic point With user characteristics point, and by the use of affine transformation as geometric deformation model, by Least Square Method from user characteristics point to mould The affine transformation parameter of feature point transformation.And user images are carried out with deformation acquisition using the affine transformation parameter and is schemed with model Picture size is identical, the user images that face location matches substantially.It is also required to while deformation is carried out to user images with identical Parameter deformation is carried out to face mask and the feature point coordinates of user.
Subsequently, using the feature point coordinates after user's geometric transformation as benchmark, by the face deformation of model's image come with The face geometry of user is consistent.At this moment problem is converted to the image precise registration problem with known matching characteristic point.Such as Fruit now directly uses smart method for registering, such as carries out affine transformation using local triangulation networks or use Spline Interpolation Method Matched, image can be caused unnatural, such as triangle network method can have a fracture of pixel between triangle gridding, and batten Interpolation can cause the excessive distortion of image.In order to eliminate above phenomenon, this patent sets a protection outside characteristic point region Rectangle frame (by way of the profile point increase of rectangle frame is characterized a little), deformation is mainly carried out in rectangle frame, is so had The scope of the control deformation of effect.Followed by the relative coordinate of characteristic point, more characteristic points are generated.Such as by characteristic point The triangulation network is built, and Loop subdivision subdivisions are carried out to the triangulation network.A large amount of control points after extension can cause essence to match somebody with somebody Will definitely be to obtain very smooth natural image.Above deformation process is intended to carry out the image of model and the mask of model's face.
The face of model after deformation finally is replaced using the face of user, the region of replacement is image face after two width deformation The common factor of mask.And naturalization processing is carried out to the face after replacement so that the color of image is consistent.Naturalization processing can make With graph cut method or other image interfusion methods.
Referring to Figure 13, above method is carried out under the assumed condition that two images can replace naturally, but simultaneously It is not that any image for including two width faces can carry out nature replacement.In order to improve the inspection that the experience of user needs to automate Survey whether two images can mutually replace.The condition that can be replaced is that the face of two images is substantially consistent.And cause two It is several aspects that width image, which replaces unnatural principal element,:A. whether wearing spectacles;B. whether the posture of face is consistent; C. whether illumination is consistent.The situation for generally working as user's wearing spectacles is difficult to handle naturally (difference for considering leg of spectacles), especially It is at ear, is exactly not allow it to pass through verification if user's wearing spectacles in processing procedure thus.
Thus need with eyeglass detection method in method of calibration, can be with due to the position of human face characteristic point can be obtained Easily obtain eye areas image, then decide whether it is that the models of glasses can determine whether by two classification algorithm training one Whether wearing spectacles.
And to be also another influence to replace the principal element of effect pose problem, such as when model is that left side hides face and user It is that general image after then being replaced with front face will be very unnatural.Thus need by the parameter for the posture for calculating face, And only allow the image with smaller posture difference to by verification, characterize the parameter of head part's posture have 3 be respectively yaw angle, The angle of pitch and roll angle, and these three parameters can calculate acquisition by the feature point coordinates of face.
Illumination factor is the factor that another mainly influences to change face, facial illumination patterns situation, in skewness and Difference angle can be estimated when smaller by simple light intensity and compensation is relaxed, and when degree of irregularity is higher, it is few Amount strength difference compensation after even can cause with being discord around face, in order to avoid the appearance of this phenomenon, first estimate The light conditions of face, light is not allowed for be distributed highly non-uniform image by verification, and it is only few to different facial zones The image for measuring light intensity difference carries out illumination compensation, then passes through verification.
It was found from foregoing description, application example of the invention reduces the hardware of the system for the making that can realize certificate photo Cost, dispose more flexibly and fast, dilatation easy to maintain, there is provided more stable service.More preferable Consumer's Experience, and it made The calculating cost of journey is low, and real-time is high, image procossing validity is high.
Embodiments of the invention eight provide a kind of card of Overall Steps in the preparation method that can realize above-mentioned certificate photo A kind of embodiment for the manufacturing system that part shines, referring to Figure 14, the manufacturing system of the certificate photo is specifically included in following Hold:
Standardized face's image and target model image determination unit 10, for generating standard according to user's picture of reception Change facial image, and determine target model's image.
Characteristic point acquiring unit 20, for obtaining the first human face region and standardized face in target model's image respectively The characteristic point of the second human face region and the positional information of characteristic point in image;Wherein, first human face region is in the mesh It is identical to mark area attribute of the area attribute in model's image with second human face region in the target model image.
Dividing processing unit 30, in the target model image and standardized face's image to first face Region and the second human face region carry out foreground segmentation process.
Standardized face's image deformation unit 40, for the feature according to first human face region and the second human face region The positional information of point, global deformation process is carried out to the standardized face's image so that the standardized face's image after deformation In the size of the second human face region and the size of position and first human face region and the difference of position be in preset range It is interior.
Target model's image deformation unit 50, for according to the first human face region after deformation and the spy of the second human face region The positional information of point is levied, the first human face region in the target model image and its neighboring region are entered at partial row's deformation Reason so that first human face region is identical with the geometry of second human face region;Wherein, the neighboring region be with Region in extended area centered on first human face region and adjacent with first human face region.
Regional area replacement unit 60, for the first human face region after deformation to be replaced with to the second face area after deformation Domain, obtain the target model's image for including second human face region.
The embodiment of the manufacturing system of certificate photo provided by the invention specifically can be used for performing above-mentioned each preparation method reality The handling process of example is applied, its function will not be repeated here, and be referred to the detailed description of above-mentioned preparation method embodiment.From above-mentioned Description understands, quick using the making processing procedure of the certificate photo of the manufacturing system of the certificate photo in embodiments of the invention and can It is high by property, and the accuracy of the replacement of regional area is improved, the regional area after it can ensure to replace does not change, and solves Certainly regional area deforms composograph caused by with local area periphery gross distortion not in regional area replacement technology in image Real problems, while reduce the time-consuming and cost of manufacturing process.
Embodiments of the invention nine provide a kind of card of Overall Steps in the preparation method that can realize above-mentioned certificate photo A kind of embodiment for the producing device that part shines, the producing device of the certificate photo specifically include following content:
Memory, processor and storage on a memory and the computer program that can run on a processor, the processing Device realizes the step of any one preparation method when performing the computer program, such as realizes following step:
Step 100:Standardized face's image is generated according to user's picture of reception, and determines target model's image.
Step 200:Obtain respectively in the first human face region and standardized face's image in the target model image The characteristic point of second human face region and the positional information of characteristic point.
Step 300:In the target model image and standardized face's image respectively to first human face region and Second human face region carries out foreground segmentation process.
Step 400:According to first human face region and the positional information of the characteristic point of the second human face region, to the mark Standardization facial image carries out global deformation process so that the size of the second human face region in the standardized face's image after deformation It is in the difference of the size and position of position and first human face region in preset range.
Step 500:According to the first human face region and the positional information of the characteristic point of the second human face region after deformation, to institute State the first human face region in target model's image and its neighboring region carries out local deformation processing so that the first face area Domain is identical with the geometry of second human face region;Wherein, the neighboring region be using first human face region in Region in the extended area of the heart and adjacent with first human face region.
Step 600:The first human face region after deformation is replaced with into the second human face region after deformation, obtains including described Target model's image of second human face region.
It was found from foregoing description, the manufacturing process of the producing device of the certificate photo in embodiments of the invention is rapidly and reliably Property it is high, and improve the accuracy of the replacement of the regional area of facial image, can ensure that the human face region after making does not occur Change, solve in certificate photo in human face region replacement technology caused by regional area deformation and local area periphery gross distortion Composograph invalidity problem, while reduce the time-consuming and cost of manufacturing process.
Embodiments of the invention ten provide a kind of meter of Overall Steps in the preparation method that can realize above-mentioned certificate photo A kind of embodiment of calculation machine readable storage medium storing program for executing, the computer-readable recording medium specifically include following content:
Computer program is stored with computer-readable recording medium, realizes and appoints when the computer program is executed by processor The step of one preparation method, such as realize following step:
Step 100:Standardized face's image is generated according to user's picture of reception, and determines target model's image.
Step 200:Obtain respectively in the first human face region and standardized face's image in the target model image The characteristic point of second human face region and the positional information of characteristic point.
Step 300:In the target model image and standardized face's image respectively to first human face region and Second human face region carries out foreground segmentation process.
Step 400:According to first human face region and the positional information of the characteristic point of the second human face region, to the mark Standardization facial image carries out global deformation process so that the size of the second human face region in the standardized face's image after deformation It is in the difference of the size and position of position and first human face region in preset range.
Step 500:According to the first human face region and the positional information of the characteristic point of the second human face region after deformation, to institute State the first human face region in target model's image and its neighboring region carries out local deformation processing so that the first face area Domain is identical with the geometry of second human face region;Wherein, the neighboring region be using first human face region in Region in the extended area of the heart and adjacent with first human face region.
Step 600:The first human face region after deformation is replaced with into the second human face region after deformation, obtains including described Target model's image of second human face region.
It was found from foregoing description, the manufacturing process of the computer-readable recording medium in embodiments of the invention is quick and can It is high by property, and the accuracy of the replacement of the regional area of facial image is improved, it can ensure that the human face region after making is not sent out It is raw to change, solve in certificate photo that regional area deformation and local area periphery gross distortion cause in human face region replacement technology Composograph invalidity problem, while reduce the time-consuming and cost of manufacturing process.
It should also be noted that, herein, such as first and second or the like relational terms are used merely to one Entity or operation make a distinction with another entity or operation, and not necessarily require or imply between these entities or operation Any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant are intended to contain Lid nonexcludability includes, so that process, method, article or equipment including a series of elements not only will including those Element, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to include Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Other identical element also be present in process, method, article or equipment including the key element.
Above example is merely to illustrate technical scheme, rather than its limitations;Although with reference to the foregoing embodiments The present invention is described in detail, it will be understood by those within the art that:It still can be to foregoing each implementation Technical scheme described in example is modified, or carries out equivalent substitution to which part technical characteristic;And these are changed or replaced Change, the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. a kind of preparation method of certificate photo, it is characterised in that the preparation method includes:
Standardized face's image is generated according to user's picture of reception, and determines target model's image;
The second human face region in the first human face region and standardized face's image in the target model image is obtained respectively Characteristic point and characteristic point positional information;
Respectively to first human face region and the second human face region in the target model image and standardized face's image Carry out foreground segmentation process;
According to first human face region and the positional information of the characteristic point of the second human face region, to the standardized face's image Carry out global deformation process so that the size of the second human face region in the standardized face's image after deformation and position with it is described The size of first human face region and the difference of position are in preset range;
According to the first human face region and the positional information of the characteristic point of the second human face region after deformation, the target model is schemed The first human face region and its neighboring region as in carry out local deformation processing so that first human face region and described second The geometry of human face region is identical;Wherein, the neighboring region is the extended area centered on first human face region In and the region adjacent with first human face region;
The first human face region after deformation is replaced with into the second human face region after deformation, obtains including second human face region Target model's image.
2. preparation method according to claim 1, it is characterised in that standard is generated according to user's picture of reception described Before changing facial image, methods described also includes:
Obtain certificate photo material picture;
Each certificate photo material picture is verified successively, and the certificate photo material picture all by verification is arranged to phase Same picture format;
And by all by verification and form identical described in certificate photo material picture be stored in certificate photo view data In storehouse;
Corresponding, it is described that standardized face's image is generated according to user's picture of reception, and target model's image is determined, wrap Include:
Receive user's picture;
User's picture is verified;
If user's picture generates standardized face's image by verification according to user's picture;
Model's image selection instruction that user sends is received, wherein, model's image selection instruction includes target model figure As the corresponding mark in the certificate photo image data base;
And the corresponding mark in being instructed according to model's image selection, transfer target in the certificate photo image data base Model's image.
3. preparation method according to claim 1, it is characterised in that methods described also includes:
Target model's image including second human face region is shown;
And if receiving secondary edit instruction, according to the secondary edit instruction to described including the second face area Target model's image in domain enters edlin;
Instruction is developed and printed if receiving, instruction is developed and printed according to, by the corresponding target mould for including second human face region Special image is sent to developing and printing equipment so that the target model for including second human face region for developing and printing equipment interconnection and receiving Image is developed and printed.
4. preparation method according to claim 1, it is characterised in that first in the target model's image of acquisition respectively The characteristic point of the second human face region and the positional information of characteristic point in human face region and standardized face's image, including:
Target area detection of attribute is carried out to the target model image and standardized face's image respectively, and respectively described in extraction The positional information of each characteristic point and each characteristic point of first human face region and the second human face region.
5. preparation method according to claim 1, it is characterised in that described in the target model image and standardization people Foreground segmentation process is carried out to first human face region and the second human face region in face image, including:
, will be the first in the target model image according to the structural relation between each characteristic point of first human face region Face region is split with environmental background, obtains the mask of first human face region and first human face region;
And according to the structural relation between each characteristic point of second human face region, in the standardized face's image Second human face region is split with environmental background, obtains the mask of second human face region and second human face region.
6. preparation method according to claim 1, it is characterised in that described according to first human face region and the second people The positional information of the characteristic point in face region, global deformation process is carried out to the standardized face's image so that the mark after deformation The size of the second human face region in standardization facial image and position and the size of first human face region and the difference of position In preset range, including:
According to the characteristic point of first human face region and the second human face region, geometric form is established using global distortion removal method Varying model;
Global deformation process is carried out to the standardized face's image based on the geometric deformation model;
And the deformation results according to the standardized face's image, the corresponding characteristic point for adjusting second human face region The mask of positional information and second human face region.
7. preparation method according to claim 1, it is characterised in that first human face region and according to after deformation The positional information of the characteristic point of two human face regions, the first human face region in the target model image and its neighboring region are entered The processing of row local deformation so that first human face region is identical with the geometry of second human face region, including:
The second human face region in the first human face region and the standardized face's image in the target model image Protecting frame is set respectively outside each characteristic point, wherein, the position of the protecting frame is built according to the central point of protecting frame, wherein, protect The central point of shield frame is the center in the closing convex closure region being made up of the circumference of whole characteristic points;
And according to the first human face region and the positional information of the characteristic point of the second human face region after deformation, in the target In protecting frame outside each characteristic point of the first human face region in model's image, the first human face region for being controlled each characteristic point Carry out deformation process so that first human face region is identical with the geometry of second human face region.
8. preparation method according to claim 1, it is characterised in that first human face region by after deformation replaces with The second human face region after deformation, the target model's image for including second human face region is obtained, including:
The first human face region after deformation is replaced with into the second human face region after deformation, and the region replaced be after deformation the The intersection area of the mask of the second human face region after the mask of one human face region and deformation, obtain including the second face area Target model's image in domain;
And naturalization is carried out to second human face region in target model's image including second human face region and melted Conjunction is handled.
9. a kind of producing device of certificate photo, it is characterised in that the producing device includes:Memory, processor and it is stored in On memory and the computer program that can run on a processor, it is characterised in that computer journey described in the computing device Realized during sequence as described in any one of claim 1 to 8 the step of preparation method.
10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program quilt Realized during computing device such as the step of any one of claim 1 to 8 methods described.
CN201710706884.6A 2017-08-17 2017-08-17 Method and device for making certificate photo and storage medium Expired - Fee Related CN107507217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710706884.6A CN107507217B (en) 2017-08-17 2017-08-17 Method and device for making certificate photo and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710706884.6A CN107507217B (en) 2017-08-17 2017-08-17 Method and device for making certificate photo and storage medium

Publications (2)

Publication Number Publication Date
CN107507217A true CN107507217A (en) 2017-12-22
CN107507217B CN107507217B (en) 2020-10-16

Family

ID=60690960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710706884.6A Expired - Fee Related CN107507217B (en) 2017-08-17 2017-08-17 Method and device for making certificate photo and storage medium

Country Status (1)

Country Link
CN (1) CN107507217B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108053366A (en) * 2018-01-02 2018-05-18 联想(北京)有限公司 A kind of image processing method and electronic equipment
CN108174237A (en) * 2017-12-28 2018-06-15 北京奇虎科技有限公司 Image combining method and device
CN108734764A (en) * 2018-05-11 2018-11-02 深圳市云之梦科技有限公司 A kind of method and system of clothes alignment
CN110660037A (en) * 2018-06-29 2020-01-07 京东方科技集团股份有限公司 Method, apparatus, system and computer program product for face exchange between images
CN110930298A (en) * 2019-11-29 2020-03-27 北京市商汤科技开发有限公司 Image processing method and apparatus, image processing device, and storage medium
CN111476146A (en) * 2020-04-03 2020-07-31 北京金沙江科技有限公司 Mobile-terminal-based academic record certification standardized processing method
CN112633252A (en) * 2021-01-09 2021-04-09 浙江臻享网络科技有限公司 Certificate irradiation standardization processing method and device
CN112766215A (en) * 2021-01-29 2021-05-07 北京字跳网络技术有限公司 Face fusion method and device, electronic equipment and storage medium
CN112785683A (en) * 2020-05-07 2021-05-11 武汉金山办公软件有限公司 Face image adjusting method and device
CN112817503A (en) * 2021-01-18 2021-05-18 陈林斌 Intelligent display method of electronic photo frame, electronic photo frame and readable storage medium
CN113556471A (en) * 2021-09-18 2021-10-26 广州卓腾科技有限公司 Certificate photo generation method, system and computer readable storage medium
CN114445441A (en) * 2022-01-25 2022-05-06 杭州海量信息技术有限公司 Face segmentation method and system without labeling

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770649A (en) * 2008-12-30 2010-07-07 中国科学院自动化研究所 Automatic synthesis method for facial image
US20150029216A1 (en) * 2013-07-25 2015-01-29 Morphotrust Usa Inc. System and Method for Creating a Virtual Backdrop
WO2015074476A1 (en) * 2013-11-25 2015-05-28 腾讯科技(深圳)有限公司 Image processing method, apparatus, and storage medium
CN105069746A (en) * 2015-08-23 2015-11-18 杭州欣禾圣世科技有限公司 Video real-time human face substitution method and system based on partial affine and color transfer technology
CN105654420A (en) * 2015-12-21 2016-06-08 小米科技有限责任公司 Face image processing method and device
CN105741229A (en) * 2016-02-01 2016-07-06 成都通甲优博科技有限责任公司 Method for realizing quick fusion of face image
CN106023063A (en) * 2016-05-09 2016-10-12 西安北升信息科技有限公司 Video transplantation face changing method
CN106156730A (en) * 2016-06-30 2016-11-23 腾讯科技(深圳)有限公司 The synthetic method of a kind of facial image and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770649A (en) * 2008-12-30 2010-07-07 中国科学院自动化研究所 Automatic synthesis method for facial image
US20150029216A1 (en) * 2013-07-25 2015-01-29 Morphotrust Usa Inc. System and Method for Creating a Virtual Backdrop
WO2015074476A1 (en) * 2013-11-25 2015-05-28 腾讯科技(深圳)有限公司 Image processing method, apparatus, and storage medium
CN105069746A (en) * 2015-08-23 2015-11-18 杭州欣禾圣世科技有限公司 Video real-time human face substitution method and system based on partial affine and color transfer technology
CN105654420A (en) * 2015-12-21 2016-06-08 小米科技有限责任公司 Face image processing method and device
CN105741229A (en) * 2016-02-01 2016-07-06 成都通甲优博科技有限责任公司 Method for realizing quick fusion of face image
CN106023063A (en) * 2016-05-09 2016-10-12 西安北升信息科技有限公司 Video transplantation face changing method
CN106156730A (en) * 2016-06-30 2016-11-23 腾讯科技(深圳)有限公司 The synthetic method of a kind of facial image and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KANGLAI QIAN 等: "Automatic flexible face replacement with no auxiliary data", 《COMPUTERS & GRAPHICS》 *
高岩 等: "约束条件下的人脸五官替换算法", 《中国图象图形学报》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108174237A (en) * 2017-12-28 2018-06-15 北京奇虎科技有限公司 Image combining method and device
CN108053366A (en) * 2018-01-02 2018-05-18 联想(北京)有限公司 A kind of image processing method and electronic equipment
CN108734764A (en) * 2018-05-11 2018-11-02 深圳市云之梦科技有限公司 A kind of method and system of clothes alignment
CN110660037A (en) * 2018-06-29 2020-01-07 京东方科技集团股份有限公司 Method, apparatus, system and computer program product for face exchange between images
CN110660037B (en) * 2018-06-29 2023-02-10 京东方科技集团股份有限公司 Method, apparatus, system and computer program product for face exchange between images
CN110930298A (en) * 2019-11-29 2020-03-27 北京市商汤科技开发有限公司 Image processing method and apparatus, image processing device, and storage medium
CN111476146A (en) * 2020-04-03 2020-07-31 北京金沙江科技有限公司 Mobile-terminal-based academic record certification standardized processing method
CN112785683A (en) * 2020-05-07 2021-05-11 武汉金山办公软件有限公司 Face image adjusting method and device
CN112785683B (en) * 2020-05-07 2024-03-19 武汉金山办公软件有限公司 Face image adjusting method and device
CN112633252A (en) * 2021-01-09 2021-04-09 浙江臻享网络科技有限公司 Certificate irradiation standardization processing method and device
CN112817503A (en) * 2021-01-18 2021-05-18 陈林斌 Intelligent display method of electronic photo frame, electronic photo frame and readable storage medium
CN112817503B (en) * 2021-01-18 2024-03-26 陈林斌 Intelligent display method of electronic photo frame, electronic photo frame and readable storage medium
CN112766215A (en) * 2021-01-29 2021-05-07 北京字跳网络技术有限公司 Face fusion method and device, electronic equipment and storage medium
CN113556471A (en) * 2021-09-18 2021-10-26 广州卓腾科技有限公司 Certificate photo generation method, system and computer readable storage medium
CN114445441A (en) * 2022-01-25 2022-05-06 杭州海量信息技术有限公司 Face segmentation method and system without labeling
CN114445441B (en) * 2022-01-25 2022-09-09 杭州海量信息技术有限公司 Face segmentation method and system without labeling

Also Published As

Publication number Publication date
CN107507217B (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN107507217A (en) Preparation method, device and the storage medium of certificate photo
CN107507216A (en) The replacement method of regional area, device and storage medium in image
CN107564080A (en) A kind of replacement system of facial image
CN107610202A (en) Marketing method, equipment and the storage medium replaced based on facial image
CN109697688B (en) Method and device for image processing
CN107154030B (en) Image processing method and device, electronic equipment and storage medium
CN109829930B (en) Face image processing method and device, computer equipment and readable storage medium
CN103210421B (en) Article detection device and object detecting method
CN107169475B (en) A kind of face three-dimensional point cloud optimized treatment method based on kinect camera
JP7129502B2 (en) Face image processing method and device, image equipment and storage medium
CN109952594A (en) Image processing method, device, terminal and storage medium
CN106652015B (en) Virtual character head portrait generation method and device
CN109801380A (en) A kind of method, apparatus of virtual fitting, storage medium and computer equipment
CN108876708A (en) Image processing method, device, electronic equipment and storage medium
CN103839223A (en) Image processing method and image processing device
CN108463823A (en) A kind of method for reconstructing, device and the terminal of user's Hair model
CN110199296A (en) Face identification method, processing chip and electronic equipment
CN109886144B (en) Virtual trial sending method and device, computer equipment and storage medium
CN111243051B (en) Portrait photo-based simple drawing generation method, system and storage medium
CN111079676B (en) Human eye iris detection method and device
CN108924434A (en) A kind of three-dimensional high dynamic-range image synthesis method based on exposure transformation
KR102468306B1 (en) Apparatus and method for measuring body size
JP2009251634A (en) Image processor, image processing method, and program
CN116188720A (en) Digital person generation method, device, electronic equipment and storage medium
CN107729904A (en) A kind of face pore matching process based on the limitation of 3 D deformation face

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201016

CF01 Termination of patent right due to non-payment of annual fee