CN109255761A - Image processing method and device and electronic equipment - Google Patents

Image processing method and device and electronic equipment Download PDF

Info

Publication number
CN109255761A
CN109255761A CN201810966031.0A CN201810966031A CN109255761A CN 109255761 A CN109255761 A CN 109255761A CN 201810966031 A CN201810966031 A CN 201810966031A CN 109255761 A CN109255761 A CN 109255761A
Authority
CN
China
Prior art keywords
face
adjustment
image
processed
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810966031.0A
Other languages
Chinese (zh)
Other versions
CN109255761B (en
Inventor
莊凱伃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jupiter Technology Co ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201810966031.0A priority Critical patent/CN109255761B/en
Publication of CN109255761A publication Critical patent/CN109255761A/en
Application granted granted Critical
Publication of CN109255761B publication Critical patent/CN109255761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • G06T5/77
    • G06T3/04
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/162Detection; Localisation; Normalisation using pixel segmentation or colour matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Abstract

The embodiment of the invention provides an image processing method, an image processing device and electronic equipment, wherein the method comprises the following steps: obtaining an image to be processed; identifying the face features of the face in the image to be processed as the face features to be processed; determining target processing effect information based on the human face features to be processed and a preset corresponding relation, wherein the preset corresponding relation comprises: corresponding relations between different human face features and processing effect information; performing first adjustment processing on the face in the image to be processed based on the target processing effect information; and displaying the image after the first adjustment processing. The method and the device can adjust the face image which is more accordant with the aesthetic sense of the user, so that the adjusting effect is better, and the use experience of the user is improved.

Description

A kind of image processing method, device and electronic equipment
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of image processing method, device and electronic equipment.
Background technique
Currently, in order to meet the aesthetic requirement of user, all kinds of U.S. figure softwares emerge one after another.The big multi-configuration of U.S. figure software at present There is a key U.S. face function, in order to provide one group for user and meet the aesthetic adjusting parameter of user, which can be with It include: the adjustment data of big eye degree, the adjustment data of thin face degree and adjustment data of colour of skin setting etc., so that scheming in beauty Software a key U.S. face function starting after, the aesthetic adjusting parameter of user can be met according to the group, to the face in image into Row adjustment, so that more to meet user aesthetic for face adjusted.
However, the current corresponding adjusting parameter of a key U.S. face function is single, i.e., a key U.S. face function of U.S. figure software When can start, for different users, which carries out a key to the face in image using same group of adjusting parameter U.S. face adjustment.In view of there may be the culture background of different users difference, U.S. face demand there is a situation where different.The list One adjusting parameter may and not meet the aesthetic of certain user group, can then bring puzzlement to user at this time, brings not for user Good usage experience.
So, the image processing method for how providing a kind of better effect becomes urgent problem to be solved.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of image processing method, device and electronic equipment, to realize adjustment More meet the aesthetic facial image of user out, so that adjustment effect more preferably, improves the usage experience of user.Specific technical solution It is as follows:
On the one hand, the embodiment of the invention provides a kind of image processing methods, which comprises
Obtain image to be processed;
The face characteristic for identifying face in the image to be processed, as face characteristic to be processed;
Based on the face characteristic to be processed and preset corresponding relationship, target treatment effect information is determined, wherein institute State the corresponding relationship that preset corresponding relationship includes: different faces feature Yu treatment effect information;
The first adjustment processing is carried out to face described in the image to be processed based on the target treatment effect information;
Show the first adjustment treated image.
Optionally, the face characteristic to be processed includes features of skin colors to be processed;The preset corresponding relationship includes: not With the corresponding relationship of features of skin colors and treatment effect information;
It is described to be based on face characteristic to be processed and preset corresponding relationship, the step of determining target treatment effect information, Include:
Corresponding relationship and the features of skin colors to be processed based on different features of skin colors Yu treatment effect information, determine mesh Mark treatment effect information.
Optionally, the preset corresponding relationship includes: the corresponding relationship of different faces feature Yu default face classification, with And the corresponding relationship of different default face classifications and treatment effect information;
It is described to be based on the face characteristic to be processed and preset corresponding relationship, determine the step of target treatment effect information Suddenly, comprising:
Corresponding relationship and the face characteristic to be processed based on different faces feature Yu default face classification, determine institute It states and presets face classification belonging to face described in image to be processed, as target face classification;
Based on corresponding relationship and the target face classification of different default face classifications and treatment effect information, determine The corresponding treatment effect information of the target face classification, as target treatment effect information.
Optionally, in the face characteristic for identifying face in the image to be processed, as face characteristic to be processed Before step, the method also includes:
Judge whether there is the history adjustment information for face, wherein the history adjustment information are as follows: according to user's needle The information that face in history image is adjusted;
When there is no when the history adjustment information for being directed to face, execute face in the identification image to be processed for judgement Face characteristic, the step of as face characteristic to be processed.
Optionally, in the face characteristic for identifying face in the image to be processed, as face characteristic to be processed Before step, the method also includes:
Judge whether there is the history adjustment information for face, wherein the history adjustment information are as follows: according to user's needle The information that face in history image is adjusted;
When judgement has the history adjustment information for being directed to face, based on the history adjustment information to the figure to be processed The face as described in carries out second adjustment processing;
Show second adjustment treated image.
Optionally, after the displaying the first adjustment treated the image the step of, the method also includes:
User is received for the regulating command of the first adjustment treated face described in image;
Based on the regulating command, to the first adjustment, treated that processing is adjusted in face described in image;
Information is adjusted for treated the face record that adjusts.
Optionally, the face characteristic of the face characteristic and required adjusting that adjust needed for the regulating command carries is corresponding Adjustment parameter;
It is described for it is described adjust the step of treated face record adjusts information after, the method also includes:
Whether the adjusting frequency for judging that user is directed to same face characteristic is more than predeterminated frequency, and judges the face characteristic pair Within a preset range whether the fluctuation range between all adjustment parameters answered;
It is more than predeterminated frequency when judging result is the adjusting frequency that user is directed to same face characteristic, and judging result is to be somebody's turn to do Fluctuation range between the corresponding all adjustment parameters of face characteristic within a preset range when, based on for the adjusting processing after Face record adjusting information, generate be directed to face history adjustment information, wherein the history adjustment information are as follows: be used for The information of second adjustment processing is carried out to the face in obtained image.
Optionally, second tune is carried out to face described in the image to be processed based on the history adjustment information described Before the step of whole processing, the method also includes:
Obtain generation time and the current time of the history adjustment information;
Judge whether the current time and the difference for generating the time are more than preset duration;
When judgement is less than the preset duration, execution is described to be based on the history adjustment information to the figure to be processed The face as described in carries out the step of second adjustment processing.
Optionally, second tune is carried out to face described in the image to be processed based on the history adjustment information described Before the step of whole processing, the method also includes:
Obtain generation time and the current time of the history adjustment information;
Judge whether the current time and the difference for generating the time are more than preset duration;
When judgement is more than the preset duration, output inquiry prompt information, to ask the user whether to utilize the history Adjustment information carries out second adjustment processing to face described in the image to be processed;
Based on the selection result of the user, processing is adjusted to face described in the image to be processed.
Optionally, the face characteristic to be processed includes: features of skin colors to be processed, the corresponding eye feature to be processed of eyes Point and/or facial contour feature to be processed point;
The target treatment effect information includes the corresponding target adjustment parameter of target features of skin colors, objective eye feature pair The corresponding target adjustment parameter of target adjustment parameter and/or target shape of face feature answered;
It is described that face described in the image to be processed is carried out at the first adjustment based on the target treatment effect information The step of reason, comprising:
When target treatment effect information target adjustment parameter corresponding comprising the target features of skin colors, institute is utilized The corresponding target adjustment parameter of target features of skin colors is stated, colour of skin adjustment processing is carried out to the features of skin colors to be processed;
When target treatment effect information target adjustment parameter corresponding comprising the objective eye feature, institute is utilized The corresponding target adjustment parameter of objective eye feature is stated, eyes adjustment processing is carried out to the eye feature point to be processed;
When target treatment effect information target adjustment parameter corresponding comprising the target shape of face feature, institute is utilized The corresponding target adjustment parameter of target shape of face feature is stated, shape of face adjustment processing is carried out to the facial contour feature point to be processed.
On the other hand, the embodiment of the invention provides a kind of image processing apparatus, described device includes:
First obtains module, for obtaining the image to be processed comprising face;
Identification module, for identification in the image to be processed face face characteristic, as face characteristic to be processed;
Determining module determines target processing effect for being based on the face characteristic to be processed and preset corresponding relationship Fruit information, wherein the preset corresponding relationship includes: the corresponding relationship of different faces feature Yu treatment effect information;
The first adjustment module, for based on the target treatment effect information to face described in the image to be processed into The processing of row the first adjustment.
Second display module, treated for showing the first adjustment image.
Optionally, the face characteristic to be processed includes features of skin colors to be processed;The preset corresponding relationship includes: not With the corresponding relationship of features of skin colors and treatment effect information;
The determining module, is specifically used for
Corresponding relationship and the features of skin colors to be processed based on different features of skin colors Yu treatment effect information, determine mesh Mark treatment effect information.
Optionally, the preset corresponding relationship includes: the corresponding relationship of different faces feature Yu default face classification, with And the corresponding relationship of different default face classifications and treatment effect information;
The determining module, is specifically used for
Corresponding relationship and the face characteristic to be processed based on different faces feature Yu default face classification, determine institute It states and presets face classification belonging to face described in image to be processed, as target face classification;
Based on corresponding relationship and the target face classification of different default face classifications and treatment effect information, determine The corresponding treatment effect information of the target face classification, as target treatment effect information.
Optionally, described device further include:
First judgment module, for the face characteristic of the face in the identification image to be processed, as to be processed Before face characteristic, the history adjustment information for face is judged whether there is, wherein the history adjustment information are as follows: according to The information that user is adjusted for the face in history image;
When the history adjustment information for face is not present in judgement, the identification module is triggered.
Optionally, described device further include:
Second judgment module, for the face characteristic of the face in the identification image to be processed, as to be processed Before face characteristic, the history adjustment information for face is judged whether there is, wherein the history adjustment information are as follows: according to The information that user is adjusted for the face in history image;
Second adjustment module, for being adjusted based on the history when judgement has the history adjustment information for being directed to face Information carries out second adjustment processing to face described in the image to be processed;
Second display module, treated for showing second adjustment image.
Optionally, described device further include:
Receiving module, for after the displayings the first adjustment treated image, receiving user for the first adjustment The regulating command of treated face described in image;
Third adjusts module, for being carried out based on the regulating command to the first adjustment treated face described in image Adjusting processing;
Logging modle, for adjusting information for treated the face record that adjusts.
Optionally, the face characteristic of the face characteristic and required adjusting that adjust needed for the regulating command carries is corresponding Adjustment parameter;
Described device further include:
Second judgment module, for adjusting judgement after treated face record adjusts information for described described Whether user is more than predeterminated frequency for the adjusting frequency of same face characteristic, and judges the corresponding all adjustings of the face characteristic Within a preset range whether the fluctuation range between parameter;
Generation module, for being more than predeterminated frequency when judging result is the adjusting frequency that user is directed to same face characteristic, And fluctuation range of the judging result between the corresponding all adjustment parameters of the face characteristic within a preset range when, based on being directed to The adjusting information for adjusting treated face record, generates the history adjustment information for being directed to face, wherein the history tune Whole information are as follows: for carrying out the information of second adjustment processing to the face in obtained image.
Optionally, described device further include:
Second obtains module, for being based on the history adjustment information to face described in the image to be processed described Before carrying out second adjustment processing, generation time and the current time of the history adjustment information are obtained;
Third judgment module, when for judging whether the current time and the difference for generating the time are more than default It is long;
When judgement is less than the preset duration, the second adjustment module is triggered.
Optionally, described device further include:
Third obtains module, for being based on the history adjustment information to face described in the image to be processed described Before carrying out second adjustment processing, generation time and the current time of the history adjustment information are obtained;
4th judgment module, when for judging whether the current time and the difference for generating the time are more than default It is long;
Output module, for when judgement is more than the preset duration, prompt information to be inquired in output, to ask the user whether Second adjustment processing is carried out to face described in the image to be processed using the history adjustment information;
4th adjustment module, for the selection result based on the user, to face described in the image to be processed into Row adjustment processing.
Optionally, the face characteristic to be processed includes: features of skin colors to be processed, the corresponding eye feature to be processed of eyes Point and/or facial contour feature to be processed point;
The target treatment effect information includes the corresponding target adjustment parameter of target features of skin colors, objective eye feature pair The corresponding target adjustment parameter of target adjustment parameter and/or target shape of face feature answered;
The first adjustment module, is specifically used for
When target treatment effect information target adjustment parameter corresponding comprising the target features of skin colors, institute is utilized The corresponding target adjustment parameter of target features of skin colors is stated, colour of skin adjustment processing is carried out to the features of skin colors to be processed;
When target treatment effect information target adjustment parameter corresponding comprising the objective eye feature, institute is utilized The corresponding target adjustment parameter of objective eye feature is stated, eyes adjustment processing is carried out to the eye feature point to be processed;
When target treatment effect information target adjustment parameter corresponding comprising the target shape of face feature, institute is utilized The corresponding target adjustment parameter of target shape of face feature is stated, shape of face adjustment processing is carried out to the facial contour feature point to be processed.
On the other hand, the embodiment of the invention provides a kind of electronic equipment, including processor, communication interface, memory and Communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the computer program stored on memory, is realized provided by the embodiment of the present invention Any image processing method step.
On the other hand, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storages Dielectric memory contains computer program, realizes when the computer program is executed by processor and appoints provided by the embodiment of the present invention Image processing method step described in one.
Image processing method provided in an embodiment of the present invention obtains image to be processed;Identify face in image to be processed Face characteristic, as face characteristic to be processed;Based on face characteristic to be processed and preset corresponding relationship, determine that target is handled Effect information, wherein preset corresponding relationship includes: the corresponding relationship of different faces feature Yu treatment effect information;Based on mesh It marks treatment effect information and the first adjustment processing is carried out to face in image to be processed;Show the first adjustment treated image.
As it can be seen that can be determined based on the face characteristic of face in the image to be processed identified in the embodiment of the present invention The corresponding target treatment effect information of face different faces feature, i.e. target adjustment parameter are handled based on the identified target Effect information is adjusted processing to face in image to be processed, to realize the face characteristic based on the face in image, provides Corresponding target adjustment parameter is adjusted the face in image, to adjust out the aesthetic facial image for more meeting user, Improve the usage experience of user.In turn, it may be implemented to provide different U.S. face effects for the image comprising different faces feature Fruit, face include the user of different faces feature, adjust out the aesthetic facial image for more meeting different user, so that image Adjustment effect more preferably, promotes the likability of user.Certainly, it implements any of the products of the present invention or method must be not necessarily required to simultaneously Reach all the above advantage.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of image processing method provided by the embodiment of the present invention;
Fig. 2 is a kind of another flow diagram of image processing method provided by the embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of image processing apparatus provided by the embodiment of the present invention;
Fig. 4 is the structural schematic diagram of a kind of electronic equipment provided by the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of image processing method, device and electronic equipments, are more met with realizing to adjust out The aesthetic facial image of user improves the usage experience of user so that the adjustment effect of image is more preferably.
As shown in Figure 1, may include steps of the embodiment of the invention provides a kind of image processing method:
S101: image to be processed is obtained;
It is understood that image processing method provided by the embodiment of the present invention, can be applied to any type of electricity In sub- equipment, details are not described herein.In one implementation, which can be server, or user is whole End, this is all possible.The functional software for realizing image processing method provided by the embodiment of the present invention, can be with special visitor The form of family end software exists, and can also exist in the form of the plug-in unit of existing application software.
A kind of situation, when above-mentioned electronic equipment is user terminal, it includes people that electronic equipment can be obtained by camera The image of face, and by the image comprising face, i.e. facial image, the image to be processed as the embodiment of the present invention.It is another Situation, when above-mentioned electronic equipment is server, what electronic equipment can obtain connected user terminal transmission includes face Image, and the image to be processed by the facial image, as the embodiment of the present invention.Another situation, electronic equipment can obtain Any image comprising face that must be locally stored, and by the facial image, as the image to be processed of the embodiment of the present invention, this All it is possible.Wherein, above-mentioned image to be processed can be the image of arbitrary format, and the embodiment of the present invention is not to above-mentioned wait locate The Format Type of reason image is defined.
In one implementation, the service of hommization is provided in order to preferably be embodied as user, improves user experience, it can To be provided with the functional switch of a key U.S. face function, when functional switch is turned on, which is activated, can just hold Image processing flow provided by the row embodiment of the present invention.It, can when functional switch is closed, which is closed Not execute image processing flow provided by the embodiment of the present invention.
S102: identifying the face characteristic of face in image to be processed, as face characteristic to be processed;
In the embodiment of the present invention, after electronic equipment obtains above-mentioned image to be processed, preset recognition of face can be based on Algorithm identifies face region from image to be processed, in turn, from the face region in image to be processed, identification The face characteristic of face out, as face characteristic to be processed.Alternatively, can be based on face institute in the image to be processed obtained Location information in region determines face region from image to be processed;And then where the face in image to be processed The face characteristic of face is identified in region, as face characteristic to be processed.
Wherein, above-mentioned preset face recognition algorithms can be any recognizer that face can be identified from image. All recognizers that face can be identified from image, can be applied in the embodiment of the present invention, to realize to from Face region is identified in reason image, and details are not described herein.
In a kind of implementation, face characteristic may include: the features of skin colors of face, the eye feature of face, including eye The corresponding eye feature point of eyeball, bridge of the nose feature in the shape of face feature of face, including facial contour feature point and/or face, including Bridge of the nose characteristic point etc..Wherein, which can characterize the size degree of eyes in face;Facial contour feature point can be with Symbolize the shape of face of face;Bridge of the nose characteristic point can symbolize the high and low level of the bridge of the nose of face.
In a kind of situation, the features of skin colors of face can pass through the pixel that the pixel of face is characterized in image to be processed Value, such as RGB (Red Green Blue, RGB) value mark can also pass through the pixel of characterization face in image to be processed The brightness value of point, such as the Y-component value mark in the image of yuv format, this is all possible.
It may include one or more faces in above-mentioned image to be processed in the embodiment of the present invention.A kind of situation, works as packet When containing multiple faces, face respectively region can be identified from image to be processed, and then from each people identified The respective region of face, identifies the respective face characteristic of each face;For each face identified, it is based on the face Face characteristic, execute subsequent image processing flow.
S103: it is based on face characteristic to be processed and preset corresponding relationship, determines target treatment effect information;
Wherein, preset corresponding relationship includes: the corresponding relationship of different faces feature Yu treatment effect information;
In a kind of implementation, electronic equipment is local or the External memory equipment that is connected, can store preset Corresponding relationship, wherein preset corresponding relationship may include: the corresponding relationship of different faces feature Yu treatment effect information.When After electronic equipment identifies the face characteristic to be processed of face, from preset corresponding relationship, determine special with face to be processed Matched treatment effect information is levied, as target treatment effect information.A kind of situation, when above-mentioned electronic equipment is user terminal When, above-mentioned preset corresponding relationship can store the server connected in the user terminal, when electronic equipment is identified wait locate In reason image after the face characteristic to be processed of face, above-mentioned preset corresponding relationship can be obtained from the server connected, And execute S103.
In another implementation, External memory equipment electronic equipment local or connected, can store pre- If corresponding relationship, wherein preset corresponding relationship may include: different faces feature it is corresponding with default face classification close System, and the corresponding relationship of different default face classifications and treatment effect information.When electronic equipment identifies the to be processed of face After face characteristic, from different face characteristics and the corresponding relationship of default face classification, determine belonging to face characteristic to be processed Default face classification, as target face classification;And then it is closed from the default face classification of difference is corresponding with treatment effect information In system, the corresponding treatment effect information of target face classification is determined, as target treatment effect information.Specifically, preset Corresponding relationship may include: the corresponding relationship of different faces feature Yu default face classification, and different default face classification with The corresponding relationship for the treatment of effect information;S103 may include:
Corresponding relationship and face characteristic to be processed based on different faces feature Yu default face classification, determine to be processed Face classification is preset in image belonging to face, as target face classification;
Based on the corresponding relationship and target face classification of different default face classifications and treatment effect information, target is determined The corresponding treatment effect information of face classification, as target treatment effect information.
In one implementation, face characteristic to be processed may include features of skin colors to be processed;Preset corresponding relationship It may include: the corresponding relationship of different features of skin colors Yu treatment effect information;
S103 may include: corresponding relationship and the colour of skin to be processed based on different features of skin colors and treatment effect information Feature determines target treatment effect information.
In oneainstance, preset corresponding relationship can directly include: different features of skin colors and treatment effect information Corresponding relationship, wherein the corresponding relationship of different features of skin colors and treatment effect information can be one-to-one corresponding relationship, It can be many-to-one corresponding relationship, this is all possible.For example: when above-mentioned features of skin colors to be processed passes through figure to be processed The pixel value mark of the pixel of face, and the corresponding relationship of above-mentioned features of skin colors to be processed and treatment effect information are characterized as in When being many-to-one corresponding relationship, above-mentioned features of skin colors to be processed and the corresponding relationship for the treatment of effect information can be identified are as follows: as Plain value A~B alignment processing effect information 1, pixel value C~D alignment processing effect information 2, pixel value E~F alignment processing effect Information 3, etc..
Another situation can determine default face classification belonging to face by the features of skin colors of face.Wherein, Above-mentioned default face classification may include: white colour of skin face, black colour of skin face and yellow colour of skin face.Wherein, preset correspondence Relationship may include: the corresponding relationship of different features of skin colors Yu default face classification, the default face classification of difference and treatment effect The corresponding relationship of information.The corresponding relationship of different features of skin colors and default face classification, can be one-to-one corresponding relationship, It can be many-to-one corresponding relationship;The corresponding relationship of difference default face classification and treatment effect information, can be one-to-one Corresponding relationship, this is all possible.For example: above-mentioned features of skin colors to be processed and the corresponding relationship for the treatment of effect information can With mark are as follows: pixel value A~B corresponds to white colour of skin face, white colour of skin face alignment processing effect information 1;Pixel value C~D is corresponding Black colour of skin face, black colour of skin face alignment processing effect information 2;The corresponding yellow colour of skin face of pixel value E~F, yellow colour of skin face pair Answer treatment effect information 3.
Wherein, A, B, C, D, E and F can characterize any pixel value in the embodiment of the present invention, between relationship can be A < B, C < D, and E < F.
In another implementation, face characteristic can include but is not limited to: eyes in the features of skin colors of face, face Feature, the shape of face feature of face, the bridge of the nose feature of face.When face characteristic to be processed includes features of skin colors to be processed, to be processed When eye feature, shape of face feature to be processed and bridge of the nose feature to be processed, above-mentioned preset corresponding relationship may include: the different colours of skin Feature, different eyes size degree, different shapes of face and different bridge of the nose high and low levels, the corresponding relationship with treatment effect information. Wherein, eye feature point can characterize the size degree of eyes in face in eye feature;Facial contour feature in shape of face feature Point can symbolize the shape of face of face;Bridge of the nose characteristic point can symbolize the high and low level of the bridge of the nose of face in bridge of the nose feature.
S104: the first adjustment processing is carried out to face in image to be processed based on target treatment effect information;
Above-mentioned target treatment effect information can wrap containing specific target adjustment parameter, and electronic equipment can be based on the mesh Adjusting parameter is marked, processing is adjusted to face in image to be processed, as the first adjustment processing.
In oneainstance, above-mentioned target treatment effect information can include but is not limited to: the eye feature of face is corresponding Target adjustment parameter, i.e. the corresponding target adjustment parameter of eye feature point of face;The corresponding target of the features of skin colors of face Adjusting parameter;The corresponding target adjustment parameter of the shape of face feature of face (the target adjustment parameter of thin face degree), the i.e. people of face The corresponding target adjustment parameter of face contour feature point;And/or the corresponding target adjustment parameter of bridge of the nose feature of face, i.e. face The corresponding target adjustment parameter of bridge of the nose characteristic point.Wherein, above-mentioned target adjustment parameter may include it is required adjust to target value, Such as adjust to Z value, at this point, electronic equipment can directly adjust the corresponding original value of corresponding face characteristic to the target Value;It also may include the adjusted value of required adjustment, such as increase X value, or reduce Y value etc., at this point, electronic equipment can be direct On the basis of corresponding face characteristic corresponding original value, adjusted value is increased or decreased;It also may include adjustment ratio, example Such as: percent P is tuned up/turn down, at this point, electronic equipment can be directly in the base of the corresponding original value of corresponding face characteristic Percent P times of the original value on plinth, is tuned up/turned down, that is, is adjusted to (1 subtract percent P) of original value times.Wherein, on Stating the corresponding original value of face characteristic is the value before being adjusted.
In one implementation, electronic equipment can identify face from the face region of image to be processed Each position and determine each position region, such as: eyes region, nose region, mouth location Domain, eyebrow region, cheek region, face profile region and forehead region etc..In turn, electronic equipment can To be based on the corresponding target adjustment parameter of eye feature and eyes region, the is carried out to eye feature, that is, eye feature point One adjustment processing;Based on the corresponding target adjustment parameter of shape of face feature and facial contour region, to shape of face feature, that is, people Face contour feature point carries out the first adjustment processing;Based on the corresponding target adjustment parameter of features of skin colors, cheek region, nose Region and forehead region etc. carry out the first adjustment processing to the features of skin colors of face;It is corresponding based on bridge of the nose feature Target adjustment parameter and nose region, the first adjustment processing is carried out to the bridge of the nose feature of face.
Wherein, the embodiment of the present invention can be identified from image using current any relevant face recognition algorithms Each position of face and each position region, the embodiment of the present invention are defined not to this.The embodiment of the present invention In can use any feasible adjustment algorithm, processing is adjusted to face, the embodiment of the present invention not to adjustment algorithm into Row limits.
In oneainstance, in order to enable the result adjusted is more humane, more meet the aesthetic of user, the above-mentioned colour of skin is special Levy the corresponding target colour of skin adjustment subparameter of features of skin colors for the different parts that corresponding target adjustment parameter may include face. Such as: it may include the corresponding target colour of skin adjustment subparameter of forehead, the corresponding target colour of skin adjustment subparameter of cheek and nose Corresponding target colour of skin adjustment subparameter of son etc..And then electronic equipment can be based on the corresponding target colour of skin adjustment of different parts Parameter carries out the first adjustment processing to the colour of skin at each position of face in image to be processed.
In another implementation, in order to preferably provide image processing services for user, that improves user uses body It tests, the first adjustment processing can also be carried out for the colour of skin for the exposed skin of user being identified in image, such as right The colour of skin of the neck of user carries out the first adjustment processing to the colour of skin of arm, with the colour of skin of the face after Matching and modification.
S105: the first adjustment treated image is shown.
In the embodiment of the present invention, after carrying out the first adjustment processing to the face in image to be processed, it can will include adjustment Treated that image shows user for the image to be processed of treated face, i.e. the first adjustment so that user obtain this The image of one adjustment processing.
Wherein, when above-mentioned electronic equipment is user terminal, electronic equipment can show packet directly by the display screen of itself Containing the first adjustment treated image.When above-mentioned electronic equipment is server, after electronic equipment can be handled the first adjustment Image be sent to corresponding terminal treated so that corresponding terminal by display screen, shows the first adjustment image.Its In, above-mentioned corresponding terminal are as follows: the image to be processed for including face is sent to the terminal of the electronic equipment (server).
In the embodiment of the present invention, face can be determined based on the face characteristic of face in the image to be processed identified The corresponding target treatment effect information of different faces feature, i.e. target adjustment parameter, based on the identified target treatment effect Information is adjusted processing to face in image to be processed, to realize the face characteristic based on the face in image, provides corresponding Target adjustment parameter the face in image is adjusted, to adjust out the aesthetic facial image for more meeting user, improve The usage experience of user.In turn, it may be implemented to provide different U.S. face effects, face for the image comprising different faces feature Portion includes the user of different faces feature, the aesthetic facial image for more meeting different user is adjusted out, so that the adjustment of image Better effect promotes the likability of user.
In one implementation, the aesthetic of different user has differences, it is understood that there may be some users think a key U.S. face Image afterwards does not meet the aesthetic of oneself still, and habit is manually adjusted image, and the face in image is adjusted to symbol Close the aesthetic of oneself.In order to improve the adjustment of the face in the image after an above-mentioned dissatisfied key U.S. face, and it is accustomed to oneself manually To the usage experience for the user that image is adjusted.Electronic equipment can be accustomed to according to the adjusting of user, and it is corresponding to generate the user History adjustment information;In turn, electronic equipment can be to be directed to the use it is first determined whether existing after obtaining image to be processed The history adjustment information for face at family continues to execute the face for identifying face in image to be processed in the absence of judgement Feature, the step of as face characteristic to be processed.Specifically, as shown in Fig. 2, the method may include following steps:
S201: image to be processed is obtained;
S202: judging whether there is the history adjustment information for face, when there is no the history tune for face for judgement When whole information, S203 is executed;
Wherein, history adjustment information are as follows: the information being adjusted according to user for the face in history image;
S203: identifying the face characteristic of face in image to be processed, as face characteristic to be processed;
S204: it is based on face characteristic to be processed and preset corresponding relationship, determines target treatment effect information;
Wherein, which includes: the corresponding relationship of different faces feature Yu treatment effect information;
S205: the first adjustment processing is carried out to face in image to be processed based on target treatment effect information;
S206: the first adjustment treated image is shown.
Wherein, S201 is identical as S101 shown in Fig. 1, and S203 is identical as S202 shown in Fig. 1, in S204 and Fig. 1 Shown in S103 it is identical, S205 is identical as S104 shown in Fig. 1, and S206 is identical as S105 shown in Fig. 1.
In another implementation, described as shown in Fig. 2, when judgement has the history adjustment information for being directed to face Method can also include:
S207: second adjustment processing is carried out to face in image to be processed based on history adjustment information.
S208: second adjustment treated image is shown.
A kind of situation, when above-mentioned electronic equipment is user terminal, electronic equipment can be by user to face in image The information of adjusting is stored in local, and then generates history adjustment information to the information of the adjusting of face in image based on user. It is understood that being adjusted when above-mentioned electronic equipment is user terminal to the face in electronic equipment image obtained The user of section generally can be the holder of the electronic equipment.The is carried out to the face in image based on the history adjustment information Two adjustment processing, result adjusted generally more meet the holder of the electronic equipment, i.e., more meet the aesthetic of the user.Specifically , it, can be it is first determined whether there is the history adjustment information for being directed to face, in turn after electronic equipment obtains image to be processed Based on judging result, Adjusted Option is determined.Such as: when the history adjustment information for face is not present in judgement, continue to execute S203;When judgement has the history adjustment information for being directed to face, S206 is executed.In turn, it is treated based on history adjustment information It handles after face carries out second adjustment processing in image, further includes showing second adjustment treated image.Wherein, above-mentioned exhibition Show second adjustment treated the displaying process of image with show the first adjustment treated that the displaying process of image is identical, herein It repeats no more.
Another situation, when above-mentioned electronic equipment is user terminal, electronic equipment can be by user to face in image The information manually adjusted, be stored in the server that it is connected, subsequent, server can be based on the mark of the electronic equipment The mark of knowledge or user, store above-mentioned user to the information of the adjusting of face in image, and then based on user to people in image The information of the adjusting of face generates history adjustment information.Wherein, the mark of above-mentioned electronic equipment can be electronic equipment model, Sequence number etc. can be with the information of unique identification electronic equipment.The mark of above-mentioned user may is that user logs in and realize that the present invention is real When applying the functional software of image processing method provided by example, used account, pet name etc. can be with the bodies of unique identification user The information of part.
Another situation, when above-mentioned electronic equipment is server, which can be based on upload image to be processed User terminal mark or user mark, store above-mentioned user to the information of the adjusting of face in image, and then be based on User generates history adjustment information to the information of the adjusting of face in image.Wherein, the mark of above-mentioned user terminal can be use Model, sequence number of family terminal etc. can be with the information of unique identification user terminal.The mark of above-mentioned user may is that user logs in When realizing the functional software of image processing method provided by the embodiment of the present invention, used account, pet name etc. can be unique The information of the identity of identity user.
Wherein, it is above-mentioned based on user to the information of the adjusting of face in image, generate the process of history adjustment information, can be with Be: when determining that adjusting frequency of the user for same face characteristic is more than predeterminated frequency, and the face characteristic is corresponding all Fluctuation range between adjustment parameter within a preset range when, calculate being averaged for the corresponding all adjustment parameters of the face characteristic Value, using the average value as the history adjustment information for being directed to the face characteristic.
It is understood that above-mentioned history adjustment information may include specific specified adjusting parameter, electronic equipment can be with Adjusting parameter is specified based on this, second adjustment processing is carried out to face in image to be processed.
In oneainstance, above-mentioned history adjustment information can include but is not limited to: the eye feature of face, i.e. eyes are special The corresponding specified adjusting parameter of sign point;The corresponding specified adjusting parameter of the colour of skin of face, i.e. features of skin colors;The shape of face of face is special Sign, the i.e. corresponding specified adjusting parameter (the specified adjusting parameter of thin face degree) of facial contour feature point;And/or the nose of face The corresponding specified adjusting parameter of beam feature, i.e. bridge of the nose characteristic point.Wherein, above-mentioned specified adjusting parameter may include it is required adjust to Target value, such as adjust to Z value;It also may include the adjusted value of required adjustment, such as increase X value, or reduce Y value etc.; It also may include adjustment ratio, such as: tune up/turn down percent P etc..
In the embodiment of the present invention, based on the history adjustment information for being directed to face, face second in image to be processed is carried out Adjustment processing realizes the face adjustment of individuation, i.e., for each user, adjusts to the image comprising face of the user Whole processing, i.e., U.S. face processing, improves user experience, and preferably increase the likability of user.
In one implementation, the aesthetic of different user has differences, after may having user to a key U.S. face The adjustment effect of image, i.e., based on target treatment effect information in image to be processed face carry out the first adjustment treated figure The adjustment effect of picture, it is dissatisfied.In order to preferably provide image processing services for user, meet user demand.It is obtained in user After the first adjustment treated image, allow user that can carry out hand to the face in the first adjustment treated image It is dynamic to adjust.I.e. the embodiment of the present invention can provide the function of manually adjusting image for user.Specifically, being adjusted in above-mentioned displaying first After the step of whole treated image, the method can also include:
User is received for the regulating command of face in the first adjustment treated image;
Processing is adjusted to face in the first adjustment treated image based on regulating command;
Information is adjusted for treated face record is adjusted.
Wherein, the face characteristic pair of the face characteristic and required adjusting that are adjusted needed for above-mentioned regulating command can carry The adjustment parameter answered.Above-mentioned face characteristic can include but is not limited to the eye feature of face, features of skin colors, shape of face feature and/ Or bridge of the nose feature.Electronic equipment can the corresponding adjustment parameter of face characteristic based on required adjusting, to the first adjustment processing after Image in face processing is adjusted, such as: when the face characteristic of required adjusting includes eye feature, at the first adjustment Processing is adjusted in the eye feature point of the eyes of face in image after reason;When the face characteristic of required adjusting includes colour of skin spy When sign, processing is adjusted to the colour of skin of face in the first adjustment treated image;When the face characteristic of required adjusting includes When shape of face feature, processing is adjusted to the facial contour feature point of face in the first adjustment treated image;When required tune The face characteristic of section includes the bridge of the nose feature of face, is adjusted to the bridge of the nose characteristic point of face in the first adjustment treated image Section processing.
In oneainstance, user may repeatedly be adjusted face in the first adjustment treated image, i.e. electronics Equipment can repeatedly receive user for the regulating command of face in same the first adjustment treated image.In order to save storage Space, electronic equipment can after detecting user to the preservation instruction of the image comprising the face that is conditioned that treated, for The adjusting treated face record adjusts information.The adjusting information are as follows: at least based on figure to be processed when detecting that preservation instructs The corresponding adjusted result of face as in, identified information.
Wherein, which may include the corresponding characteristic value of each face characteristic.Such as: the adjusting information can wrap Include: the size of the eyes of the face after adjusting can be identified, i.e. the eye in upper eyelid by the distance between upper eyelid and palpebra inferior The distance between the eye feature of eyeball characteristic point and palpebra inferior point mark;The value of the colour of skin of face after adjusting can pass through picture Element value or brightness value mark;The value of the profile of face after adjusting can pass through the facial contour feature point of left side of the face and the right side The distance between facial contour feature point of side face mark;The height of the bridge of the nose of face after adjusting can pass through bridge of the nose feature The distance between point and the wing of nose characteristic point mark.Alternatively, the adjusting information may include: relative to be adjusted (i.e. carry out first Adjustment processing or second adjustment processing) before image to be processed in face, the corresponding value being adjusted of the eyes of the face, should The corresponding value being adjusted of the colour of skin of face, the corresponding value being adjusted of the shape of face of the face, the corresponding quilt of the bridge of the nose of the face The value of adjustment, etc..
In one implementation, when be directed to a certain user, detect the user often to the first adjustment treated figure Face is manually adjusted as in, and each when being adjusted to the value of a certain face characteristic in a certain range, can be determined The face after manually adjusting more meets the aesthetic of the user.At this point, meeting user to adjust out automatically for user Aesthetic facial image can when the result when the number of user manually adjusted and manually adjusted is met certain condition To be directed to the user, the history adjustment information for being directed to face is generated.And then the image comprising face of the user ought be obtained again When, face in image is adjusted using the history adjustment information.It is specific: the people that above-mentioned regulating command is adjusted needed for carrying Face feature and the corresponding adjustment parameter of the face characteristic of required adjusting;
It is above-mentioned for the step of treated face record adjusts information is adjusted after, the method can also include:
Whether the adjusting frequency for judging that user is directed to same face characteristic is more than predeterminated frequency, and judges the face characteristic pair Within a preset range whether the fluctuation range between all adjustment parameters answered;
It is more than predeterminated frequency when judging result is the adjusting frequency that user is directed to same face characteristic, and judging result is to be somebody's turn to do Fluctuation range between the corresponding all adjustment parameters of face characteristic within a preset range when, based on for adjusting treated people The adjusting information of face record, generates the history adjustment information for being directed to face, wherein history adjustment information are as follows: for being obtained Face in image carries out the information of second adjustment processing.
A kind of implementation, electronic equipment are more than predeterminated frequency, and the people in the adjusting frequency for determining a certain face characteristic Fluctuation range between the corresponding all adjustment parameters of face feature within a preset range, that is, is directed to the face characteristic, and generation is directed to The history adjustment information of face.Such as: when electronic equipment determine the eye feature of face adjusting frequency be more than predeterminated frequency, and Fluctuation range between the corresponding all adjustment parameters of the eye feature of face is within a preset range, special for the eyes of face Sign generates the history adjustment information for being directed to face.It wherein, include to the specified of the eye feature of face in the history adjustment information Adjusting parameter.And specified adjusting parameter are as follows: based on determined by the corresponding all adjustment parameters of eye feature of face.It is a kind of Situation, by the average value of the corresponding all adjustings of the eye feature of the face, as specified adjusting parameter.For for others Face characteristic generates the process of the history adjustment information for face, and ibid, details are not described herein.
Another implementation, electronic equipment are more than predeterminated frequency in the adjusting frequency for determining all people's face feature, and Fluctuation range between all corresponding all adjustment parameters of face characteristic within a preset range, generates going through for face History adjustment information.Wherein, which includes the specified adjusting parameter to all face characteristics.
In one implementation, same user is aesthetic to be also likely to be present difference in different times, when determining that there are needles To the user for face history adjustment information when, can first determine whether time existing for the history adjustment information whether mistake It is long, when determination is not too long, second adjustment processing is carried out to face based on history adjustment information.A kind of situation is based on described Before the step of history adjustment information carries out second adjustment processing to face in image to be processed, the method can also include:
Obtain generation time and the current time of history adjustment information;
Judge current time and generates whether the difference of time is more than preset duration;
When judgement is less than preset duration, executes the history adjustment information that is based on and face in image to be processed is carried out The step of second adjustment processing.
Wherein, above-mentioned preset duration can by electronic equipment default setting, can also by user according to oneself habit into Row setting, this is all can be with.Above-mentioned current time can be with are as follows: electronic equipment obtains time when image to be processed.
By the generation time of above-mentioned current time and history adjustment information, depositing for history adjustment information can be determined Depositing for history adjustment information can be determined when the difference of current time and generation time is less than preset duration in the time It is not too long in the time.When current time and the difference of generation time are more than preset duration, history adjustment information can be determined There are overlong times.
In one implementation, when determine history adjustment information there are when overlong time, can no longer be directly based upon History adjustment information carries out second adjustment processing to face in image to be processed.Specifically, the method can also include:
When judgement is more than preset duration, output inquiry prompt information, to ask the user whether to utilize history adjustment information Processing is adjusted to face;
Selection result based on user is adjusted processing to face in image to be processed.
Wherein, when user's selection result, which is, is, can continue based on history adjustment information to face in image to be processed Carry out second adjustment processing.When user's selection result is no, the face for identifying face in image to be processed can be continued to execute Feature, the step of as face characteristic to be processed.
In another implementation, electronic equipment can be with every execution once based on history adjustment information in image to be processed Face carries out the step of second adjustment processing, counts and adds one.It executes based on history adjustment information in electronic equipment to figure to be processed Before face carries out the step of second adjustment processing as in, judge count whether reach preset times, reaches pre- when judgement counts If when number, determine history adjustment information there are overlong times.At this point it is possible to inquiry prompt information be exported, to inquire user Whether using history adjustment information processing is adjusted to face;And then the selection result based on user, in image to be processed Face is adjusted processing.
In one implementation, face characteristic to be processed includes: features of skin colors to be processed, the corresponding eye to be processed of eyes Eyeball characteristic point and/or facial contour feature to be processed point;
The target treatment effect information may include the corresponding target adjustment parameter of target features of skin colors, objective eye feature Corresponding target adjustment parameter and/or the corresponding target adjustment parameter of target shape of face feature;
It described the step of the first adjustment processing is carried out to face in image to be processed based on target treatment effect information, can be with Include:
When target treatment effect information target adjustment parameter corresponding comprising target features of skin colors, utilize the target colour of skin special Corresponding target adjustment parameter is levied, colour of skin adjustment processing is carried out to features of skin colors to be processed;
When target treatment effect information target adjustment parameter corresponding comprising objective eye feature, objective eye spy is utilized Corresponding target adjustment parameter is levied, eyes adjustment processing is carried out to eye feature point to be processed;
When target treatment effect information target adjustment parameter corresponding comprising target shape of face feature, utilize target shape of face special Corresponding target adjustment parameter is levied, shape of face adjustment processing is carried out to facial contour feature point to be processed.
In the embodiment of the present invention, electronic equipment can identify face from the face region of image to be processed Each position region is simultaneously determined in each position, so electronic equipment can one be directed to different parts, based on target processing effect Fruit information carries out the first adjustment processing to the different parts of face.In one implementation, when target treatment effect packet It may include people in the corresponding target adjustment parameter of target features of skin colors when the corresponding target adjustment parameter of features of skin colors containing target Adjusted needed for each position of face to pixel value or brightness value.Correspondingly, in the first adjustment treatment process: electronic equipment will be to The pixel value or brightness value for handling each position of face in image, adjust the people into target features of skin colors corresponding adjusting parameter Adjusted needed for each position of face to pixel value or brightness value.
In one implementation, when target treatment effect information includes the corresponding target adjustment parameter of objective eye feature When, for example: the corresponding target adjustment parameter of objective eye feature may include the adjustment ratio to eyes, such as by eyes tune It is big by 5 percent.The corresponding eye feature point to be processed of eyes can be eyes (including the upper eyelid of face in image to be processed And palpebra inferior) marginal point.At this point, size and above-mentioned adjustment of the electronic equipment based on eyes in face in image to be processed Ratio, adjusted needed for calculating to eyes size, and determine to adjust needed for eye feature point to be processed to position, into And by eye feature point to be processed adjust to it is required adjust to position, realize and the eyes of eye feature point to be processed adjusted Processing.
In one implementation, when target treatment effect information includes the corresponding target adjustment parameter of target shape of face feature When, the corresponding target adjustment parameter of target shape of face feature may include the adjustment ratio to face, such as by the thin percentage of face tune Ten.Size and above-mentioned adjustment ratio of the electronic equipment based on face in image to be processed, calculate needed for adjust to people The size of face, in turn, determine to adjust needed for facial contour feature point to be processed to position, in turn, by face wheel to be processed Wide characteristic point adjust to it is required adjust to position, realize and the shape of face adjustment of facial contour feature point to be processed handled.
In one implementation, when target treatment effect information includes the corresponding target adjustment ginseng of target features of skin colors At least two in number, the corresponding target adjustment parameter of objective eye feature and the corresponding target adjustment parameter of target shape of face feature It, can be simultaneously based on the corresponding target adjustment ginseng of at least two class face characteristics when the corresponding target adjustment parameter of class face characteristic Number carries out the first adjustment processing to face in image to be processed, is also possible to sequence based on each at least two class face characteristics The corresponding target adjustment parameter of face characteristic carries out the first adjustment processing to face in image to be processed, this is all possible.
Corresponding to above method embodiment, the embodiment of the invention provides a kind of image processing apparatus, as shown in figure 3, institute Stating device may include:
First obtains module 310, for obtaining image to be processed;
Identification module 320, for identification in the image to be processed face face characteristic, it is special as face to be processed Sign;
Determining module 330 determines that target is handled for being based on the face characteristic to be processed and preset corresponding relationship Effect information, wherein the preset corresponding relationship includes: the corresponding relationship of different faces feature Yu treatment effect information;
The first adjustment module 340, for being based on the target treatment effect information to people described in the image to be processed Face carries out the first adjustment processing;
First display module 350, treated for showing the first adjustment image.
In the embodiment of the present invention, face can be determined based on the face characteristic of face in the image to be processed identified The corresponding target treatment effect information of different faces feature, i.e. target adjustment parameter, based on the identified target treatment effect Information is adjusted processing to face in image to be processed, to realize the face characteristic based on the face in image, provides corresponding Target adjustment parameter the face in image is adjusted, to adjust out the aesthetic facial image for more meeting user, improve The usage experience of user.In turn, it may be implemented to provide different U.S. face effects, face for the image comprising different faces feature Portion includes the user of different faces feature, the aesthetic facial image for more meeting different user is adjusted out, so that the adjustment of image Better effect promotes the likability of user.
In one implementation, the face characteristic to be processed includes features of skin colors to be processed;The preset correspondence Relationship includes: the corresponding relationship of different features of skin colors Yu treatment effect information;
The determining module 330, is specifically used for
Corresponding relationship and the features of skin colors to be processed based on different features of skin colors Yu treatment effect information, determine mesh Mark treatment effect information.
In one implementation, the preset corresponding relationship includes: different faces feature and default face classification Corresponding relationship, and the corresponding relationship of different default face classifications and treatment effect information;
The determining module 330, is specifically used for
Corresponding relationship and the face characteristic to be processed based on different faces feature Yu default face classification, determine institute It states and presets face classification belonging to face described in image to be processed, as target face classification;
Based on corresponding relationship and the target face classification of different default face classifications and treatment effect information, determine The corresponding treatment effect information of the target face classification, as target treatment effect information.
In one implementation, described device further include:
First judgment module, for the face characteristic of the face in the identification image to be processed, as to be processed Before face characteristic, the history adjustment information for face is judged whether there is, wherein the history adjustment information are as follows: according to The information that user is adjusted for the face in history image;
When the history adjustment information for face is not present in judgement, the identification module 320 is triggered.
In one implementation, described device further include:
Second judgment module, for the face characteristic of the face in the identification image to be processed, as to be processed Before face characteristic, the history adjustment information for face is judged whether there is, wherein the history adjustment information are as follows: according to The information that user is adjusted for the face in history image;
Second adjustment module, for being adjusted based on the history when judgement has the history adjustment information for being directed to face Information carries out second adjustment processing to face described in the image to be processed;
Second display module, treated for showing second adjustment image.
In one implementation, described device further include:
Receiving module, for after the displayings the first adjustment treated image, receiving user for the first adjustment The regulating command of treated face described in image;
Third adjusts module, for being carried out based on the regulating command to the first adjustment treated face described in image Adjusting processing;
Logging modle, for adjusting information for treated the face record that adjusts.
In one implementation, the people of the face characteristic and required adjustment that are adjusted needed for the adjustment instruction carries Face feature is corresponding to manually adjust parameter;
Described device further include:
Third judgment module, for adjusting judgement after treated face record adjusts information for described described Whether user is more than predeterminated frequency for the adjusting frequency of same face characteristic, and judges the corresponding all adjustings of the face characteristic Within a preset range whether the fluctuation range between parameter;
Generation module, for being more than predeterminated frequency when judging result is the adjusting frequency that user is directed to same face characteristic, And fluctuation range of the judging result between the corresponding all adjustment parameters of the face characteristic within a preset range when, based on being directed to The adjusting information for adjusting treated face record, generates the history adjustment information for being directed to face, wherein the history tune Whole information are as follows: for carrying out the information of second adjustment processing to the face in obtained image.
In one implementation, described device further include:
Second obtains module, for being based on the history adjustment information to face described in the image to be processed described Before carrying out second adjustment processing, generation time and the current time of the history adjustment information are obtained;
4th judgment module, when for judging whether the current time and the difference for generating the time are more than default It is long;
When judgement is less than the preset duration, the second adjustment module is triggered.
In one implementation, described device further include:
Third obtains module, for being based on the history adjustment information to face described in the image to be processed described Before carrying out second adjustment processing, generation time and the current time of the history adjustment information are obtained;
5th judgment module, when for judging whether the current time and the difference for generating the time are more than default It is long;
Output module, for when judgement is more than the preset duration, prompt information to be inquired in output, to ask the user whether Second adjustment processing is carried out to face described in the image to be processed using the history adjustment information;
4th adjustment module, for the selection result based on the user, to face described in the image to be processed into Row adjustment processing.
In one implementation, the face characteristic to be processed includes: that features of skin colors to be processed, eyes are corresponding wait locate Manage eye feature point and/or facial contour feature to be processed point;
The target treatment effect information includes the corresponding target adjustment parameter of target features of skin colors, objective eye feature pair The corresponding target adjustment parameter of target adjustment parameter and/or target shape of face feature answered;
The first adjustment module 340, is specifically used for
When target treatment effect information target adjustment parameter corresponding comprising the target features of skin colors, institute is utilized The corresponding target adjustment parameter of target features of skin colors is stated, colour of skin adjustment processing is carried out to the features of skin colors to be processed;
When target treatment effect information target adjustment parameter corresponding comprising the objective eye feature, institute is utilized The corresponding target adjustment parameter of objective eye feature is stated, eyes adjustment processing is carried out to the eye feature point to be processed;
When target treatment effect information target adjustment parameter corresponding comprising the target shape of face feature, institute is utilized The corresponding target adjustment parameter of target shape of face feature is stated, shape of face adjustment processing is carried out to the facial contour feature point to be processed.
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of electronic equipment, as shown in figure 4, including Processor 410, communication interface 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420, storage Device 430 completes mutual communication by communication bus 440,
Memory 430, for storing computer program;
Processor 410 when for executing the computer program stored on memory 430, realizes institute of the embodiment of the present invention Any of the above-described image processing method step provided, may include step:
Obtain image to be processed;
The face characteristic for identifying face in the image to be processed, as face characteristic to be processed;
Based on the face characteristic to be processed and preset corresponding relationship, target treatment effect information is determined, wherein institute State the corresponding relationship that preset corresponding relationship includes: different faces feature Yu treatment effect information;
The first adjustment processing is carried out to face described in the image to be processed based on the target treatment effect information;
Show the first adjustment treated image.
In the embodiment of the present invention, face can be determined based on the face characteristic of face in the image to be processed identified The corresponding target treatment effect information of different faces feature, i.e. target adjustment parameter, based on the identified target treatment effect Information is adjusted processing to face in image to be processed, to realize the face characteristic based on the face in image, provides corresponding Target adjustment parameter the face in image is adjusted, to adjust out the aesthetic facial image for more meeting user, improve The usage experience of user.In turn, it may be implemented to provide different U.S. face effects, face for the image comprising different faces feature Portion includes the user of different faces feature, the aesthetic facial image for more meeting different user is adjusted out, so that the adjustment of image Better effect promotes the likability of user.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
It is described the embodiment of the invention also provides a kind of computer readable storage medium corresponding to above method embodiment It is stored with computer program in computer readable storage medium, realizes that the present invention is real when the computer program is executed by processor Any of the above-described image processing method step provided by example is applied, may include step:
Obtain image to be processed;
The face characteristic for identifying face in the image to be processed, as face characteristic to be processed;
Based on the face characteristic to be processed and preset corresponding relationship, target treatment effect information is determined, wherein institute State the corresponding relationship that preset corresponding relationship includes: different faces feature Yu treatment effect information;
The first adjustment processing is carried out to face described in the image to be processed based on the target treatment effect information;
Show the first adjustment treated image.
In the embodiment of the present invention, face can be determined based on the face characteristic of face in the image to be processed identified The corresponding target treatment effect information of different faces feature, i.e. target adjustment parameter, based on the identified target treatment effect Information is adjusted processing to face in image to be processed, to realize the face characteristic based on the face in image, provides corresponding Target adjustment parameter the face in image is adjusted, to adjust out the aesthetic facial image for more meeting user, improve The usage experience of user.In turn, it may be implemented to provide different U.S. face effects, face for the image comprising different faces feature Portion includes the user of different faces feature, the aesthetic facial image for more meeting different user is adjusted out, so that the adjustment of image Better effect promotes the likability of user.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of image processing method, which is characterized in that the described method includes:
Obtain image to be processed;
The face characteristic for identifying face in the image to be processed, as face characteristic to be processed;
Based on the face characteristic to be processed and preset corresponding relationship, target treatment effect information is determined, wherein described pre- If corresponding relationship include: different faces feature Yu treatment effect information corresponding relationship;
The first adjustment processing is carried out to face described in the image to be processed based on the target treatment effect information;
Show the first adjustment treated image.
2. the method according to claim 1, wherein the face characteristic to be processed includes that the colour of skin to be processed is special Sign;The preset corresponding relationship includes: the corresponding relationship of different features of skin colors Yu treatment effect information;
It is described to be based on face characteristic to be processed and preset corresponding relationship, the step of determining target treatment effect information, comprising:
Corresponding relationship and the features of skin colors to be processed based on different features of skin colors Yu treatment effect information, determine at target Manage effect information.
3. the method according to claim 1, wherein the preset corresponding relationship includes: different faces feature With the corresponding relationship of default face classification, and the corresponding relationship of different default face classifications and treatment effect information;
It is described to be based on the face characteristic to be processed and preset corresponding relationship, the step of determining target treatment effect information, Include:
Corresponding relationship and the face characteristic to be processed based on different faces feature Yu default face classification, determine it is described to It handles and presets face classification belonging to face described in image, as target face classification;
Corresponding relationships and the target face classification based on different default face classifications and treatment effect information, determine described in The corresponding treatment effect information of target face classification, as target treatment effect information.
4. the method according to claim 1, wherein in the face for identifying face in the image to be processed Feature, the step of as face characteristic to be processed before, the method also includes:
Judge whether there is the history adjustment information for face, wherein the history adjustment information are as follows: be directed to and go through according to user The information that face in history image is adjusted;
When there is no the people for when the history adjustment information for being directed to face, executing face in the identification image to be processed for judgement Face feature, the step of as face characteristic to be processed.
5. the method according to claim 1, wherein in the face for identifying face in the image to be processed Feature, the step of as face characteristic to be processed before, the method also includes:
Judge whether there is the history adjustment information for face, wherein the history adjustment information are as follows: be directed to and go through according to user The information that face in history image is adjusted;
When judgement has the history adjustment information for being directed to face, based on the history adjustment information in the image to be processed The face carries out second adjustment processing;
Show second adjustment treated image.
6. the method according to claim 1, wherein the displaying the first adjustment treated the image the step of Later, the method also includes:
User is received for the regulating command of the first adjustment treated face described in image;
Based on the regulating command, to the first adjustment, treated that processing is adjusted in face described in image;
Information is adjusted for treated the face record that adjusts.
7. according to the method described in claim 6, it is characterized in that, the regulating command carry needed for adjust face characteristic, And the corresponding adjustment parameter of face characteristic of required adjusting;
It is described for it is described adjust the step of treated face record adjusts information after, the method also includes:
Whether the adjusting frequency for judging that user is directed to same face characteristic is more than predeterminated frequency, and judges that the face characteristic is corresponding Within a preset range whether the fluctuation range between all adjustment parameters;
It is more than predeterminated frequency when judging result is the adjusting frequency that user is directed to same face characteristic, and judging result is the face Fluctuation range between the corresponding all adjustment parameters of feature within a preset range when, based on adjusting treated people for described The adjusting information of face record, generates the history adjustment information for being directed to face, wherein the history adjustment information are as follows: for institute Obtain the information that the face in image carries out second adjustment processing.
8. according to the method described in claim 5, it is characterized in that, being based on the history adjustment information to described wait locate described Before managing the step of face described in image carries out second adjustment processing, the method also includes:
Obtain generation time and the current time of the history adjustment information;
Judge whether the current time and the difference for generating the time are more than preset duration;
When judgement is less than the preset duration, execution is described to be based on the history adjustment information in the image to be processed The face carries out the step of second adjustment processing.
9. according to the method described in claim 5, it is characterized in that, being based on the history adjustment information to described wait locate described Before managing the step of face described in image carries out second adjustment processing, the method also includes:
Obtain generation time and the current time of the history adjustment information;
Judge whether the current time and the difference for generating the time are more than preset duration;
When judgement is more than the preset duration, output inquiry prompt information, to ask the user whether to adjust using the history Information carries out second adjustment processing to face described in the image to be processed;
Based on the selection result of the user, processing is adjusted to face described in the image to be processed.
10. -9 described in any item methods according to claim 1, which is characterized in that the face characteristic to be processed includes: wait locate Manage features of skin colors, the corresponding eye feature point to be processed of eyes and/or facial contour feature to be processed point;
The target treatment effect information is corresponding comprising the corresponding target adjustment parameter of target features of skin colors, objective eye feature Target adjustment parameter and/or the corresponding target adjustment parameter of target shape of face feature;
It is described that the first adjustment processing is carried out to face described in the image to be processed based on the target treatment effect information Step, comprising:
When target treatment effect information target adjustment parameter corresponding comprising the target features of skin colors, the mesh is utilized The corresponding target adjustment parameter of features of skin colors is marked, colour of skin adjustment processing is carried out to the features of skin colors to be processed;
When target treatment effect information target adjustment parameter corresponding comprising the objective eye feature, the mesh is utilized The corresponding target adjustment parameter of eye feature is marked, eyes adjustment processing is carried out to the eye feature point to be processed;
When target treatment effect information target adjustment parameter corresponding comprising the target shape of face feature, the mesh is utilized The corresponding target adjustment parameter of shape of face feature is marked, shape of face adjustment processing is carried out to the facial contour feature point to be processed.
CN201810966031.0A 2018-08-23 2018-08-23 Image processing method and device and electronic equipment Active CN109255761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810966031.0A CN109255761B (en) 2018-08-23 2018-08-23 Image processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810966031.0A CN109255761B (en) 2018-08-23 2018-08-23 Image processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109255761A true CN109255761A (en) 2019-01-22
CN109255761B CN109255761B (en) 2021-06-25

Family

ID=65050356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810966031.0A Active CN109255761B (en) 2018-08-23 2018-08-23 Image processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109255761B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872273A (en) * 2019-02-26 2019-06-11 上海上湖信息技术有限公司 A kind of image processing method and device
CN110211063A (en) * 2019-05-20 2019-09-06 腾讯科技(深圳)有限公司 A kind of image processing method, device, electronic equipment and system
CN112785488A (en) * 2019-11-11 2021-05-11 宇龙计算机通信科技(深圳)有限公司 Image processing method and device, storage medium and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104966267A (en) * 2015-07-02 2015-10-07 广东欧珀移动通信有限公司 User image beautifying method and apparatus
CN105096241A (en) * 2015-07-28 2015-11-25 努比亚技术有限公司 Face image beautifying device and method
CN105530435A (en) * 2016-02-01 2016-04-27 深圳市金立通信设备有限公司 Shooting method and mobile terminal
US20170249768A1 (en) * 2015-02-26 2017-08-31 A9.Com, Inc. Image manipulation for electronic display

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170249768A1 (en) * 2015-02-26 2017-08-31 A9.Com, Inc. Image manipulation for electronic display
CN104966267A (en) * 2015-07-02 2015-10-07 广东欧珀移动通信有限公司 User image beautifying method and apparatus
CN105096241A (en) * 2015-07-28 2015-11-25 努比亚技术有限公司 Face image beautifying device and method
CN105530435A (en) * 2016-02-01 2016-04-27 深圳市金立通信设备有限公司 Shooting method and mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872273A (en) * 2019-02-26 2019-06-11 上海上湖信息技术有限公司 A kind of image processing method and device
CN110211063A (en) * 2019-05-20 2019-09-06 腾讯科技(深圳)有限公司 A kind of image processing method, device, electronic equipment and system
CN112785488A (en) * 2019-11-11 2021-05-11 宇龙计算机通信科技(深圳)有限公司 Image processing method and device, storage medium and terminal

Also Published As

Publication number Publication date
CN109255761B (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN109951627B (en) Image processing method, image processing device, storage medium and electronic equipment
Celik et al. Automatic image equalization and contrast enhancement using Gaussian mixture modeling
CN109255761A (en) Image processing method and device and electronic equipment
KR20210149848A (en) Skin quality detection method, skin quality classification method, skin quality detection device, electronic device and storage medium
CN107145833A (en) The determination method and apparatus of human face region
CN108875546A (en) Face auth method, system and storage medium
CN108062400A (en) Examination cosmetic method, smart mirror and storage medium based on smart mirror
CN106778627B (en) Detect the method, apparatus and mobile terminal of face face value
US20190340420A1 (en) Technologies for efficient identity recognition based on skin features
CN104834382B (en) Application program for mobile terminal response system and method
CN111008971B (en) Aesthetic quality evaluation method of group photo image and real-time shooting guidance system
CN108154121A (en) Cosmetic auxiliary method, smart mirror and storage medium based on smart mirror
WO2021098486A1 (en) Garment color recognition processing method, device, apparatus, and storage medium
CN107742510A (en) A kind of eyeshield intensity adjustment method, apparatus, electric terminal and storage medium
CN106941588B (en) Data processing method and electronic equipment
CN110443769A (en) Image processing method, image processing apparatus and terminal device
CN110007758A (en) A kind of control method and terminal of terminal
CN108804972A (en) Lip gloss guidance device and method
CN109522775A (en) Face character detection method, device and electronic equipment
CN110866139A (en) Cosmetic treatment method, device and equipment
CN108537026A (en) application control method, device and server
CN110826372A (en) Method and device for detecting human face characteristic points
CN109167914A (en) A kind of image processing method and mobile terminal
CN110287787A (en) Image-recognizing method, device and computer readable storage medium
CN109584177A (en) Face method of modifying, device, electronic equipment and computer readable storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201123

Address after: Room 115, area C, 1 / F, building 8, yard 1, yaojiayuan South Road, Chaoyang District, Beijing 100123

Applicant after: Beijing LEMI Technology Co.,Ltd.

Address before: 100123 Building 8, Huitong Times Square, 1 South Road, Chaoyang District, Beijing.

Applicant before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230831

Address after: 3870A, 3rd Floor, Building 4, Courtyard 49, Badachu Road, Shijingshan District, Beijing, 100144

Patentee after: Beijing Jupiter Technology Co.,Ltd.

Address before: 100123 room 115, area C, 1st floor, building 8, yard 1, yaojiayuan South Road, Chaoyang District, Beijing

Patentee before: Beijing LEMI Technology Co.,Ltd.