CN109872273A - A kind of image processing method and device - Google Patents

A kind of image processing method and device Download PDF

Info

Publication number
CN109872273A
CN109872273A CN201910142001.2A CN201910142001A CN109872273A CN 109872273 A CN109872273 A CN 109872273A CN 201910142001 A CN201910142001 A CN 201910142001A CN 109872273 A CN109872273 A CN 109872273A
Authority
CN
China
Prior art keywords
processed
history
image
identification information
face effect
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
CN201910142001.2A
Other languages
Chinese (zh)
Inventor
李瑾
王玉翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Lake Information Technology Co Ltd
Original Assignee
Shanghai Lake Information 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 Shanghai Lake Information Technology Co Ltd filed Critical Shanghai Lake Information Technology Co Ltd
Priority to CN201910142001.2A priority Critical patent/CN109872273A/en
Publication of CN109872273A publication Critical patent/CN109872273A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a kind of image processing method and devices, and wherein method includes: to obtain the first image, determine the identification information for P object for including in the first image, and determine M objects to be processed;It is directed to each object to be processed, if the success of the identification information match of the identification information of object to be processed and the first history object, process object is treated using the corresponding U.S. face effect of the first history object and is handled, obtain the corresponding target object of object to be processed;According to the corresponding target object of M object to be processed, updates the first image and obtain the second image.In the embodiment of the present invention, process object is treated by using U.S. face effect corresponding with successful first history object of object matching to be processed to be handled, user, which may not need, resets the corresponding beauty Yan Xiaoguo of object to be processed, so as to improve the flexibility of image procossing, and improve the experience of user.

Description

A kind of image processing method and device
Technical field
The present invention relates to technical field of image processing more particularly to a kind of image processing methods and device.
Background technique
At this stage, image processing apparatus, such as beauty Yan Xiangji are usually provided on terminal device, U.S. face camera can be to bat The image taken the photograph is handled, and the image for keeping user satisfied is obtained.For example, user is shot using U.S. face camera To after an original image, original image can be handled by the U.S. face effect being arranged on U.S. face camera, for example change Filter mode, adjusting whitening degree, modification black eye etc., to obtain the image after U.S. face.In general, the image after U.S. face It is more beautiful than original image, personage is also more beautiful.Existing U.S. face camera usually requires user's manual setting original image Beautiful Yan Xiaoguo (for example, successively select filter mode, whitening degree, go the configuration parameters such as black eye effect), however, user is more Tend to may not need and gets more satisfied picture by way of manual setting.
To solve the above-mentioned problems, the prior art usually pre-sets a variety of different U.S. face effects and every kind of U.S. face effect The corresponding configuration parameter of fruit, user can be obtained satisfied after shooting picture by selecting one such beauty Yan Xiaoguo Picture.In this kind of method, user, which may not need, sets gradually various configurations parameter, however, being directed to including multiple personages Image for, each personage on image may have different problems (for example, somebody's object needs whitening, somebody's object Need black eye), if being all made of identical beauty Yan Xiaoguo to each of image object, the image that may be such that treated It is unsatisfactory for the needs of user.For example, including father, the mother and her children in image, the face of father is more obscure, and mother and child The face of son compares brilliant white, at this point, handling according to the U.S. face effect for being suitable for father image, may be such that mother It is excessively white with the skin of child, image fault is caused, the experience of user is poor.
To sum up, a kind of image processing method is needed at present, to improve the flexibility of image procossing, and improves the body of user It tests.
Summary of the invention
The embodiment of the present invention provides a kind of image processing method, to improve the flexibility of image procossing, and improves user Experience.
A kind of image processing method provided in an embodiment of the present invention, this method comprises:
The first image is obtained, determines the identification information for P object for including in the first image;
M objects to be processed are determined from the P object;
It is directed to each of the M objects to be processed object to be processed, by the identification information of the object to be processed It is matched with the identification information of the multiple history objects stored in historical data base;If the identification information of the object to be processed With the success of the identification information match of the first history object, then using the corresponding U.S. face effect of first history object to it is described to It is handled, obtains the corresponding target object of the object to be processed;It is stored in the historical data base multiple The identification information of history object and the corresponding beauty Yan Xiaoguo of the multiple history object;
According to the corresponding target object of M object to be processed, updates the first image and obtains the second image, Wherein, P >=M.
Optionally, the method also includes: if there is no marks with the object to be processed in the historical data base The identification information of the successful history object of information matches then issues prompt information, and the prompt information is for prompting user setting The corresponding beauty Yan Xiaoguo of the object to be processed;
After the corresponding U.S. face effect of the object to be processed for receiving the user setting, the object to be processed is used Corresponding U.S. face effect handles the object to be processed, obtains the corresponding target object of the object to be processed.
Optionally, after being handled using the corresponding U.S. face effect of the object to be processed the object to be processed, Further include:
The corresponding U.S. face effect storage of the identification information of the object to be processed and the object to be processed is gone through to described History database.
Optionally, the corresponding U.S. face effect of first history object include used in first history object at least One filter;
The object to be processed is handled using the corresponding U.S. face effect of first history object, comprising:
The selection target filter from least one filter used in first history object uses the target filter The object to be processed is handled.
Optionally, the corresponding U.S. face effect of the history object includes at least one expression used in the history object Information and the corresponding beautification parameter of at least one described expression information;The expression information is textures, any in mask One or any combination;
The object to be processed is handled using the corresponding U.S. face effect of first history object, comprising:
The selection target expression information from least one expression information used in first history object, using described The corresponding beautification parameter of target expression information handles the object to be processed.
A kind of image processing apparatus provided in an embodiment of the present invention, the device include:
Determining module determines the identification information for P object for including in the first image for obtaining the first image; And M objects to be processed are determined from the P object;Wherein, P >=M;
Processing module will be described to be processed right for being directed to each of the M objects to be processed object to be processed The identification information of the multiple history objects stored in the identification information of elephant and historical data base is matched;If described to be processed right The identification information match of the identification information of elephant and the first history object success, then using the corresponding U.S. face of first history object Effect handles the object to be processed, obtains the corresponding target object of the object to be processed;The historical data base In be stored with the identification information and the corresponding beauty Yan Xiaoguo of the multiple history object of multiple history objects;
Update module, for updating the first image according to the corresponding target object of M object to be processed Obtain the second image.
Optionally, the processing module is also used to: if being not present and the object to be processed in the historical data base The identification information of the successful history object of identification information match then issues prompt information, and the prompt information is for prompting user The corresponding beauty Yan Xiaoguo of the object to be processed is set;
After the corresponding U.S. face effect of the object to be processed for receiving the user setting, the object to be processed is used Corresponding U.S. face effect handles the object to be processed, obtains the corresponding target object of the object to be processed.
Optionally, the processing module using the corresponding U.S. face effect of the object to be processed to the object to be processed into After row processing, the update module is also used to:
The corresponding U.S. face effect storage of the identification information of the object to be processed and the object to be processed is gone through to described History database.
Optionally, the corresponding U.S. face effect of first history object include used in first history object at least One filter;
The processing module is used for: selection target is filtered from least one filter used in first history object Mirror is handled the object to be processed using the target filter.
Optionally, the corresponding U.S. face effect of the history object includes at least one expression used in the history object Information and the corresponding beautification parameter of at least one described expression information;The expression information is textures, any in mask One or any combination;
The processing module is used for: the selection target from least one expression information used in first history object Expression information is handled the object to be processed using the corresponding beautification parameter of the target expression information.
In the above embodiment of the present invention, after obtaining the first image, the mark for P object for including in the first image is determined Information, and then M objects to be processed are determined from P object;It is to be processed right to be directed to each of M objects to be processed As, can by the identification information of the multiple history objects stored in the identification information and historical data base of object to be processed carry out Match, if the success of the identification information match of the identification information of object to be processed and the first history object, can be used the first history The corresponding U.S. face effect of object is treated process object and is handled, and the corresponding target object of object to be processed is obtained;Further, First image can be updated, the second image is obtained according to the corresponding target object of M object to be processed.This hair In bright embodiment, by using U.S. face effect corresponding with successful first history object of object matching to be processed to be processed right As being handled, user, which may not need, resets the corresponding beauty Yan Xiaoguo of object to be processed, so as to improve image procossing Flexibility, and improve the experience of user;And be that multiple objects to be processed are respectively processed in the embodiment of the present invention, phase Than in the prior art using identical U.S. face effect for by the way of multiple objects to be processed are handled, can be to avoid image Distortion, so that treated, image is more in line with actual needs.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without any creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is a kind of corresponding flow diagram of image processing method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of the image processing apparatus provided in the embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into It is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts All other embodiment, shall fall within the protection scope of the present invention.
The image processing method provided in the embodiment of the present invention can be applied to be provided in the terminal device of filming apparatus, Such as mobile phone, video camera, laptop etc., specifically it is not construed as limiting.Image processing method in the embodiment of the present invention is corresponding Executing program can store in terminal device, and can be called by terminal device.In one example, terminal device can be with After detecting that user's enabling filming apparatus shoots to obtain original image, call the corresponding execution program of image processing method to original Beginning image is handled, and then treated target image is presented to the user by the display screen of terminal device;That is, User passes through the filming apparatus target image that can be directly obtained that treated.It in another example, can be in terminal device It is provided with image processing software, terminal device can call image processing method after detecting that user triggers image processing software The corresponding execution program of method handles original image;That is, can be obtained if user does not trigger image processing software To original image, if user triggers image processing software, the target image after can be processed.
It should be noted that above-mentioned terminal device is only a kind of example of the terminal device in the embodiment of the present invention, at it In its possible example, it is also provided with other softwares, such as weather, clock, call etc. on terminal device, does not limit specifically It is fixed.
Fig. 1 is a kind of corresponding flow diagram of image processing method provided in an embodiment of the present invention,
Step 101, the first image is obtained, determines the identification information for P object for including in the first image.
Herein, the first image can currently enable the image that filming apparatus is shot for user, or may be eventually The image of the filming apparatus shooting stored in end equipment, or can also be the image that terminal device is obtained from other equipment, Specifically without limitation.Wherein, terminal device obtained from other equipment image mode can there are many, for example, terminal device (cable network or wireless network, such as optical fiber, cable, bluetooth etc.) other equipment can be obtained by way of network communication The image of middle storage, or can also be stored in the other equipment of acquisition in such a way that data are transmitted (for example, mobile hard disk) Image, specifically without limitation.
If the first image is that user currently enables the image that filming apparatus is shot, terminal device can detected Filming apparatus is shot after obtaining the first image, i.e., handles the first image, and the second figure that the first image of processing is obtained As being presented to the user;If the first image be terminal device in store filming apparatus shooting image, or for terminal device from The image obtained in other equipment, then terminal device can be after the image processing commands for detecting user's triggering, to the first figure As being handled.Wherein, image processing commands can be to be obtained by the phonetic order that user issues, or or lead to What the key command and/or icon click commands for crossing user's triggering obtained, specifically without limitation.In one example, terminal is set It is standby that speech recognition equipment above can be set, if terminal device receives the phonetic order of user's sending, voice can be called Phonetic order is converted to literal order by identification device, and multiple keywords preset in literal order and terminal device are carried out Matching, obtains image processing commands.In another example, at least one key and/or figure can be set on terminal device It marks, each key or each icon at least one key and/or icon can be corresponding with control instruction, on terminal device It is provided at least one key, if the corresponding control instruction of key 8 is image processing commands, terminal device can examined When measuring user's triggering key 8, image processing commands are obtained.
In the embodiment of the present invention, after obtaining the first image, the object for including in the first image can be identified, be obtained The identification information of P object.Wherein, the type of any two object in P object can be identical, or can also be different, Specifically without limitation.For example, P object may include P personage if the first image is the image for including P personage;If the One image is the image for including P rabbit, then P object may include P rabbit;If the first image is to include N number of personage and T The image of a rabbit, then P object may include N number of personage and T rabbit, wherein N+T=P.It include below P with P object For a personage, the image processing method in the embodiment of the present invention is described, P object is that other types of example is referred to this Method in inventive embodiments is implemented, specifically without limitation.
In one possible implementation, face identification device can be set in terminal device, has got first After image, terminal device can call face identification device to identify the face for including in the first image, and can be by P object detection for including in one image comes out.Specifically, face identification device can detecte the P for including in the first image The five features of a object obtains the identification information of P object, such as shape, the ratio of pupil and the white of the eye of eyes, single eyes Skin, the tall and straight degree of nose, the thin and thick of lip, ear-lobe size, eyes and nose and the distance of mouth etc..In an example In, first database, the P object that face identification device can will identify that the first image obtains can be set in terminal device Identification information storage in first database.Table 1 is a kind of identification information signal of the P object stored in first database Table.
A kind of table 1: identification information schematic table of P object
Object Eye shape Pupil: the white of the eye Eyelid Lip thickness Ear-lobe size
First object Peach blossom eye 1:1.5 It is single 2 1.5
Second object Slim eye 1:1.2 It is single 2.2 2
Third object Willow leaf eye 1:1.6 It is double 2.1 1.7
4th object Sleep phoenix eyes 1:1.8 It is double 2.6 1.3
It as shown in table 1, include the first object, the second object, third object and the 4th object, the first object in the first image The identification information of any object may include the eye shape of the object, the ratio of pupil and the white of the eye, eyelid in~the four object Type, the thickness of lip and the size of ear-lobe.According to the content that table 1 is illustrated, the eye shape of the first object is peach blossom eye, The ratio of pupil and the white of the eye is 1:1.5, and the type of eyelid is single-edge eyelid, lip with a thickness of 2cm, the size of ear-lobe is 1.5cm; The eye shape of second object is slim eye, and the ratio of pupil and the white of the eye is 1:1.2, and the type of eyelid is single-edge eyelid, lip With a thickness of 2.2cm, the size of ear-lobe is 2cm;The eye shape of third object is willow leaf eye, and the ratio of pupil and the white of the eye is 1: 1.6, the type of eyelid is double-edged eyelid, lip with a thickness of 2.1cm, the size of ear-lobe is 1.7cm;The eye shape of 4th object To sleep phoenix eyes, the ratio of pupil and the white of the eye is 1:1.8, and the type of eyelid is double-edged eyelid, lip with a thickness of 2.6cm, ear-lobe Size is 1.3cm.
Step 102, M objects to be processed are determined from P object.
Herein, determined from P object M object to be processed mode can there are many, in a kind of possible realization In mode, terminal device can be after determining P object that the first image includes, according to P object in the first image Image effect (contrast, brightness including face and background etc.) determines M objects to be processed.For example, terminal device pair After first image is identified, determine that the colour of skin of the first object is more black, the colour of skin of the second object is more yellow, third object and the 4th pair The colour of skin of elephant is normal, then illustrates that the image effect of the first object and the second object in the first image is poor, third image and Image effect of four images in the first image is preferable, at this point, terminal device can be using the first object and the second object as two A object to be processed.
In alternatively possible implementation, terminal device can after determining P object that the first image includes, The first prompt information is sent to user, the first prompt information can be used for that user is prompted to select M from P object a to be processed Object;Further, M objects to be processed of the available user's selection of terminal device.In one example, terminal device can It may include the first prompt information in text box to show a text box on a display screen, after user triggers confirmation key, Terminal device shows P subgraph on a display screen, and any subgraph in P subgraph corresponds to any right in P object As.For example, show four subgraphs on the display screen of terminal device, subgraph 1 includes the first object, and subgraph 2 includes the Two objects, subgraph 3 include third object, and subgraph 4 includes the 4th object, if user clicks subgraph 1 and subgraph 2, It can determine the first object and the second object is object to be processed.
Step 103, respectively by the identification information of P object to be processed respectively with multiple history for being stored in historical data base The identification information of object is matched.
In the embodiment of the present invention, it can be previously provided with historical data base in terminal device, can be deposited in historical data base Contain the identification information and the corresponding beauty Yan Xiaoguo of multiple history objects of multiple history objects.Wherein, multiple history objects can be with It for the processed multiple objects of terminal device, or may be that terminal device is untreated and multiple right through user setting As being specifically not construed as limiting.Table 2 is a kind of schematic table of historical data base.
A kind of table 2: historical data base schematic table
Object Eye shape Pupil: the white of the eye Eyelid Lip thickness Ear-lobe size U.S. face
First history object Peach blossom eye 1:1.5 It is single 2 1.5 2.2
Third history object Willow leaf eye 1:1.6 It is double 2.1 1.7 0.5
4th history object Sleep phoenix eyes 1:1.8 It is double 2.6 1.3 0.7
As shown in table 2, the identification information of history object and three history objects difference there are three being stored in historical data base The beautiful Yan Xiaoguo of object.Wherein, three history objects are respectively the first history object, third history object and the 4th history pair As being illustrated according to table 2, the eye shape of the first history object is peach blossom eye, and the ratio of pupil and the white of the eye is 1:1.5, eye The type of skin is single-edge eyelid, lip with a thickness of 2cm, the size of ear-lobe is 1.5cm, the corresponding beauty Yan Xiaoguo of the first history object It is 2.2;The eye shape of third history object is willow leaf eye, and the ratio of pupil and the white of the eye is 1:1.6, and the type of eyelid is eyes Skin, lip with a thickness of 2.1cm, the size of ear-lobe is 1.7cm, and the corresponding U.S. face effect of third history object is 0.5;4th goes through The eye shape of history object is to sleep phoenix eyes, and the ratio of pupil and the white of the eye is 1:1.8, and the type of eyelid is double-edged eyelid, the thickness of lip Degree is 2.6cm, and the size of ear-lobe is 1.3cm, and the corresponding U.S. face effect of the 4th history object is 0.7.It should be noted that table 2 Shown in the U.S. face effect of meaning be single beautiful Yan Xiaoguo, such as can be for whitening coefficient, filtering effects etc., in practical operation In, U.S. face effect can also be configured by user, for example combination beauty Yan Xiaoguo can be set, and be specifically not construed as limiting.
In the embodiment of the present invention, corresponding U.S. face effect can there are many possibility for history object, in a kind of possible realization In mode, the corresponding U.S. face effect of history object may include at least one filter used in history object.What table 2 was illustrated It is the scene that the corresponding U.S. face effect of history object includes a filter used in history object, table 3 illustrates history pair As corresponding U.S. face effect includes the scene of multiple filters used in history object.In alternatively possible implementation, The corresponding U.S. face effect of history object may include at least one expression information used in history object and at least one expression The corresponding beautification parameter of information, wherein expression information can be textures, any one or any combination in mask.Table 4 Illustrating the corresponding U.S. face effect of history object includes at least one expression information used in history object and at least one The scene of the corresponding beautification parameter of expression information.
Table 3: another historical data base schematic table
As shown in table 3, if U.S. face effect is filter, it is three kinds corresponding to be stored with the first history object in historical data base Filter, respectively 2.2,1.6 and 1.2;Correspondingly, the corresponding two kinds of filters of third history object are stored in historical data base, Respectively 0.5 and 0.8.
Table 4: another historical data base schematic table
As shown in table 4, if U.S. face effect includes at least one mask beautification parameter corresponding at least one mask, The corresponding two kinds of masks of the first history object and the corresponding beautification parameter of two kinds of masks are then stored in historical data base, if The corresponding mask of first historical data is type of facial makeup in Beijing opera, then the corresponding beautification parameter of the first historical data is 2.2, if the first history The corresponding mask of data is Henan opera types of facial makeup in Beijing operas, then the corresponding beautification parameter of the first historical data is 1.5.Correspondingly, historical data base In be stored with the corresponding type of facial makeup in Beijing opera of third history object and the corresponding beautification parameter 0.5 of type of facial makeup in Beijing opera, deposited in historical data base The corresponding two kinds of masks of the 4th history object and the corresponding beautification parameter of two kinds of masks are contained, if the 4th historical data is corresponding Mask be type of facial makeup in Beijing opera, then the corresponding beautification parameter of the 4th historical data be 0.7, if the corresponding mask of the 4th historical data is Henan opera types of facial makeup in Beijing operas, then the corresponding beautification parameter of the 4th historical data is 1.2.
In specific implementation, it is directed to each of M objects to be processed object to be processed, it can be by the object to be processed The identification information of the multiple history objects stored in identification information and historical data base is matched.Specifically, being directed to Mr. Yu One history object can be by each feature of object to be processed and the history pair if identification information includes multiple features Each feature of elephant compares, so that it is determined that multiple history objects in object to be processed and historical data base whether Match.
Step 104, judge in historical data base with the presence or absence of the successful history of identification information match with object to be processed The identification information of object.
It, can be by each of the identification information of object to be processed and historical data base history pair in the embodiment of the present invention The identification information of elephant is matched, if there is the successful history pair of identification information match with object to be processed in historical data base The identification information of elephant can then execute step 105a;Correspondingly, if there is no the marks with object to be processed in historical data base The identification information of the successful history object of information matches, then can execute step 105b.
If object to be processed includes the first object and the second object, the content illustrated according to Tables 1 and 2 is directed to the An object, the identification information of the first object is identical as the identification information of the first history object in table 2 in table 1, can determine first The identification information match of the identification information of object and the first history object success, so as to execute step to the first object 105a.Correspondingly, it is directed to the second object, the identification information of second object is gone through with the first history object~third in table 2 in table 1 The identification information of history object is all different, can determine in historical data base there is no with the identification information match of the first object at The identification information of the history object of function, so that step 105b can be executed by being directed to the second object.
Step 105a treats process object using U.S. face effect corresponding with the successful history object of object matching to be processed It is handled, obtains the corresponding target object of object to be processed.
Herein, if there is the mark with the successful history object of identification information match of object to be processed in historical data base Information then can be used U.S. face effect corresponding with the successful history object of object matching to be processed and treat at process object Reason, obtains the corresponding target object of object to be processed.
In one example, if historical data base is as shown in table 2, the corresponding U.S. face effect of the first history object includes single One filter, according to the content that table 2 is illustrated, can be used the corresponding U.S. face effect 2.2 of the first history object to the first object into Row processing.Since the first object in the first image is more black, by using biggish U.S. face effect 2.2 to the first object at Reason, can make the face of the first object bleach, so that the second obtained image more meets actual requirement.At another In example, if historical data base is as shown in table 3, the corresponding U.S. face effect of the first history object includes at least one filter, root According to the content that table 3 is illustrated, can from least one filter used in the first history object selection target filter, use mesh Mark filter is treated process object and is handled.In specific implementation, target filter can be automatic according to image effect for terminal device Selection, or may be what user selected, for example, the target filter that user selectes is 1.6, then beautiful Yan Xiaoguo can be used 1.6 pair of first object is handled, and obtains the corresponding target object of the first object.In yet another example, if historical data base As shown in table 4, then the corresponding U.S. face effect of the first history object includes at least one expression information and at least one expression information Corresponding beautification parameter can be from least one expression used in the first history object according to the content that table 4 is illustrated Selection target expression information in information is treated process object using the corresponding beautification parameter of target expression information and is handled.Tool During body is implemented, target expression information can be user's selection, for example, the target expression information that user selectes is type of facial makeup in Beijing opera, The corresponding U.S. face effect 2.2 of type of facial makeup in Beijing opera then can be used to handle the first object, obtain the corresponding target of the first object Object.
Step 105b treats process object using the corresponding U.S. face effect of the object to be processed of user setting and is handled, Obtain the corresponding target object of object to be processed.
In specific implementation, however, it is determined that there is no the identification information match with object to be processed successfully to go through in historical data base The identification information of history object, then terminal device can issue the second prompt information, and the second prompt information can be used for prompting user The corresponding beauty Yan Xiaoguo of object to be processed is set.Further, terminal device can receive the to be processed right of user setting After corresponding U.S. face effect, process object is treated using the corresponding U.S. face effect of object to be processed and is handled, is obtained wait locate Manage the corresponding target object of object.For example, there is no the marks with the second object matching in determining historical data base for terminal device After the identification information for knowing the history object of information matches, U.S. face effect can be inputted for user in the display screen display of terminal device The text box of fruit, if the U.S. face effect of user's input is 1.3,1.3 U.S. face effect is can be used to second pair in terminal device As being handled, the corresponding target object of the second object is obtained.
In the embodiment of the present invention, process object is treated using the corresponding U.S. face effect of the object to be processed of user setting and is carried out It, can also be by the corresponding U.S. face effect storage of the identification information of object to be processed and object to be processed to historical data after processing Library, to obtain updated historical data base.For example, using the corresponding U.S. face of the expression information of the second object and the second object After effect 1.3 updates historical data base shown in table 2, obtained updated historical data base is as shown in table 5.
A kind of table 5: updated historical data base schematic table
Object Eye shape Pupil: the white of the eye Eyelid Lip thickness Ear-lobe size U.S. face
First history object Peach blossom eye 1:1.5 It is single 2 1.5 2.2
Third history object Willow leaf eye 1:1.6 It is double 2.1 1.7 0.5
4th history object Sleep phoenix eyes 1:1.8 It is double 2.6 1.3 0.7
Second object Slim eye 1:1.2 It is single 2.2 2 1.2
Step 106, it according to the corresponding target object of M object to be processed, updates the first image and obtains the second image.
Herein, update the first image obtain the second image implementation can there are many, in a kind of possible realization side In formula (for ease of description, referred to as implementation 1), M objects to be processed are directed to, it can be to obtain any one to be processed After the corresponding target object of object, i.e., the object to be processed in the first image is replaced with into the corresponding target of the object to be processed Object, thus the m-th object to be processed in the first image is replaced with the corresponding target object of m-th object to be processed Afterwards, the second image is obtained.In alternatively possible implementation (for ease of description, referred to as implementation 2), it can obtain To after the corresponding M target object of M object to be processed, it is a to be processed that M objects to be processed in the first image are replaced with into M The corresponding M target object of object, obtains the second image.
For example bright, in implementation 1, after obtaining the corresponding target object of the first object, it can be used first The corresponding target object of object replaces the first object in the first image, obtains third image;Wherein, it can wrap in third image Include the corresponding target object of the first object, the second object, third object and the 4th object.Further, the second object is being obtained After corresponding target object, the second object in the corresponding target object replacement third image of the second object can be used, obtain Second image;It wherein, include the corresponding target object of the first object, the corresponding target object of the second object, the in the second image Three objects and the 4th object.In implementation 2, the corresponding target object of the first object and the corresponding mesh of the second object are being obtained After marking object, the corresponding target object of the first object can be used and the corresponding target object of the second object replaces the first figure respectively The first object and the second object as in obtain the and image.
It should be noted that updating the first image in other possible implementations and obtaining the realization side of the second image Formula can be configured by user, be specifically not construed as limiting.
In the above embodiment of the present invention, after obtaining the first image, the mark for P object for including in the first image is determined Information, and then M objects to be processed are determined from P object;It is to be processed right to be directed to each of M objects to be processed As, can by the identification information of the multiple history objects stored in the identification information and historical data base of object to be processed carry out Match, if the success of the identification information match of the identification information of object to be processed and the first history object, can be used the first history The corresponding U.S. face effect of object is treated process object and is handled, and the corresponding target object of object to be processed is obtained;Further, First image can be updated, the second image is obtained according to the corresponding target object of M object to be processed.This hair In bright embodiment, by using U.S. face effect corresponding with successful first history object of object matching to be processed to be processed right As being handled, user, which may not need, resets the corresponding beauty Yan Xiaoguo of object to be processed, so as to improve image procossing Flexibility, and improve the experience of user;And be that multiple objects to be processed are respectively processed in the embodiment of the present invention, phase Than in the prior art using identical U.S. face effect for by the way of multiple objects to be processed are handled, can be to avoid image Distortion, so that treated, image is more in line with actual needs.
For above method process, the embodiment of the present invention also provides a kind of device of Message Processing, the device it is specific in Appearance is referred to above method implementation.
Fig. 2 is a kind of image processing apparatus provided in an embodiment of the present invention, which includes:
Determining module 201 determines the mark letter for P object for including in the first image for obtaining the first image Breath;And M objects to be processed are determined from the P object;Wherein, P >=M;
Processing module 202, for being directed to each of the M objects to be processed object to be processed, by described wait locate The identification information for managing the multiple history objects stored in the identification information and historical data base of object is matched;If described wait locate Manage the identification information match success of the identification information and the first history object of object, then it is corresponding using first history object U.S. face effect handles the object to be processed, obtains the corresponding target object of the object to be processed;The history number According to the corresponding beauty Yan Xiaoguo of the identification information and the multiple history object that are stored with multiple history objects in library;
Update module 203, for updating described first according to the corresponding target object of M object to be processed Image obtains the second image.
Optionally, the processing module 202 is also used to: if being not present and the object to be processed in the historical data base The successful history object of identification information match identification information, then issue prompt information, the prompt information is used for prompting The corresponding beauty Yan Xiaoguo of the object to be processed is arranged in family;
After the corresponding U.S. face effect of the object to be processed for receiving the user setting, the object to be processed is used Corresponding U.S. face effect handles the object to be processed, obtains the corresponding target object of the object to be processed.
Optionally, the processing module 202 is using the corresponding U.S. face effect of the object to be processed to described to be processed right After being handled, the update module 203 is also used to:
The corresponding U.S. face effect storage of the identification information of the object to be processed and the object to be processed is gone through to described History database.
Optionally, the corresponding U.S. face effect of first history object include used in first history object at least One filter;
The processing module 202 is used for: the selection target from least one filter used in first history object Filter is handled the object to be processed using the target filter.
Optionally, the corresponding U.S. face effect of the history object includes at least one expression used in the history object Information and the corresponding beautification parameter of at least one described expression information;The expression information is textures, any in mask One or any combination;
The processing module 202 is used for: being selected from least one expression information used in first history object Target expression information is handled the object to be processed using the corresponding beautification parameter of the target expression information.
It can be seen from the above: in the above embodiment of the present invention, after obtaining the first image, determining in the first image Including P object identification information, and then determine from P object M objects to be processed;It is a to be processed right to be directed to M As each of object to be processed, the multiple history pair that can will be stored in the identification information and historical data base of object to be processed The identification information of elephant is matched, if the success of the identification information match of the identification information of object to be processed and the first history object, It the corresponding U.S. face effect of the first history object then can be used treats process object and handled, it is corresponding to obtain object to be processed Target object;It is possible to further be updated to the first image according to the corresponding target object of M object to be processed, Obtain the second image.In the embodiment of the present invention, by using corresponding with successful first history object of object matching to be processed U.S. face effect is treated process object and is handled, and user, which may not need, resets the corresponding beauty Yan Xiaoguo of object to be processed, from And the flexibility of image procossing can be improved, and improve the experience of user;It and in the embodiment of the present invention is to multiple to be processed right As being respectively processed, compared with the prior art in such a way that identical U.S. face effect handles multiple objects to be processed For, it can be to avoid image fault, so that treated, image is more in line with actual needs.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the present invention Form.It is deposited moreover, the present invention can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of image processing method, which is characterized in that the described method includes:
The first image is obtained, determines the identification information for P object for including in the first image;
M objects to be processed are determined from the P object;
Be directed to each of the M object to be processed object to be processed, by the identification information of the object to be processed with go through The identification information of the multiple history objects stored in history database is matched;If the identification information of the object to be processed and The identification information match success of one history object, then using the corresponding U.S. face effect of first history object to described to be processed Object is handled, and the corresponding target object of the object to be processed is obtained;Multiple history are stored in the historical data base The identification information of object and the corresponding beauty Yan Xiaoguo of the multiple history object;
According to the corresponding target object of M object to be processed, updates the first image and obtains the second image, In, P >=M.
2. the method according to claim 1, wherein the method also includes:
If there is no the marks with the successful history object of identification information match of the object to be processed in the historical data base Know information, then issues prompt information, the prompt information is for prompting the corresponding U.S. face effect of object to be processed described in user setting Fruit;
It is corresponding using the object to be processed after the corresponding U.S. face effect of the object to be processed for receiving the user setting U.S. face effect the object to be processed is handled, obtain the corresponding target object of the object to be processed.
3. according to the method described in claim 2, it is characterized in that, using the corresponding U.S. face effect of the object to be processed to institute It states after object to be processed handled, further includes:
By the corresponding U.S. face effect storage of the identification information of the object to be processed and the object to be processed to the history number According to library.
4. according to the method in any one of claims 1 to 3, which is characterized in that the corresponding beauty of first history object Face effect includes at least one filter used in first history object;
The object to be processed is handled using the corresponding U.S. face effect of first history object, comprising:
The selection target filter from least one filter used in first history object, using the target filter to institute Object to be processed is stated to be handled.
5. according to claim 1 or method described in any one of 3, which is characterized in that the corresponding U.S. face effect of the history object Fruit includes at least one expression information used in the history object and the corresponding beauty of at least one described expression information Change parameter;The expression information is textures, any one or any combination in mask;
The object to be processed is handled using the corresponding U.S. face effect of first history object, comprising:
The selection target expression information from least one expression information used in first history object, uses the target The corresponding beautification parameter of expression information handles the object to be processed.
6. a kind of image processing apparatus, which is characterized in that described device includes:
Determining module determines the identification information for P object for including in the first image for obtaining the first image;And M objects to be processed are determined from the P object;
Processing module, for being directed to each of the M objects to be processed object to be processed, by the object to be processed The identification information of the multiple history objects stored in identification information and historical data base is matched;If the object to be processed The success of the identification information match of identification information and the first history object, then use the corresponding beauty Yan Xiaoguo of first history object The object to be processed is handled, the corresponding target object of the object to be processed is obtained;It is deposited in the historical data base Contain the identification information and the corresponding beauty Yan Xiaoguo of the multiple history object of multiple history objects;
Update module, for updating the first image and obtaining according to the corresponding target object of M object to be processed Second image, wherein P >=M.
7. device according to claim 6, which is characterized in that the processing module is also used to:
If there is no the marks with the successful history object of identification information match of the object to be processed in the historical data base Know information, then issues prompt information, the prompt information is for prompting the corresponding U.S. face effect of object to be processed described in user setting Fruit;
It is corresponding using the object to be processed after the corresponding U.S. face effect of the object to be processed for receiving the user setting U.S. face effect the object to be processed is handled, obtain the corresponding target object of the object to be processed.
8. device according to claim 7, which is characterized in that the processing module is corresponding using the object to be processed After U.S. face effect handles the object to be processed, the update module is also used to:
By the corresponding U.S. face effect storage of the identification information of the object to be processed and the object to be processed to the history number According to library.
9. the device according to any one of claim 6 to 8, which is characterized in that the corresponding beauty of first history object Face effect includes at least one filter used in first history object;
The processing module is used for: the selection target filter from least one filter used in first history object makes The object to be processed is handled with the target filter.
10. the device according to any one of claim 6 or 8, which is characterized in that the corresponding U.S. face effect of the history object Fruit includes at least one expression information used in the history object and the corresponding beauty of at least one described expression information Change parameter;The expression information is textures, any one or any combination in mask;
The processing module is used for: the selection target expression from least one expression information used in first history object Information is handled the object to be processed using the corresponding beautification parameter of the target expression information.
CN201910142001.2A 2019-02-26 2019-02-26 A kind of image processing method and device Pending CN109872273A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910142001.2A CN109872273A (en) 2019-02-26 2019-02-26 A kind of image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910142001.2A CN109872273A (en) 2019-02-26 2019-02-26 A kind of image processing method and device

Publications (1)

Publication Number Publication Date
CN109872273A true CN109872273A (en) 2019-06-11

Family

ID=66919194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910142001.2A Pending CN109872273A (en) 2019-02-26 2019-02-26 A kind of image processing method and device

Country Status (1)

Country Link
CN (1) CN109872273A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110248104A (en) * 2019-07-22 2019-09-17 联想(北京)有限公司 A kind of image processing method, device and electronic equipment
CN110969120A (en) * 2019-11-29 2020-04-07 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995415A (en) * 2017-11-09 2018-05-04 深圳市金立通信设备有限公司 A kind of image processing method, terminal and computer-readable medium
CN109255761A (en) * 2018-08-23 2019-01-22 北京金山安全软件有限公司 Image processing method and device and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995415A (en) * 2017-11-09 2018-05-04 深圳市金立通信设备有限公司 A kind of image processing method, terminal and computer-readable medium
CN109255761A (en) * 2018-08-23 2019-01-22 北京金山安全软件有限公司 Image processing method and device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110248104A (en) * 2019-07-22 2019-09-17 联想(北京)有限公司 A kind of image processing method, device and electronic equipment
CN110248104B (en) * 2019-07-22 2021-03-19 联想(北京)有限公司 Image processing method and device and electronic equipment
CN110969120A (en) * 2019-11-29 2020-04-07 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and readable storage medium
CN110969120B (en) * 2019-11-29 2024-01-12 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11321385B2 (en) Visualization of image themes based on image content
CN105374055B (en) Image processing method and device
CN110503703A (en) Method and apparatus for generating image
CN108846377A (en) Method and apparatus for shooting image
CN108985257A (en) Method and apparatus for generating information
WO2015196038A1 (en) Image editing using selective editing tools
CN110570383B (en) Image processing method and device, electronic equipment and storage medium
CN109101919A (en) Method and apparatus for generating information
CN109584152A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN109032039A (en) A kind of method and device of voice control
CN110378847A (en) Face image processing process, device, medium and electronic equipment
CN108846878A (en) Face textures generation method, device, readable storage medium storing program for executing and mobile terminal
CN106713811A (en) Video communication method and device
CN109544444A (en) Image processing method, device, electronic equipment and computer storage medium
CN109872273A (en) A kind of image processing method and device
CN108921856A (en) Image cropping method, apparatus, electronic equipment and computer readable storage medium
CN110516598A (en) Method and apparatus for generating image
CN109145783A (en) Method and apparatus for generating information
CN109559288A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN108319937A (en) Method for detecting human face and device
CN109916055A (en) Control method and device
CN109241930A (en) Method and apparatus for handling supercilium image
CN108626854B (en) The control method and device of air-conditioning
CN108334821B (en) Image processing method and electronic equipment
CN107340962B (en) Input method and device based on virtual reality equipment and virtual reality 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