CN107945102A - A kind of picture synthetic method and device - Google Patents

A kind of picture synthetic method and device Download PDF

Info

Publication number
CN107945102A
CN107945102A CN201710992295.9A CN201710992295A CN107945102A CN 107945102 A CN107945102 A CN 107945102A CN 201710992295 A CN201710992295 A CN 201710992295A CN 107945102 A CN107945102 A CN 107945102A
Authority
CN
China
Prior art keywords
image
synthesized
target number
people
point
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
CN201710992295.9A
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.)
Shenzhen Landsky Network Technology Co Ltd
Original Assignee
Shenzhen Landsky Network 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 Shenzhen Landsky Network Technology Co Ltd filed Critical Shenzhen Landsky Network Technology Co Ltd
Priority to CN201710992295.9A priority Critical patent/CN107945102A/en
Publication of CN107945102A publication Critical patent/CN107945102A/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/14Transformations for image registration, e.g. adjusting or mapping for alignment of images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • 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/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • 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

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the present application discloses a kind of picture synthetic method and device.Method includes:Mobile terminal determines scaling and position reference point of the target number of people image relative to image to be synthesized according to the face feature point of target number of people image first;Secondly, the desired value of the reference element of target number of people image is determined;Again, rotation angle of the target number of people image in image to be synthesized is determined;Finally, according to scaling, position reference point, reference element value desired value and rotation angle, in image to be synthesized synthesize target number of people image.The embodiment of the present application is conducive to improve accuracy and the matching degree of picture synthesis.

Description

A kind of picture synthetic method and device
Technical field
This application involves computer realm, and in particular to a kind of picture synthetic method and device.
Background technology
With the fast development of smart mobile phone correlation technique, more and more picture applications are installed in user mobile phone, Such as Photoshop, Meitu Xiu Xiu, swash sprout, B216, people like handling picture, and the picture after processing can lead to Social software is crossed to share out.
The content of the invention
The embodiment of the present application provides a kind of image combining method and device, can improve picture synthesis accuracy and from So degree.
First aspect of the embodiment of the present invention discloses a kind of image synthetic method, the described method includes:
Contracting of the target number of people image relative to image to be synthesized is determined according to the face feature point of target number of people image Put ratio and position reference point;
Determine the desired value of the reference element of the target number of people image;
Determine rotation angle of the target number of people image in the image to be synthesized;
According to the scaling, the position reference point, the desired value of the reference element value and the anglec of rotation Degree, synthesizes the target number of people image in the image to be synthesized.
In a possible design, the face feature point include the first human eye characteristic point, the second human eye feature point and First chin characteristic point;Determine the target number of people image relative to figure to be synthesized according to the face feature point of target number of people image The scaling and position reference point of picture, including:Identify the first human eye characteristic point, the second human eye feature point of target number of people image With the first chin characteristic point;According between the first human eye characteristic point and the second human eye feature point first distance, with And the second distance between the human eye fixed reference feature point in the image to be synthesized, determine the target number of people image relative to treating The scaling of composograph;The the second chin characteristic point for determining in the image to be synthesized is the target number of people image in institute State the position reference point synthesized in image to be synthesized, the first chin of the position reference point and the target number of people image Characteristic point overlaps.
In a possible design, the desired value of the reference element of the definite target number of people image, including:Obtain institute State the value of the reference element of image to be synthesized;According to the original value of the reference element of the target number of people image and described treat The value of the reference element of composograph, determines the desired value of the reference element of the target number of people image.
In a possible design, the anglec of rotation for determining the target number of people image in the image to be synthesized Degree, including:Human eye fixed reference feature point and chin fixed reference feature point in the image to be synthesized determine first with reference to rotation Angle;Determine that second of the number of people image in the target number of people image refers to rotation angle;According to described first with reference to rotation Angle and described second determines rotation angle of the target number of people image in the image to be synthesized with reference to rotation angle.
It is described according to the scaling, the position reference point, the reference element value in a possible design Desired value and the rotation angle, the target number of people image is synthesized in the image to be synthesized, including:According to described Scaling adjusts the size of the number of people image;Institute after being sized according to the adjustment of the desired value of the reference element State number of people image;Using the position reference point as rotary reference point, it is sized and institute according to described in rotation angle rotation The number of people image after reference element value is stated, to synthesize the target number of people image in the image to be synthesized.
Second aspect, the embodiment of the present application provide a kind of image synthesizer, and described image synthesizer includes determining mould Block and synthesis module,
The determining module, for determining that the target number of people image is opposite according to the face feature point of target number of people image In the scaling and position reference point of image to be synthesized;And the mesh of the reference element for determining the target number of people image Scale value;And for determining rotation angle of the target number of people image in the image to be synthesized.
The synthesis module, for according to the scaling, the position reference point, the reference element value target Value and the rotation angle, synthesize the target number of people image in the image to be synthesized.
The third aspect, the embodiment of the present application provide a kind of mobile terminal, including processor, memory, communication interface and One or more programs, wherein, said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned Manage device to perform, above procedure includes being used for the instruction for performing the step in the embodiment of the present application first aspect either method.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable recording medium, wherein, above computer is readable Computer program of the storage medium storage for electronic data interchange, wherein, above computer program causes computer to perform such as Part or all of step described in the embodiment of the present application first aspect either method, above computer include mobile terminal.
5th aspect, the embodiment of the present application provide a kind of computer program product, wherein, above computer program product Non-transient computer-readable recording medium including storing computer program, above computer program are operable to make calculating Machine is performed such as the part or all of step described in the embodiment of the present application first aspect either method.The computer program product Can be a software installation bag, above computer includes mobile terminal.
As can be seen that in the embodiment of the present application, mobile terminal is determined according to the face feature point of target number of people image first Target number of people image relative to image to be synthesized scaling and position reference point;Secondly, the ginseng of target number of people image is determined Examine the desired value of element;Again, rotation angle of the target number of people image in image to be synthesized is determined;Finally, according to scaling, The desired value and rotation angle of position reference point, reference element value, synthesize target number of people image in image to be synthesized.Due to Scaling can accurately indicate that target number of people image is synthesized to the size after image to be synthesized, position reference point and rotation angle It can accurately indicate that target number of people image is synthesized to the position after image to be synthesized and angle, the desired value of reference element value can Accurate instruction target number of people image is synthesized to the value of the reference element after image to be synthesized, so that the target number of people after synthesis Image can accurate adaptation image to be synthesized, avoid synthesis after target number of people image size and/or position and/or angle And/or the unmatched situation of value of reference element occurs, so be conducive to improve target number of people image is synthesized to it is to be synthesized The accuracy of image and matching degree, improve user experience.
Brief description of the drawings
The attached drawing involved by the embodiment of the present application will be briefly described below.
Fig. 1 is a kind of flow diagram of image combining method;
Fig. 2 is a kind of flow diagram of image combining method;
Fig. 3 A are target number of people images disclosed in the embodiment of the present application;
Fig. 3 B are images to be synthesized disclosed in the embodiment of the present application;
Fig. 3 C are the procedure charts that image disclosed in the embodiment of the present application synthesizes;
Fig. 4 is a kind of flow diagram of resource allocation method disclosed in the embodiment of the present application;
Fig. 5 is a kind of structure diagram of mobile terminal disclosed in the embodiment of the present application;
Fig. 6 is a kind of structure diagram of smart mobile phone disclosed in the embodiment of the present application.
Embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction with the embodiment of the present application Attached drawing, is clearly and completely described the technical solution in the embodiment of the present application, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art All other embodiments obtained without creative efforts, shall fall in the protection scope of this application.
Term " first ", " second " in the description and claims of this application and above-mentioned attached drawing etc. are to be used to distinguish Different objects, rather than for describing particular order.In addition, term " comprising " and " having " and their any deformations, it is intended that It is to cover non-exclusive include.Such as process, method, system, product or the equipment for containing series of steps or unit do not have The step of having listed or unit are defined in, but alternatively further includes the step of not listing or unit, or is alternatively also wrapped Include for other intrinsic steps of these processes, method, product or equipment or unit.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
In the embodiment of the present application, mobile terminal may include but be not limited to smart mobile phone, palm PC, laptop, platform Formula computer etc..The operating system of the mobile terminal may include but be not limited to Android operation system, IOS operating system, Symbian (Saipan) operating system, Black Berry (blackberry, blueberry) operating system, Windows Phone8 operating systems etc., this Inventive embodiments do not limit.
The embodiment of the present application is introduced below in conjunction with the accompanying drawings.
Fig. 1 is referred to, Fig. 1 is a kind of flow diagram of image combining method disclosed by the embodiments of the present invention.Such as Fig. 1 institutes Show, this image extraction method can include:
S101, the mobile terminal determine that the target number of people image is opposite according to the face feature point of target number of people image In the scaling and position reference point of image to be synthesized.
Wherein, the face feature point includes the first human eye characteristic point, the second human eye feature point and the first chin characteristic point.
In the specific implementation, the mobile terminal can according to prestore/the recognition of face plan that arrives of default/real-time reception Slightly, the face feature point of the number of people image is identified, the recognition of face strategy for example can be the recognition of face based on LGBP Strategy, the recognition of face strategy based on AdaBoost, do not do unique restriction herein.
S102, the mobile terminal determine the desired value of the reference element of the target number of people image.
Wherein, the reference element value of the target number of people image can include colour temperature, brightness, contrast and saturation degree Value, does not do unique restriction herein.
S103, the mobile terminal determine rotation angle of the target number of people image in the image to be synthesized.
S104, the mobile terminal according to the scaling, the position reference point, the reference element value target Value and the rotation angle, synthesize the target number of people image in the image to be synthesized.
As can be seen that in the embodiment of the present application, mobile terminal is determined according to the face feature point of target number of people image first Target number of people image relative to image to be synthesized scaling and position reference point;Secondly, the ginseng of target number of people image is determined Examine the desired value of element;Again, rotation angle of the target number of people image in image to be synthesized is determined;Finally, according to scaling, The desired value and rotation angle of position reference point, reference element value, synthesize target number of people image in image to be synthesized.Due to Scaling can accurately indicate that target number of people image is synthesized to the size after image to be synthesized, position reference point and rotation angle It can accurately indicate that target number of people image is synthesized to the position after image to be synthesized and angle, the desired value of reference element value can Accurate instruction target number of people image is synthesized to the value of the reference element after image to be synthesized, so that the target number of people after synthesis Image can accurate adaptation image to be synthesized, avoid synthesis after target number of people image size and/or position and/or angle And/or the unmatched situation of value of reference element occurs, so be conducive to improve target number of people image is synthesized to it is to be synthesized The accuracy of image and matching degree, improve user experience.
In a possible example, the face feature point include the first human eye characteristic point, the second human eye feature point and First chin characteristic point;Determine the target number of people image relative to figure to be synthesized according to the face feature point of target number of people image The scaling and position reference point of picture, including:Identify the first human eye characteristic point, the second human eye feature point of target number of people image With the first chin characteristic point;According between the first human eye characteristic point and the second human eye feature point first distance, with And the second distance between the human eye fixed reference feature point in the image to be synthesized, determine the target number of people image relative to treating The scaling of composograph;The the second chin characteristic point for determining in the image to be synthesized is the target number of people image in institute State the position reference point synthesized in image to be synthesized, the first chin of the position reference point and the target number of people image Characteristic point overlaps.
Wherein, the face feature point is obtained by third party's face recognition technology, the first human eye and the second human eye difference For the left eye eyeball and right eye eyeball in face.The scaling is fixed by the distance between the first human eye characteristic point and second human eye Justice.
In the specific implementation, the mobile terminal is according between the first human eye characteristic point and the second human eye feature point First distance and the image to be synthesized in human eye fixed reference feature point between second distance, determine the target person Head image can be relative to the specific implementation of the scaling of image to be synthesized:First described in the acquisition for mobile terminal The first distance between human eye feature point and the second human eye feature point, and the described 3rd in image to be synthesized is obtained at the same time Second distance between human eye feature point and the 4th human eye feature point, then the first distance determine using second distance as reference value One distance reduces/enlarges ratio.
As an example it is assumed that the first distance between left eye and right eye in target number of people image is 3mm, image to be synthesized Middle human eye distance (second distance i.e. between left eye eyeball and right eye eyeball) is 6mm, based on 6mm, to target number of people image into The scaling of row size, further determines that scaling for amplification 2 times (6mm/3mm=2).
As it can be seen that in this example, since mobile terminal can accurately determine the target number of people image described to be synthesized Scaling and position reference point in image, and then mobile terminal can accurately determine the image in synthesis region, have The accuracy of face and matching degree in target number of people image are synthesized beneficial to mobile terminal is improved.
In a possible example, the desired value of the reference element of the definite target number of people image, including:Obtain institute State the value of the reference element of image to be synthesized;According to the original value of the reference element of the target number of people image and described treat The value of the reference element of composograph, determines the desired value of the reference element of the target number of people image.
Wherein, the original value of the reference element will be adjusted according to the reference element value of the image to be synthesized It is whole, the value of colour temperature, brightness, contrast and saturation degree is contrasted one by one, obtains the desired value of the reference element.For example, The brightness value of the target number of people image is X, the image to be synthesized;Brightness value is Y, and X<Y, after being adjusted, obtains Brightness target value Q, Q are probably more than X, less than Y, do not do unique restriction herein.
As it can be seen that in this example, since mobile terminal accurately determines the desired value of the reference element of the number of people image, And then mobile terminal can make the target number of people image in the synthesis process can be with according to the desired value of the reference element The image to be synthesized is more natural, is conducive to improve accuracy and the matching degree of terminal composograph.
In a possible example, the anglec of rotation for determining the target number of people image in the image to be synthesized Degree, including:Human eye fixed reference feature point and chin fixed reference feature point in the image to be synthesized determine first with reference to rotation Angle;Determine that second of the number of people image in the target number of people image refers to rotation angle;According to described first with reference to rotation Angle and described second determines rotation angle of the target number of people image in the image to be synthesized with reference to rotation angle.
In the specific implementation, the human eye reference point and chin fixed reference feature point in the image to be synthesized determines One can be with reference to the specific implementation of rotation angle:Central point in image to be synthesized described in acquisition for mobile terminal, with institute State central point and refer to rectangular coordinate system, the transverse axis with reference to rectangular coordinate system and the figure to be synthesized for the foundation of coordinate central point The horizontal line of picture is parallel, the vertical lines run parallel of the longitudinal axis with reference to rectangular coordinate system and the image to be synthesized;Mobile terminal Identify the first human eye characteristic point of number of people image in the image to be synthesized, the second human eye feature point and chin characteristic point;And obtain Take the human eye central point between the first human eye characteristic point in the image to be synthesized and the second human eye feature point;Further according to described Human eye central point and the position reference point, obtain first and refer to middle separated time;Finally determined according to described first with reference to middle separated time The number of people image refers to angle relative to the first of the transverse axis with reference to rectangular coordinate system.
Wherein, described second is consistent with the method for the first reference angle with reference to rotation angle.
Wherein, it is human eye central point and position reference with reference to middle separated time with reference to acute angle or right angle of the middle separated time with respect to transverse axis The line segment of point composition.It will move on the central point with reference to rectangular coordinate system, that is, obtained relative to transverse axis with reference to middle separated time Second refer to angle.
As it can be seen that in this example, since rotation angle can accurately be rotated according to first with reference to rotation angle and the second reference Angle confirms, and then the target number of people image can adjust its position in the image to be synthesized by the rotation angle Put, ultimately facilitate the accuracy for improving mobile terminal synthesising picture and matching degree.
In a possible example, according to the scaling, the position reference point, the reference element value mesh Scale value and the rotation angle, synthesize the target number of people image in the image to be synthesized, including:According to the scaling Ratio adjusts the size of the number of people image;The people after being sized according to the adjustment of the desired value of the reference element Head image;Using the position reference point as rotary reference point, it is sized and the ginseng according to described in rotation angle rotation The number of people image after element value is examined, to synthesize the target number of people image in the image to be synthesized.
As it can be seen that in this example, due to the scaling, the position reference point, the reference element value desired value And the rotation angle all it has been confirmed that and then can determine the synthesis region of number of people image, according to the synthesis region, into The accurate image synthesis of row, is conducive to improve accuracy and the matching degree of mobile terminal composograph.
It is consistent with the embodiment shown in above-mentioned Fig. 2, referring to Fig. 2, Fig. 2 is a kind of image provided by the embodiments of the present application The flow diagram of synthetic method, applied to mobile terminal.As shown in the figure, this application image extraction method includes:
S201, identifies the first human eye characteristic point, the second human eye feature point and the chin characteristic point of target number of people image.
S202, according to the first distance between the first human eye characteristic point and the second human eye feature point and image to be synthesized In human eye fixed reference feature point between second distance, determine scaling of the target number of people image relative to image to be synthesized.
S203, determines that the second chin characteristic point in image to be synthesized carries out for target number of people image in image to be synthesized The position reference point of synthesis, position reference point are overlapped with the first chin characteristic point of target number of people image.
S204, obtains the value of the reference element of the image to be synthesized.
S205, according to the reference element of the original value of the reference element of target number of people image and image to be synthesized Value, determines the desired value of the reference element of target number of people image.
S206, human eye fixed reference feature point and chin fixed reference feature point in image to be synthesized determine first with reference to rotation Angle.
S207, determines that second of the number of people image in target number of people image refers to rotation angle.
S208, determines that target number of people image is waited to close described with reference to rotation angle and second according to first with reference to rotation angle Into the rotation angle of image.
S209, according to scaling, position reference point, reference element value desired value and rotation angle, to be synthesized The target number of people image is synthesized in image.
As can be seen that in the embodiment of the present application, mobile terminal is determined according to the face feature point of target number of people image first Target number of people image relative to image to be synthesized scaling and position reference point;Secondly, the ginseng of target number of people image is determined Examine the desired value of element;Again, rotation angle of the target number of people image in image to be synthesized is determined;Finally, according to scaling, The desired value and rotation angle of position reference point, reference element value, synthesize target number of people image in image to be synthesized.Due to Scaling can accurately indicate that target number of people image is synthesized to the size after image to be synthesized, position reference point and rotation angle It can accurately indicate that target number of people image is synthesized to the position after image to be synthesized and angle, the desired value of reference element value can Accurate instruction target number of people image is synthesized to the value of the reference element after image to be synthesized, so that the target number of people after synthesis Image can accurate adaptation image to be synthesized, avoid synthesis after target number of people image size and/or position and/or angle And/or the unmatched situation of value of reference element occurs, so be conducive to improve target number of people image is synthesized to it is to be synthesized The accuracy of image and matching degree, improve user experience.
The embodiment of the present application is described further with reference to concrete application scene.
As shown in Figure 3A to 3C, Fig. 3 A are target number of people images, and Fig. 3 B are image to be synthesized, and Fig. 3 C are image synthesizing procedures Figure.Wherein, a, b are respectively the left eye characteristic point and right eye characteristic point of the target number of people image;C is in target number of people image First chin characteristic point;D points are the second chin reference point of the image to be synthesized;E, f is respectively left eye in image to be synthesized Characteristic point and right eye characteristic point;The characteristic point of eyes is respectively A and B in Fig. 3 C, and the central point of reference axis is F in composograph.
As described in Figure, in Fig. 3 A human eye distance be 3cm (i.e. the distance between a and b), it is assumed that in image to be synthesized human eye away from From for 4mm (i.e. the distance between e and f), mobile terminal is using the human eye distance 4cm in image to be synthesized as reference distance, target Number of people image further determines that 4/3 times that scaling is amplification, and then it is special with right eye to have obtained the left eye characteristic point A in Fig. 3 C Levy point B.Since position reference point is the second chin characteristic point d, and overlapped with the first chin characteristic point, i.e., position reference point is d. Midpoint between e and f is h, and the line segment between d and h is moved on the reference axis midpoint F in the image to be synthesized, is obtained First refers to angle [alpha], then obtains the midpoint f of a and b, and the line segment between f and c is moved to the coordinate in the image to be synthesized On the F of axis midpoint, obtain second and refer to angle beta, β is vertical angle at this time, determines the target number of people image described according to α and β Rotation angle in image to be synthesized, using d as rotary reference point.Finally according to the rotation angle, the scaling and institute State the target number of people that the desired value adjustment of the reference element of target number of people image synthesizes in the image to be synthesized Image, the image after being synthesized.
It is apparatus of the present invention embodiment below, apparatus of the present invention embodiment is realized for performing the method for the present invention embodiment Method.As shown in figure 4, the mobile terminal can include determining that module 401, synthesis module 402, wherein,
The determining module 401, for determining the target number of people image according to the face feature point of target number of people image Relative to the scaling and position reference point of image to be synthesized;
The determining module 401, is additionally operable to determine the desired value of the reference element of the target number of people image;
The determining module 401, is additionally operable to determine rotation angle of the target number of people image in the image to be synthesized;
The synthesis module 402, for according to the scaling, the position reference point, the reference element value Desired value and the rotation angle, synthesize the target number of people image in the image to be synthesized.
As can be seen that in the embodiment of the present application, mobile terminal is determined according to the face feature point of target number of people image first Target number of people image relative to image to be synthesized scaling and position reference point;Secondly, the ginseng of target number of people image is determined Examine the desired value of element;Again, rotation angle of the target number of people image in image to be synthesized is determined;Finally, according to scaling, The desired value and rotation angle of position reference point, reference element value, synthesize target number of people image in image to be synthesized.Due to Scaling can accurately indicate that target number of people image is synthesized to the size after image to be synthesized, position reference point and rotation angle It can accurately indicate that target number of people image is synthesized to the position after image to be synthesized and angle, the desired value of reference element value can Accurate instruction target number of people image is synthesized to the value of the reference element after image to be synthesized, so that the target number of people after synthesis Image can accurate adaptation image to be synthesized, avoid synthesis after target number of people image size and/or position and/or angle And/or the unmatched situation of value of reference element occurs, so be conducive to improve target number of people image is synthesized to it is to be synthesized The accuracy of image and matching degree, improve user experience.
In a possible example, the instruction of the determining module is specifically used for performing following operation:Identify target person The first human eye characteristic point, the second human eye feature point and the first chin characteristic point of head image;According to the first human eye characteristic point Between the human eye fixed reference feature point in the first distance and the image to be synthesized between the second human eye feature point Second distance, determines scaling of the target number of people image relative to image to be synthesized;Determine in the image to be synthesized The second chin characteristic point be the position reference point that is synthesized in the image to be synthesized of the target number of people image, it is described Position reference point is overlapped with the first chin characteristic point of the target number of people image.
In a possible example, the instruction of the determining module is specifically additionally operable to perform following operation:Described in acquisition The value of the reference element of image to be synthesized;According to the original value of the reference element of the target number of people image and described wait to close Into the value of the reference element of image, the desired value of the reference element of the target number of people image is determined.
In a possible example, the instruction of the determining module is specifically additionally operable to perform following operation:According to described Human eye fixed reference feature point and chin fixed reference feature point in image to be synthesized determine that first refers to rotation angle;Determine the target Second of number of people image in number of people image refers to rotation angle;According to described first with reference to rotation angle and second reference Rotation angle determines rotation angle of the target number of people image in the image to be synthesized.
In a possible example, the instruction of the synthesis module is specifically used for performing following operation:According to the contracting Put the size that ratio adjusts the number of people image;Described in after being sized according to the adjustment of the desired value of the reference element Number of people image;Using the position reference point as rotary reference point, according to the rotation angle rotation described in be sized with it is described Number of people image after reference element value, to synthesize the target number of people image in the image to be synthesized.
It is consistent with the embodiment shown in above-mentioned Fig. 2, Fig. 3, Fig. 4, referring to Fig. 5, Fig. 5 is provided by the embodiments of the present application A kind of structure diagram of mobile terminal, the running of mobile terminal have one or more application program and operating system, as schemed institute Show, which includes processor, memory, communication interface and one or more programs, wherein, said one or multiple Program is different from said one or multiple application programs, and said one or multiple programs are stored in above-mentioned memory, and And be configured to be performed by above-mentioned processor, above procedure includes being used for the instruction for performing following steps;
Contracting of the target number of people image relative to image to be synthesized is determined according to the face feature point of target number of people image Put ratio and position reference point;
Determine the desired value of the reference element of the target number of people image;
Determine rotation angle of the target number of people image in the image to be synthesized;
According to the scaling, the position reference point, the desired value of the reference element value and the anglec of rotation Degree, synthesizes the target number of people image in the image to be synthesized.
As can be seen that in the embodiment of the present application, mobile terminal is determined according to the face feature point of target number of people image first Target number of people image relative to image to be synthesized scaling and position reference point;Secondly, the ginseng of target number of people image is determined Examine the desired value of element;Again, rotation angle of the target number of people image in image to be synthesized is determined;Finally, according to scaling, The desired value and rotation angle of position reference point, reference element value, synthesize target number of people image in image to be synthesized.Due to Scaling can accurately indicate that target number of people image is synthesized to the size after image to be synthesized, position reference point and rotation angle It can accurately indicate that target number of people image is synthesized to the position after image to be synthesized and angle, the desired value of reference element value can Accurate instruction target number of people image is synthesized to the value of the reference element after image to be synthesized, so that the target number of people after synthesis Image can accurate adaptation image to be synthesized, avoid synthesis after target number of people image size and/or position and/or angle And/or the unmatched situation of value of reference element occurs, so be conducive to improve target number of people image is synthesized to it is to be synthesized The accuracy of image and matching degree, improve user experience.
It is above-mentioned that mainly the scheme of the embodiment of the present application is described from the angle of method side implementation procedure.It is appreciated that , for terminal in order to realize the function, it comprises perform the corresponding hardware configuration of each function and/or software module.This Field technology personnel should be readily appreciated that, with reference to each exemplary unit and algorithm of the embodiments described herein description Step, the application can be realized with the combining form of hardware or hardware and computer software.Some function actually with hardware also It is that the mode of computer software driving hardware performs, application-specific and design constraint depending on technical solution.Specialty Technical staff specifically can realize described function to each using distinct methods, but this realization should not be recognized For beyond scope of the present application.
A kind of structure diagram of smart mobile phone 600, above-mentioned intelligence are provided referring to Fig. 6, Fig. 6 is the embodiment of the present application Mobile phone 600 includes:Housing 610, touching display screen 620, mainboard 630, battery 640 and subplate 650, before being provided with mainboard 630 Camera 631, processor 632, memory 633, power management chip 634 etc. are put, oscillator 651, integral sound are provided with subplate Chamber 652, VOOC, which dodge, fills interface 653 and fingerprint recognition module 654.
Wherein, mobile terminal determines that the target number of people image is opposite according to the face feature point of target number of people image first In the scaling and position reference point of image to be synthesized;Secondly, the target of the reference element of the target number of people image is determined Value;Again, rotation angle of the target number of people image in the image to be synthesized is determined;Finally, according to the scaling, The position reference point, the desired value of the reference element value and the rotation angle, synthesize in the image to be synthesized The target number of people image.
Above-mentioned processor 632 is the control centre of smart mobile phone, utilizes various interfaces and the whole smart mobile phone of connection Various pieces, by running or performing the software program and/or module that are stored in memory 633, and call and be stored in Data in memory 633, perform the various functions and processing data of smart mobile phone, so as to carry out overall prison to smart mobile phone Control.Optionally, processor 632 may include one or more processing units;Preferably, processor 632 can integrate application processor And modem processor, wherein, application processor mainly handles operating system, user interface and application program etc., modulatedemodulate Processor is adjusted mainly to handle wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor In 632.The processor 632 for example can be central processing unit (Central Processing Unit, CPU), general procedure Device, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application- Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable Gate Array, FPGA) either other programmable logic device, transistor logic, hardware component or its any combination.It can To realize or perform with reference to the described various exemplary logic blocks of present disclosure, module and circuit.Above-mentioned place It can also be the combination for realizing computing function to manage device, such as is combined comprising one or more microprocessors, DSP and microprocessor Combination etc..
Above-mentioned memory 633 can be used for storage software program and module, and processor 632 is stored in memory by operation 633 software program and module, so as to perform various function application and the data processing of smart mobile phone.Memory 633 can Mainly include storing program area and storage data field, wherein, storing program area can storage program area, needed at least one function Application program etc.;Storage data field can be stored uses created data etc. according to smart mobile phone.In addition, memory 633 It can include high-speed random access memory, can also include nonvolatile memory, a for example, at least disk memory, Flush memory device or other volatile solid-state parts.The memory 633 for example can be random access memory (Random Access Memory, RAM), flash memory, read-only storage (Read Only Memory, ROM), the read-only storage of erasable programmable Device (Erasable Programmable ROM, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM), register, hard disk, mobile hard disk, read-only optical disc (CD-ROM) or any other shape well known in the art The storage medium of formula.
The embodiment of the present application also provides a kind of computer-readable storage medium, wherein, computer-readable storage medium storage is used for electricity The computer program that subdata exchanges, the computer program cause computer to perform any as described in the method embodiment The part or all of step of method, the computer include mobile terminal.
The embodiment of the present application also provides a kind of computer program product, and the computer program product includes storing calculating The non-transient computer-readable recording medium of machine program, the computer program are operable to make computer perform such as the side The part or all of step of either method described in method embodiment.The computer program product can be a software installation Bag, the computer include mobile terminal.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the application and from the limitation of described sequence of movement because According to the application, some steps can use other orders or be carried out at the same time.Secondly, those skilled in the art should also know Know, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily the application It is necessary.
In the described embodiment, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed device, can be by another way Realize.For example, device embodiment described above is only schematical, such as the division of the unit, it is only one kind Division of logic function, can there is an other dividing mode when actually realizing, such as multiple units or component can combine or can To be integrated into another system, or some features can be ignored, or not perform.Another, shown or discussed is mutual Coupling, direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit, Can be electrical or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical location, you can with positioned at a place, or can also be distributed to multiple In network unit.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units integrate in a unit.The integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use When, it can be stored in a computer-readable access to memory.Based on such understanding, the technical solution of the application substantially or Person say the part to contribute to the prior art or the technical solution all or part can in the form of software product body Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) performs all or part of each embodiment the method for the application Step.And foregoing memory includes:USB flash disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can be with the medium of store program codes.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of the embodiment is can To instruct relevant hardware to complete by program, which can be stored in a computer-readable memory, memory It can include:Flash disk, read-only storage (English:Read-Only Memory, referred to as:ROM), random access device (English: Random Access Memory, referred to as:RAM), disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is set forth, and the explanation of above example is only intended to help to understand the present processes and its core concept; Meanwhile for those of ordinary skill in the art, according to the thought of the application, can in specific embodiments and applications There is change part, in conclusion this specification content should not be construed as the limitation to the application.

Claims (10)

  1. A kind of 1. image combining method, it is characterised in that including:
    Pantograph ratio of the target number of people image relative to image to be synthesized is determined according to the face feature point of target number of people image Example and position reference point;
    Determine the desired value of the reference element of the target number of people image;
    Determine rotation angle of the target number of people image in the image to be synthesized;
    According to the scaling, the position reference point, the desired value of the reference element value and the rotation angle, The target number of people image is synthesized in the image to be synthesized.
  2. 2. according to the method described in claim 1, it is characterized in that, the face feature point includes the first human eye characteristic point, the 2 human eye feature points and the first chin characteristic point;The target number of people image is determined according to the face feature point of target number of people image Relative to the scaling and position reference point of image to be synthesized, including:
    Identify the first human eye characteristic point, the second human eye feature point and the first chin characteristic point of target number of people image;
    According to the first distance between the first human eye characteristic point and the second human eye feature point and the figure to be synthesized The second distance between human eye fixed reference feature point as in, determines scaling of the target number of people image relative to image to be synthesized Ratio;
    Determine that the second chin characteristic point in the image to be synthesized is the target number of people image in the image to be synthesized The position reference point synthesized, the position reference point are overlapped with the first chin characteristic point of the target number of people image.
  3. 3. according to the method for claim 1 or 2, it is characterised in that the target of the reference element of the definite target number of people image Value, including:
    Obtain the value of the reference element of the image to be synthesized;
    According to the value of the original value of the reference element of the target number of people image and the reference element of the image to be synthesized, Determine the desired value of the reference element of the target number of people image.
  4. 4. according to the method for any one of claim 1-3, it is characterised in that described to determine that the target number of people image is treated described The rotation angle of composograph, including:
    Human eye fixed reference feature point and chin fixed reference feature point in the image to be synthesized determine that first refers to rotation angle;
    Determine that second of the number of people image in the target number of people image refers to rotation angle;
    Determine the target number of people image described with reference to rotation angle with reference to rotation angle and described second according to described first The rotation angle of image to be synthesized.
  5. 5. according to the method for claim 1-4, it is characterised in that according to the scaling, the position reference point, the ginseng The desired value of element value and the rotation angle are examined, the target number of people image is synthesized in the image to be synthesized, including:
    The size of the number of people image is adjusted according to the scaling;
    The number of people image after being sized according to the adjustment of the desired value of the reference element;
    Using the position reference point as rotary reference point, it is sized according to described in rotation angle rotation with described with reference to member Number of people image after element value, to synthesize the target number of people image in the image to be synthesized.
  6. A kind of 6. image synthesizer, it is characterised in that including determining module and synthesis module, wherein,
    The determining module, for determining the target number of people image relative to treating according to the face feature point of target number of people image The scaling and position reference point of composograph;
    The determining module, is additionally operable to determine the desired value of the reference element of the target number of people image;
    The determining module, is additionally operable to determine rotation angle of the target number of people image in the image to be synthesized;
    The synthesis module, for the desired value according to the scaling, the position reference point, the reference element value with And the rotation angle, the target number of people image is synthesized in the image to be synthesized.
  7. 7. device according to claim 6, it is characterised in that the determining module is specifically used for:
    Identify the first human eye characteristic point, the second human eye feature point and the first chin characteristic point of target number of people image;
    Determine the target number of people image relative to waiting to close according to the first human eye characteristic point and the second human eye feature point Into the scaling of image;
    Determine that the second chin characteristic point in the image to be synthesized is the target number of people image in the image to be synthesized The position reference point synthesized, the position reference point are overlapped with the first chin characteristic point of the target number of people image.
  8. 8. device according to claim 6, it is characterised in that the determining module is specifically used for:
    Obtain the value of the reference element of the image to be synthesized;
    According to the value of the original value of the reference element of the target number of people image and the reference element of the image to be synthesized, Determine the desired value of the reference element of the target number of people image.
  9. A kind of 9. mobile terminal, it is characterised in that including processor, memory, communication interface and one or more program, its In, one or more of programs are stored in the memory, and are configured to be performed by the processor, described program Instruction including requiring the step in any one of 1-5 method for perform claim.
  10. 10. a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium storage is used for electron number According to the computer program of exchange, wherein, the computer program causes computer to perform such as claim 1-5 any one of them Method, the computer include mobile terminal.
CN201710992295.9A 2017-10-23 2017-10-23 A kind of picture synthetic method and device Pending CN107945102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710992295.9A CN107945102A (en) 2017-10-23 2017-10-23 A kind of picture synthetic method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710992295.9A CN107945102A (en) 2017-10-23 2017-10-23 A kind of picture synthetic method and device

Publications (1)

Publication Number Publication Date
CN107945102A true CN107945102A (en) 2018-04-20

Family

ID=61935557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710992295.9A Pending CN107945102A (en) 2017-10-23 2017-10-23 A kind of picture synthetic method and device

Country Status (1)

Country Link
CN (1) CN107945102A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388464A (en) * 2018-09-28 2019-02-26 广州视源电子科技股份有限公司 Element control method and device
CN112507837A (en) * 2020-12-01 2021-03-16 杭州小影创新科技股份有限公司 Adaptive algorithm based on human head segmentation and using method thereof
CN112640412A (en) * 2018-09-06 2021-04-09 富士胶片株式会社 Image processing apparatus, method and program
CN117576247A (en) * 2024-01-17 2024-02-20 江西拓世智能科技股份有限公司 Picture generation method and system based on artificial intelligence

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872424A (en) * 2010-07-01 2010-10-27 重庆大学 Facial expression recognizing method based on Gabor transform optimal channel blur fusion
CN102663361A (en) * 2012-04-01 2012-09-12 北京工业大学 Face image reversible geometric normalization method facing overall characteristics analysis
CN103413118A (en) * 2013-07-18 2013-11-27 毕胜 On-line glasses try-on method
CN104123749A (en) * 2014-07-23 2014-10-29 邢小月 Picture processing method and system
CN104637078A (en) * 2013-11-14 2015-05-20 腾讯科技(深圳)有限公司 Image processing method and device
CN105354792A (en) * 2015-10-27 2016-02-24 深圳市朗形网络科技有限公司 Method for trying virtual glasses and mobile terminal
CN106203364A (en) * 2016-07-14 2016-12-07 广州帕克西软件开发有限公司 System and method is tried in a kind of 3D glasses interaction on

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872424A (en) * 2010-07-01 2010-10-27 重庆大学 Facial expression recognizing method based on Gabor transform optimal channel blur fusion
CN102663361A (en) * 2012-04-01 2012-09-12 北京工业大学 Face image reversible geometric normalization method facing overall characteristics analysis
CN103413118A (en) * 2013-07-18 2013-11-27 毕胜 On-line glasses try-on method
CN104637078A (en) * 2013-11-14 2015-05-20 腾讯科技(深圳)有限公司 Image processing method and device
CN104123749A (en) * 2014-07-23 2014-10-29 邢小月 Picture processing method and system
CN105354792A (en) * 2015-10-27 2016-02-24 深圳市朗形网络科技有限公司 Method for trying virtual glasses and mobile terminal
CN106203364A (en) * 2016-07-14 2016-12-07 广州帕克西软件开发有限公司 System and method is tried in a kind of 3D glasses interaction on

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112640412A (en) * 2018-09-06 2021-04-09 富士胶片株式会社 Image processing apparatus, method and program
US11403798B2 (en) 2018-09-06 2022-08-02 Fujifilm Corporation Image processing apparatus, method, and program
CN112640412B (en) * 2018-09-06 2023-03-10 富士胶片株式会社 Image processing apparatus, method and recording medium
CN109388464A (en) * 2018-09-28 2019-02-26 广州视源电子科技股份有限公司 Element control method and device
CN109388464B (en) * 2018-09-28 2022-03-08 广州视源电子科技股份有限公司 Element control method and device
CN112507837A (en) * 2020-12-01 2021-03-16 杭州小影创新科技股份有限公司 Adaptive algorithm based on human head segmentation and using method thereof
CN117576247A (en) * 2024-01-17 2024-02-20 江西拓世智能科技股份有限公司 Picture generation method and system based on artificial intelligence
CN117576247B (en) * 2024-01-17 2024-03-29 江西拓世智能科技股份有限公司 Picture generation method and system based on artificial intelligence

Similar Documents

Publication Publication Date Title
CN107945102A (en) A kind of picture synthetic method and device
CN109389562B (en) Image restoration method and device
WO2022078041A1 (en) Occlusion detection model training method and facial image beautification method
CN111383232B (en) Matting method, matting device, terminal equipment and computer readable storage medium
CN108009470A (en) A kind of method and apparatus of image zooming-out
CN108197602A (en) A kind of convolutional neural networks generation method and expression recognition method
CN111275650B (en) Beauty treatment method and device
WO2020220679A1 (en) Method and device for image processing, and computer storage medium
CN107369174A (en) The processing method and computing device of a kind of facial image
CN107590474B (en) Unlocking control method and related product
US20210097268A1 (en) Image processing method and apparatus, and computer storage medium
CN111161131A (en) Image processing method, terminal and computer storage medium
CN110288715A (en) Virtual necklace try-in method, device, electronic equipment and storage medium
CN104754221A (en) Photographing method and mobile terminal
CN107888970A (en) Method for processing video frequency, device, embedded device and storage medium
CN110910512B (en) Virtual object self-adaptive adjustment method, device, computer equipment and storage medium
CN108111747A (en) A kind of image processing method, terminal device and computer-readable medium
CN106875332A (en) A kind of image processing method and terminal
CN115689947B (en) Image sharpening method, system, electronic device and storage medium
KR20210041534A (en) Image processing method, device and electronic device
CN111932442A (en) Video beautifying method, device and equipment based on face recognition technology and computer readable storage medium
CN107563338A (en) Method for detecting human face and Related product
CN107977628B (en) Neural network training method, face detection method and face detection device
CN116977539A (en) Image processing method, apparatus, computer device, storage medium, and program product
CN112785490B (en) Image processing method and device and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180420

RJ01 Rejection of invention patent application after publication