Movatterモバイル変換


[0]ホーム

URL:


CN107967667A - Sketch generation method and device, terminal equipment and storage medium - Google Patents

Sketch generation method and device, terminal equipment and storage medium
Download PDF

Info

Publication number
CN107967667A
CN107967667ACN201711392583.7ACN201711392583ACN107967667ACN 107967667 ACN107967667 ACN 107967667ACN 201711392583 ACN201711392583 ACN 201711392583ACN 107967667 ACN107967667 ACN 107967667A
Authority
CN
China
Prior art keywords
face
sketch
facial image
picture
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711392583.7A
Other languages
Chinese (zh)
Inventor
陈岩
刘耀勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711392583.7ApriorityCriticalpatent/CN107967667A/en
Publication of CN107967667ApublicationCriticalpatent/CN107967667A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The embodiment of the application discloses a sketch generation method, a sketch generation device, terminal equipment and a storage medium. The method comprises the following steps: acquiring the five sense organs characteristics of the face image; labeling the face image according to the features of the five sense organs; and inputting the marked face image into a sketch generation model to obtain a sketch picture corresponding to the face image, wherein the sketch generation model comprises a model generated based on a machine learning algorithm. According to the sketch generation method provided by the embodiment of the application, the face image subjected to facial feature labeling is input into the sketch generation model, the sketch picture corresponding to the face image is obtained, and the convenience of sketch generation can be improved.

Description

Generation method, device, terminal device and the storage medium of sketch
Technical field
The invention relates to technical field of image processing, more particularly to a kind of generation method of sketch, device, terminalEquipment and storage medium.
Background technology
With the development of mobile communication technology and the popularization of intelligent terminal, intelligent mobile terminal has become people's lifeOne of indispensable instrument in work.Terminal device not only has the function of to take pictures, and also has the function of picture processing, for example,Picture is converted into the picture of the different-styles such as cartoon, ink and wash.
Sketch is one kind of image stylization, and real-life sketch is showed mainly using pencil as instrument with linesPersonage or the art form of landscape.If user want obtain sketch picture, it is necessary to specialty personage manually complete, not only intoThis height, and it is extremely inconvenient.
The content of the invention
The embodiment of the present application provides a kind of generation method of sketch, device, terminal device and storage medium, can improve elementTrace designs the convenience that piece generates.
In a first aspect, the embodiment of the present application provides a kind of generation method of sketch, this method includes:
Obtain the face feature of facial image;
The facial image is labeled according to the face feature;
Facial image after mark is inputted to sketch and generates model, obtains the corresponding sketch picture of the facial image,Wherein, the sketch generation model includes the model based on machine learning algorithm generation.
Second aspect, the embodiment of the present application additionally provide a kind of generating means of sketch, which includes:
Face feature acquisition module, for obtaining the face feature of facial image;
Facial image labeling module, for being labeled according to the face feature to the facial image;
Sketch picture acquisition module, generating model for inputting the facial image after mark to sketch, obtaining the peopleThe corresponding sketch picture of face image, wherein, the sketch generation model includes the model based on machine learning algorithm generation.
The third aspect, the embodiment of the present application additionally provide a kind of terminal device, including:Processor, memory and storageOn a memory and the computer program that can run on a processor, the processor are realized such as when performing the computer programGeneration method described in first aspect.
Fourth aspect, the embodiment of the present application additionally provide a kind of storage medium, are stored thereon with computer program, the programGeneration method as described in relation to the first aspect is realized when being executed by processor.
The embodiment of the present application, first obtain facial image face feature, then according to face feature to facial image intoRower is noted, and is finally inputted the facial image after mark to sketch and is generated model, obtains the corresponding sketch picture of facial image, itsIn, sketch generation model includes the model based on machine learning algorithm generation.The generation side of sketch provided by the embodiments of the present applicationMethod, the facial image for carrying out face feature mark is inputted to sketch and generates model, obtains the corresponding sketch picture of facial image,The convenience of generation sketch can be improved.
Brief description of the drawings
Fig. 1 is a kind of flow chart of the generation method of sketch in the embodiment of the present application;
Fig. 2 is the flow chart of the generation method of another sketch in the embodiment of the present application;
Fig. 3 is the flow chart of the generation method of another sketch in the embodiment of the present application;
Fig. 4 is a kind of structure diagram of the generating means of sketch in the embodiment of the present application;
Fig. 5 is a kind of structure diagram of terminal device in the embodiment of the present application;
Fig. 6 is the structure diagram of another terminal device in the embodiment of the present application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouchedThe specific embodiment stated is used only for explaining the application, rather than the restriction to the application.It also should be noted that in order to justIt illustrate only part relevant with the application rather than entire infrastructure in description, attached drawing.
Fig. 1 is a kind of flow chart of the generation method of sketch provided by the embodiments of the present application, the present embodiment be applicable to byNormal picture generates the situation of corresponding sketch picture, and this method can be performed by the generating means of sketch, which can collectIn the terminal devices such as Cheng Yuru mobile phones, tablet computer.As shown in Figure 1, this method comprises the following steps.
Step 110, the face feature of facial image is obtained.
Wherein, facial image can be the picture for including face, can be the photo that user utilizes terminal device shooting, orPhoto sent by other-end equipment that person is received by social software etc..Face can refer to each position of face, includingEar, eyebrow, eyes, nose and lip, face feature can include face position and face attribute, can under this application sceneTo only focus on the eyebrow in face, eyes, nose and lip, to the feature of ear without considering.Face position can be fiveOfficial is located at the position of face, and face attribute can characterize the type of face.Wherein, the type of face can be with existing classification sideFormula is determined.For example, eyebrow type can include crescent or half moon eyebrow, synophrys, triangle eyebrow, arched eyebrows, slanted eyebrows and straight eyebrows slanting upwards and outwards etc.;Ocular form canWith including peach blossom eye, auspicious phoenix eyes, sleep phoenix eyes, willow leaf eye, apricot eye, fox eye, copper bell eye, longan, slim eye and fawn eye etc.;NoseType can include ultra-narrow nose, narrow nose, middle nose, platyrrhiny and super platyrrhiny etc.;Lip can be included under thin slim, roomy type, the corners of the mouthIncline type, cola type, doll type and cupid's type etc..
In the present embodiment, obtaining the mode of face position can be, using the location algorithm in correlation technique to face intoRow positioning, location algorithm can be supervision descending method (Supervised Descent Method, SDM), active list item model(Active Appearance Model, AAM) algorithm or active shape model (Active Shape Model, ASM) algorithmDeng.The mode for obtaining face attribute can be that the face of facial image are compared with standard form respectively, obtain faceAttribute, wherein, standard form can be the face graphic template made according to the different type of each face.Exemplary, it is rightAfter facial image analysis, the face attribute of acquisition is arched eyebrows, fawn eye, middle nose and cola type lip.
Specifically, it can carry out recognition of face to facial image first to obtain the process of the face feature of facial image,Extraction includes the region of face, and then the face in face are positioned using the location algorithm in correlation technique, obtains fiveOfficial position, subsequently respectively analyzes the type of face, or the face in facial image and standard form are comparedIt is right, face attribute is obtained, so as to obtain the face feature of facial image.
Step 120, facial image is labeled according to face feature.
Wherein, facial image being labeled can mark face feature in facial image.To facial image intoThe mode of the mark of row face position can be, using the location algorithm of correlation technique to the facial feature localization of facial image after, rootThe mark of face position is completed according to the characteristic point of positioning result.The mode being labeled to the face attribute of facial image can be withIt is to be added to the type of each face in corresponding face in the form of a flag respectively.
Step 130, the facial image after mark is inputted to sketch and generates model, obtain the corresponding sketch map of facial imagePiece.
Wherein, sketch generation model includes the model based on machine learning algorithm generation, can be carried out based on sample setThe model that constantly training obtains.Sketch generation model can be the model that normal picture can be converted into sketch picture.SketchPicture can a kind of show the stylized picture of personage by the way of lines.
In the present embodiment, the facial image for carrying out face feature mark is inputted after generating model to sketch, sketch generationModel carries out facial image sketch processing, the corresponding sketch map of generation facial image according to the face feature of facial imagePiece.Under this application scene, the process that facial image is converted into sketch picture by sketch generation model can be, according to default faceEach face region is converted into sketch image by order successively, exemplary, it is assumed that default face order is eyebrow, eyeEyeball, nose and lip, after the facial image input sketch generation model after mark, are first handled eyebrow region, rootBe converted into corresponding sketch image according to eyebrow type, then eyes region handled, subsequently to nose region atReason, is finally handled lip region, so as to obtain the corresponding sketch picture of whole facial image;Alternatively, according to fiveOfficial's feature carries out sketch conversion to each face region at the same time.
Optionally, facial image can be converted into the element of different-style information by the sketch generation model in the present embodimentTrace designs piece.Wherein, stylized information can include common style, cartoon style and distorting mirror style etc..People after by markBefore face image input sketch generation model, user can select stylized information, sketch generation model according to the hobby of oneselfFacial image is converted into by corresponding stylized sketch picture according to the stylized information that user selects.The advantage of doing so is thatThe diversity of sketch picture can be improved.
The technical solution of the present embodiment, obtains the face feature of facial image, then according to face feature to face firstImage is labeled, and is finally inputted the facial image after mark to sketch and is generated model, obtains the corresponding sketch of facial imagePicture, wherein, sketch generation model includes the model based on machine learning algorithm generation.Sketch provided by the embodiments of the present applicationGeneration method, the facial image for carrying out face feature mark is inputted to sketch and generates model, obtains the corresponding element of facial imageTrace designs piece, can improve the convenience of generation sketch.
Optionally, face feature includes face position and face attribute.Facial image is labeled according to face feature,It can also be implemented by following manner:
First, facial image is split according to face position, obtains multiple face subgraphs.
Wherein, the criterion split to facial image can be face sub-picture pack after segmentation containing at least one completeFace.For example, facial image can be divided into respectively comprising six left eye, right eye, Zuo Mei, right eyebrow, nose, lip facesSubgraph, or be divided into respectively comprising three left eyebrow left eye, right eyebrow right eye, nose lip people's face images etc..The present embodimentIn, on the basis of ensureing that everyone face image includes at least one complete face, facial image can be carried out anyThe segmentation of form, does not limit herein.
Specifically, after the face position of facial image is obtained, facial image is split according to face position, is obtainedMultiple face subgraphs.
Then, at least one target person face image is chosen from multiple face subgraphs.
After segmentation is carried out to facial image and obtains multiple face subgraphs, at least one is chosen from multiple face subgraphsA target person face image.Exemplary, it is assumed that facial image is divided into respectively comprising left eye, right eye, Zuo Mei, right eyebrow, noseSon, after six people's face images of lip, choose comprising nose, lip the two face subgraphs as target person face image.
In the present embodiment, choosing the mode of at least one target person face image can be, be chosen according to preset rules, orPerson is chosen according to the manual operation of user.Wherein preset rules can choose the face subgraph or bag for including eyesFace subgraph containing eyebrow or the face subgraph comprising nose etc..It can be that user works as according to itself that user chooses manuallyPreceding operation is intended to be chosen, such as user currently wants that by the regioinvertions comprising lip be sketch image, then can selectFace subgraph comprising lip.
Finally, the target person face image of selection is labeled according to face attribute.
In this implementation, can be according to the mode that face attribute is labeled the target person face image of selection, according toThe attribute for the face that target person face image includes is labeled target person face image.Exemplary, it is assumed that facial imageFace attribute be arched eyebrows, fawn eye, middle nose and cola type lip, if the target person face image chosen is includes left eyeFace subgraph, then be labeled target person face image according to the attribute of eyes, and addition is labeled as " fawn eye ".
Optionally, the facial image after mark is inputted to sketch and generates model, obtain the corresponding sketch map of facial imagePiece, can be implemented by following manner:Target person face image after mark is inputted to sketch and generates model, obtains target faceThe corresponding first sketch picture of subgraph.
In the present embodiment, the target person face image for carrying out face attribute labeling is inputted after generating model to sketch, elementThe attribute for the face that generation model is included according to target person face image is retouched, sketch processing is carried out to target person face image,Generate the corresponding first sketch picture of target person face image.Exemplary, it is assumed that included in the target person face image of selectionTwo face of nose and lip, after the nose of target person face image and lip are carried out face attribute labeling, input sketch lifeInto model, nose and the corresponding sketch image of lip are obtained.
Optionally, after the corresponding first sketch picture of target person face image is obtained, following steps are further included:ByOne sketch picture is merged with remaining face subgraph, obtains the second sketch picture.
Wherein, remaining face subgraph is the face subgraph in addition to target person face image in multiple face subgraphsPicture.Specifically, after the corresponding first sketch picture of target subgraph is obtained, by the first sketch picture and remaining face subgraphMerge, obtain the second sketch picture.Exemplary, it is assumed that facial image is divided into respectively comprising left eyebrow left eye, right eyebrowThree right eye, nose lip people's face images, wherein the face subgraph comprising right eyebrow right eye is chosen for target person face figureAs being converted into sketch picture, by the sketch picture and remaining two people's face image, that is, the face subgraph of left eyebrow left eye is includedPicture and face subgraph comprising nose lip merge, and obtain the second sketch image, and the second sketch picture of acquisition only hasRight eyebrow right eye region is converted into sketch, remaining region also keeps the style of original image.
The technical solution of the present embodiment, first splits facial image according to face position, obtains multiple people's facesImage, then chooses at least one target person face image from multiple face subgraphs, subsequently according to face attribute to choosingThe target person face image taken is labeled, and is subsequently inputted the target person face image after mark to sketch and is generated model,The corresponding first sketch picture of target person face image is obtained, is finally closed the first sketch picture and remaining face subgraphAnd obtain the second sketch picture.The subregion of facial image is converted into sketch image, improves the diversity of sketch conversion.
Optionally, facial image is split according to face position, obtains multiple face subgraphs, following sides can be passed throughFormula is implemented:Split according to the connectivity pair facial image of face position region, obtain multiple face subgraphs.
Wherein, the connectedness in region can be the continuity of face region.Such as:Region where left eyebrow and left eyeThere are connectedness, and connectedness is then not present due to being separated by nose in left eyebrow and right eye region.In the present embodiment, according toThe connectivity pair target facial image segmentation of face position region, is to ensure that face are not divided.
Optionally, at least one target person face image is chosen from multiple face subgraphs, can be real by following mannerApply:At least one target person face image is chosen from multiple face subgraphs, target person face image includes at least oneFace.
Split according to the connectivity pair facial image of face position region, after obtaining multiple face subgraphs, from moreAt least one target person face image is chosen in personal face image so that target person face image includes at least one fiveOfficial.
The technical solution of the present embodiment, splits according to the connectivity pair target facial image of face position region, obtainsTo multiple face subgraphs, at least one target person face image, target person face image are chosen from multiple face subgraphsInclude at least one face.So that including at least one complete face in face subgraph, face can be prevented to be divided,So as to improve the accuracy of sketch conversion.
Fig. 2 is the flow chart of the generation method of another sketch provided by the embodiments of the present application.As shown in Fig. 2, this methodInclude the following steps.
Step 210, human face sketch pictures are obtained, and obtain the face feature of human face sketch pictures.
Wherein, human face sketch pictures can be searched for from network data base and obtained.Obtain human face sketch picturesThe process of face feature can be that recognition of face is carried out to every pictures in human face sketch pictures, utilizes correlation techniqueIn location algorithm the face in face are positioned, obtain face position, then the type of face is analyzed, obtainFace attribute, so as to obtain the face feature of human face sketch pictures.
Step 220, the gray value of each pixel in human face sketch pictures is obtained.
In the present embodiment, obtaining the mode of the gray value of pixel can be, be read using existing picture handling implementAfter human face sketch picture, the corresponding gray matrix of sketch picture is obtained, the ash of each pixel is achieved with from gray matrixAngle value.
Step 230, human face sketch pictures are labeled according to the face feature of human face sketch pictures and gray value,Obtain human face sketch picture sample collection.
In the present embodiment, human face sketch pictures are labeled according to the face feature of human face sketch pictures modeSimilar with the above-mentioned mode being labeled according to face feature to facial image, details are not described herein again.According to gray value to faceThe mode that sketch pictures are labeled can be, by the corresponding gray value mark of each pixel in corresponding pixel.
Step 240, according to human face sketch picture sample collection, preset model is instructed based on setting machine learning algorithmPractice, obtain sketch generation model.
Specifically, after human face sketch picture sample collection is obtained, setting machine is based on using human face sketch picture sample collectionLearning algorithm is trained preset model, preset model is constantly learnt face feature and the pass before pixel gray valueSystem, makes preset model have the ability that facial image is converted into sketch picture, so as to obtain sketch generation model.
Step 250, the face feature of facial image is obtained.
Step 260, facial image is labeled according to face feature.
Step 270, the facial image after mark is inputted to sketch and generates model, obtain the corresponding sketch map of facial imagePiece.
Optionally, human face sketch pictures are obtained, can also be implemented by following manner:According to default style information to peopleFace sketch pictures are classified, and obtain human face sketch picture subset.
Wherein, default style information includes cartoon style, common style and distorting mirror style etc..Specifically, obtainingAfter substantial amounts of human face sketch picture, the style of every sketch picture is analyzed, is then classified to affiliated default styleChange in the corresponding human face sketch picture subset of information.Exemplary, it is assumed that include 1000 sketches in human face sketch picturesPicture, wherein 300 belong to cartoon style, 400 belong to common style, and 300 belong to distorting mirror style.
Optionally, human face sketch pictures are labeled according to the face feature of human face sketch pictures and gray value,Human face sketch picture sample collection is obtained, can be implemented by following manner:According to the face feature and gray scale of human face sketch picturesValue is labeled human face sketch picture subset, obtains human face sketch picture sample subset.
In the present embodiment, human face sketch picture subset is carried out according to the face feature of human face sketch pictures and gray valueThe mode of mark, is labeled human face sketch pictures with above-mentioned face feature and gray value according to human face sketch picturesMode it is similar, details are not described herein again.After obtaining human face sketch picture sample subset, according to human face sketch picture sample subset,Preset model is trained based on setting machine learning algorithm, obtains sketch generation model so that sketch generation model hasGenerate the ability of different-style sketch picture.The advantage of doing so is that the diversity of generation sketch picture can be improved.
The technical solution of the present embodiment, according to the face feature of human face sketch pictures and gray value to human face sketch pictureCollection is labeled, and obtains human face sketch picture sample collection, according to human face sketch picture sample collection, based on setting machine learning algorithmPreset model is trained, obtains sketch generation model.Utilize the human face sketch picture sample set pair preset model after markIt is trained, the accuracy of sketch generation model generation sketch picture can be improved.
Optionally, the facial image after mark is inputted to sketch and generates model, obtain the corresponding element of the facial imageTrace designs piece, can be implemented by following manner:Selection target default style information, the facial image after mark is inputted to sketchModel is generated, obtains the corresponding target default style sketch picture of facial image.
Specifically, after user can select the target default style information of the sketch picture of desired generation, after markFacial image input to sketch generate model, so as to obtain the corresponding target default style sketch map of target facial imagePiece.Exemplary, user selects distorting mirror style, the facial image after mark is inputted after generating model to sketch, so that it may obtainObtain distorting mirror style sketch picture.The advantage of doing so is that user can like selection sketch style according to oneself, so as to carryHigh user experience.
Fig. 3 is the flow chart of the generation method of another sketch provided by the embodiments of the present application.As to above-described embodimentBe explained further, as shown in figure 3, this method comprises the following steps.
Step 301, classified according to default style information to human face sketch pictures, obtain human face sketch pictureCollection.
Step 302, human face sketch picture subset is carried out according to the face feature of human face sketch picture subset and gray valueMark, obtains human face sketch picture sample subset.
Step 303, according to this collection of human face sketch picture appearance, preset model is instructed based on setting machine learning algorithmPractice, obtain sketch generation model.
Step 304, the face feature of facial image is obtained, face feature includes face position and face attribute.
Step 305, facial image is split according to face position, obtains multiple face subgraphs.
Step 306, at least one target person face image is chosen from multiple face subgraphs.
Step 307, the target person face image of selection is labeled according to face attribute.
Step 308, selection target default style information.
Step 309, the target person face image after mark is inputted to sketch and generates model, obtain target person face imageCorresponding stylized first sketch picture.
Step 310, the first sketch picture of stylization is merged with remaining face subgraph, obtains the second sketch mapPiece.
The technical solution of the present embodiment, the target person face image after mark is inputted to sketch and generates model, obtains meshThe corresponding stylized first sketch picture of face subgraph is marked, stylized first sketch picture is carried out with remaining face subgraphMerge, obtain the second sketch picture.Not only the subregion of face picture can be made to be converted into sketch image, part can also be madeSketch image is shown with default style, improves the diversity of sketch picture.
Fig. 4 is a kind of structure diagram of the generating means of sketch provided by the embodiments of the present application.As shown in figure 4, the dressPut including:Face feature acquisition module 410, facial image labeling module 420 and sketch picture acquisition module 430.
Face feature acquisition module 410, for obtaining the face feature of facial image;
Facial image labeling module 420, for being labeled according to the face feature to the facial image;
Sketch picture acquisition module 430, generates model, described in acquisition for inputting the facial image after mark to sketchThe corresponding sketch picture of facial image, wherein, the sketch generation model includes the model based on machine learning algorithm generation.
Optionally, face feature includes face position and face attribute, and facial image labeling module 420, is additionally operable to:
Facial image is split according to face position, obtains multiple face subgraphs;
At least one target person face image is chosen from multiple face subgraphs;
The target person face image of selection is labeled according to face attribute;
Correspondingly, sketch picture acquisition module 430, is additionally operable to:
Target person face image after mark is inputted to sketch and generates model, obtains target person face image corresponding theOne sketch picture.
Optionally, sketch picture acquisition module 430, is additionally operable to:
First sketch picture and remaining face subgraph are merged, obtain the second sketch picture, remaining face subgraphAs being the face subgraph in multiple face subgraphs in addition to target person face image.
Optionally, facial image labeling module 420, is additionally operable to:
Split according to the connectivity pair facial image of face position region, obtain multiple face subgraphs;
At least one target person face image is chosen from multiple face subgraphs, target person face image is included at leastOne face.
Optionally, including:
Human face sketch pictures acquisition module, for obtaining human face sketch pictures, and obtains human face sketch picturesFace feature;
Gray value acquisition module, for obtaining the gray value of each pixel in human face sketch pictures;
Human face sketch picture sample collection acquisition module, for the face feature and gray value pair according to human face sketch picturesHuman face sketch pictures are labeled, and obtain human face sketch picture sample collection;
Sketch generates model acquisition module, for according to human face sketch picture sample collection, based on setting machine learning algorithmPreset model is trained, obtains sketch generation model.
Optionally, human face sketch pictures acquisition module, is additionally operable to:
Classified according to default style information to human face sketch pictures, obtain human face sketch picture subset;Wherein,Default style information includes cartoon style, common style and distorting mirror style;
Correspondingly, human face sketch picture sample collection acquisition module, is additionally operable to:
Human face sketch picture subset is labeled according to the face feature of human face sketch pictures and gray value, obtains peopleFace sketch picture sample set.
Optionally, sketch picture acquisition module 430, is additionally operable to:
Selection target default style information;
Facial image after mark is inputted to sketch and generates model, obtains the corresponding target default style of facial imageSketch picture.
Above device can perform the method that the foregoing all embodiments of the application are provided, and it is corresponding to possess the execution above methodFunction module and beneficial effect.Not ins and outs of detailed description in the present embodiment, reference can be made to the foregoing all implementations of the applicationThe method that example is provided.
Fig. 5 is a kind of structure diagram of terminal device provided by the embodiments of the present application.As shown in figure 5, terminal device 500Including memory 501 and processor 502, wherein processor 502 is used to perform following steps:
Obtain the face feature of facial image;
The facial image is labeled according to the face feature;
Facial image after mark is inputted to sketch and generates model, obtains the corresponding sketch picture of the facial image,Wherein, the sketch generation model includes the model based on machine learning algorithm generation.
Fig. 6 is the structure diagram of another terminal device provided by the embodiments of the present application.As shown in fig. 6, the terminal canWith including:Housing (not shown), memory 601, central processing unit (Central Processing Unit, CPU) 602(also known as processor, hereinafter referred to as CPU), the computer program that is stored on memory 601 and can be run on processor 602,Circuit board (not shown) and power circuit (not shown).The circuit board is placed in the space that the housing surroundsPortion;The CPU602 and the memory 601 are arranged on the circuit board;The power circuit, for for the terminalEach circuit or device power supply;The memory 601, for storing executable program code;The CPU602 is by readingThe executable program code that is stored in memory 601 is stated to run program corresponding with the executable program code.
The terminal further includes:Peripheral Interface 603, RF (Radio Frequency, radio frequency) circuit 605, voicefrequency circuit606th, loudspeaker 611, power management chip 608, input/output (I/O) subsystem 609, touch-screen 612, other input/controlsEquipment 610 and outside port 604, these components are communicated by one or more communication bus or signal wire 607.
It should be understood that graphic terminal 600 is only an example of terminal, and terminal device 600 can be withWith than more or less components shown in figure, two or more components can be combined, or can haveDifferent component configurations.Various parts shown in figure can be including one or more signal processings and/or special integratedHardware, software including circuit are realized in the combination of hardware and software.
Below just it is provided in this embodiment for sketch generation terminal device be described in detail, the terminal device withExemplified by smart mobile phone.
Memory 601, the memory 601 can be accessed by CPU602, Peripheral Interface 603 etc., and the memory 601 canIncluding high-speed random access memory, can also include nonvolatile memory, such as one or more disk memories,Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU602 and deposited by Peripheral Interface 603, the Peripheral Interface 603Reservoir 601.
I/O subsystems 609, the I/O subsystems 609 can be by the input/output peripherals in equipment, such as touch-screen 612With other input/control devicess 610, Peripheral Interface 603 is connected to.I/O subsystems 609 can include 6091 He of display controllerFor controlling one or more input controllers 6092 of other input/control devicess 610.Wherein, one or more input controlsDevice 6092 processed receives electric signal from other input/control devicess 610 or sends electric signal to other input/control devicess 610,Other input/control devicess 610 can include physical button (pressing button, rocker buttons etc.), dial, slide switch, behaviourVertical pole, click on roller.What deserves to be explained is input controller 6092 can with it is following any one be connected:Keyboard, infrared port,The instruction equipment of USB interface and such as mouse.
Wherein, according to touch-screen operation principle and transmission information medium classification, touch-screen 612 can be resistance-type,Capacitor induction type, infrared-type or surface acoustic wave type.Classify according to mounting means, touch-screen 612 can be:It is external hanging type, built-inFormula or monoblock type.Classify according to technical principle, touch-screen 612 can be:Vector pressure sensing technology touch-screen, resistive technologies are touchedTouch screen, capacitance technology touch-screen, infrared technology touch-screen or surface acoustic wave technique touch-screen.
Touch-screen 612, the touch-screen 612 are the input interface and output interface between user terminal and user, canUser is shown to depending on output, visual output can include figure, text, icon, video etc..Optionally, touch-screen 612 is by userThe electric signal (electric signal of such as contact surface) triggered on touch screen curtain, is sent to processor 602.
Display controller 6091 in I/O subsystems 609 receives electric signal from touch-screen 612 or is sent out to touch-screen 612Electric signals.Touch-screen 612 detects the contact on touch-screen, and the contact detected is converted to and shown by display controller 6091The interaction of user interface object on touch-screen 612, that is, realize human-computer interaction, the user interface being shown on touch-screen 612Icon that object can be the icon of running game, be networked to corresponding network etc..What deserves to be explained is equipment can also include lightMouse, light mouse is not show the touch sensitive surface visually exported, or the extension of the touch sensitive surface formed by touch-screen.
RF circuits 605, are mainly used for establishing the communication of intelligent sound box and wireless network (i.e. network side), realize intelligent sound boxData receiver and transmission with wireless network.Such as transmitting-receiving short message, Email etc..
Voicefrequency circuit 606, is mainly used for receiving voice data from Peripheral Interface 603, which is converted to telecommunicationsNumber, and the electric signal is sent to loudspeaker 611.
Loudspeaker 611, for the voice signal for receiving intelligent sound box from wireless network by RF circuits 605, is reduced toSound simultaneously plays the sound to user.
Power management chip 608, the hardware for being connected by CPU602, I/O subsystem and Peripheral Interface are poweredAnd power management.
In the present embodiment, central processing unit 602 is used for:
Obtain the face feature of facial image;
The facial image is labeled according to the face feature;
Facial image after mark is inputted to sketch and generates model, obtains the corresponding sketch picture of the facial image,Wherein, the sketch generation model includes the model based on machine learning algorithm generation.
Further, the face feature includes face position and face attribute, it is described according to the face feature to instituteFacial image is stated to be labeled, including:
The facial image is split according to the face position, obtains multiple face subgraphs;
At least one target person face image is chosen from the multiple face subgraph;
The target person face image of selection is labeled according to the face attribute;
Model is generated correspondingly, inputting the facial image after mark to sketch, obtains the corresponding element of the facial imageTrace designs piece, including:
Target person face image after mark is inputted to sketch and generates model, the target person face image is obtained and corresponds toThe first sketch picture.
Further, after the corresponding first sketch picture of the target person face image is obtained, further include:
The first sketch picture and remaining face subgraph are merged, obtain the second sketch picture, it is described remainingFace subgraph is the face subgraph in addition to the target person face image in the multiple face subgraph.
Further, it is described that the facial image is split according to the face position, obtain multiple face subgraphsPicture, including:
Split according to facial image described in the connectivity pair of the face position region, obtain multiple face subgraphsPicture;
It is described to choose at least one target person face image from the multiple face subgraph, including:
At least one target person face image is chosen from the multiple face subgraph, in the target person face imageIncluding at least one face.
Further, before the face feature of facial image is obtained, including:
Human face sketch pictures are obtained, and obtain the face feature of the human face sketch pictures;
Obtain the gray value of each pixel in the human face sketch pictures;
The human face sketch pictures are carried out according to the face feature of the human face sketch pictures and the gray valueMark, obtains human face sketch picture sample collection;
According to the human face sketch picture sample collection, preset model is trained based on setting machine learning algorithm, is obtainedObtain sketch generation model.
Further, the acquisition human face sketch pictures include:
Classified according to default style information to the human face sketch pictures, obtain human face sketch picture subset;Wherein, the default style information includes cartoon style, common style and distorting mirror style;
Correspondingly, according to the face feature of the human face sketch pictures and the gray value to the human face sketch pictureCollection is labeled, and obtains human face sketch picture sample collection, including:
According to the face feature of the human face sketch pictures and the gray value to the human face sketch picture subset intoRower is noted, and obtains human face sketch picture sample subset.
Further, the facial image by after mark inputs to sketch and generates model, obtains the facial image pairThe sketch picture answered, including:
Selection target default style information;
Facial image after mark is inputted to sketch and generates model, the corresponding target of the facial image is obtained and presets windFormat sketch picture.
The embodiment of the present application also provides a kind of storage medium for including terminal device executable instruction, and the terminal device canExecute instruction by terminal device processor when being performed for performing a kind of generation method of sketch.
The computer-readable storage medium of the embodiment of the present application, can use any of one or more computer-readable mediaCombination.Computer-readable medium can be computer-readable signal media or computer-readable recording medium.It is computer-readableStorage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device orDevice, or any combination above.The more specifically example (non exhaustive list) of computer-readable recording medium includes:ToolThere are the electrical connections of one or more conducting wires, portable computer diskette, hard disk, random access memory (RAM), read-only storage(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storageMedium can be any includes or the tangible medium of storage program, the program can be commanded execution system, device or deviceUsing or it is in connection.
Computer-readable signal media can include in a base band or as carrier wave a part propagation data-signal,Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimitedIn electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer canAny computer-readable medium beyond storage medium is read, which, which can send, propagates or transmit, is used forBy instruction execution system, device either device use or program in connection.
The program code included on computer-readable medium can be transmitted with any appropriate medium, including --- but it is unlimitedIn wireless, electric wire, optical cable, RF etc., or above-mentioned any appropriate combination.
Can with one or more programming languages or its combination come write for perform the application operation computerProgram code, programming language include object oriented program language-such as Java, Smalltalk, C++, also wrapInclude conventional procedural programming language-such as " C " language or similar programming language.Program code can be completeGround is performed, partly performed on the user computer on the user computer, the software kit independent as one performs, partly existsPart performs or is performed completely on remote computer or server on the remote computer on subscriber computer.It is being related toIn the situation of remote computer, remote computer can pass through the network of any kind --- including LAN (LAN) or wide areaNet (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as utilize ISPTo pass through Internet connection).
Certainly, a kind of storage medium for including computer executable instructions that the embodiment of the present application is provided, its computerThe generation operation for the sketch that executable instruction is not limited to the described above, can also carry out the element that the application any embodiment is providedRelevant operation in the generation method retouched.
Note that it above are only preferred embodiment and the institute's application technology principle of the application.It will be appreciated by those skilled in the art thatThe application is not limited to specific embodiment described here, can carry out for a person skilled in the art various obvious changes,The protection domain readjusted and substituted without departing from the application.Therefore, although being carried out by above example to the applicationIt is described in further detail, but the application is not limited only to above example, in the case where not departing from the application design, alsoIt can include other more equivalent embodiments, and scope of the present application is determined by scope of the appended claims.

Claims (10)

CN201711392583.7A2017-12-212017-12-21Sketch generation method and device, terminal equipment and storage mediumPendingCN107967667A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201711392583.7ACN107967667A (en)2017-12-212017-12-21Sketch generation method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201711392583.7ACN107967667A (en)2017-12-212017-12-21Sketch generation method and device, terminal equipment and storage medium

Publications (1)

Publication NumberPublication Date
CN107967667Atrue CN107967667A (en)2018-04-27

Family

ID=61994335

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201711392583.7APendingCN107967667A (en)2017-12-212017-12-21Sketch generation method and device, terminal equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN107967667A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109785439A (en)*2018-12-272019-05-21深圳云天励飞技术有限公司Human face sketch image generating method and Related product
CN109816746A (en)*2018-12-272019-05-28深圳云天励飞技术有限公司 Sketch image generation method and related products
CN112634123A (en)*2019-10-082021-04-09北京京东尚科信息技术有限公司Image processing method and device
CN112995534A (en)*2021-02-052021-06-18北京字跳网络技术有限公司Video generation method, device, equipment and readable storage medium
CN113129208A (en)*2019-12-312021-07-16深圳云天励飞技术有限公司Human face image generation method based on sketch and related product

Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20070036429A1 (en)*2005-08-092007-02-15Fuji Photo Film Co., Ltd.Method, apparatus, and program for object detection in digital image
CN1971615A (en)*2006-11-102007-05-30中国科学院计算技术研究所Method for generating cartoon portrait based on photo of human face
CN102194131A (en)*2011-06-012011-09-21华南理工大学Fast human face recognition method based on geometric proportion characteristic of five sense organs
CN102609964A (en)*2012-01-172012-07-25湖北莲花山计算机视觉和信息科学研究院Portrait paper-cut generation method
CN102682420A (en)*2012-03-312012-09-19北京百舜华年文化传播有限公司Method and device for converting real character image to cartoon-style image
CN104091174A (en)*2014-07-132014-10-08西安电子科技大学Portrait style classification method based on support vector machine
CN104123741A (en)*2014-06-242014-10-29小米科技有限责任公司Method and device for generating human face sketch
CN105279186A (en)*2014-07-172016-01-27腾讯科技(深圳)有限公司Image processing method and system
CN105335990A (en)*2014-06-052016-02-17腾讯科技(深圳)有限公司Human portrait material image generation method and apparatus
CN105654420A (en)*2015-12-212016-06-08小米科技有限责任公司Face image processing method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20070036429A1 (en)*2005-08-092007-02-15Fuji Photo Film Co., Ltd.Method, apparatus, and program for object detection in digital image
CN1971615A (en)*2006-11-102007-05-30中国科学院计算技术研究所Method for generating cartoon portrait based on photo of human face
CN102194131A (en)*2011-06-012011-09-21华南理工大学Fast human face recognition method based on geometric proportion characteristic of five sense organs
CN102609964A (en)*2012-01-172012-07-25湖北莲花山计算机视觉和信息科学研究院Portrait paper-cut generation method
CN102682420A (en)*2012-03-312012-09-19北京百舜华年文化传播有限公司Method and device for converting real character image to cartoon-style image
CN105335990A (en)*2014-06-052016-02-17腾讯科技(深圳)有限公司Human portrait material image generation method and apparatus
CN104123741A (en)*2014-06-242014-10-29小米科技有限责任公司Method and device for generating human face sketch
CN104091174A (en)*2014-07-132014-10-08西安电子科技大学Portrait style classification method based on support vector machine
CN105279186A (en)*2014-07-172016-01-27腾讯科技(深圳)有限公司Image processing method and system
CN105654420A (en)*2015-12-212016-06-08小米科技有限责任公司Face image processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PAUL C. CONILIONE ;DIANHUI WANG: "Automatic localization and annotation of facial features using machine learning techniques", 《SOFT COMPUTING》*
华博,李帅,湛永松: "基于相关分析的肖像素描漫画生成系统", 《计算机应用与软件》*

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109785439A (en)*2018-12-272019-05-21深圳云天励飞技术有限公司Human face sketch image generating method and Related product
CN109816746A (en)*2018-12-272019-05-28深圳云天励飞技术有限公司 Sketch image generation method and related products
CN109785439B (en)*2018-12-272023-08-01深圳云天励飞技术有限公司Face sketch image generation method and related products
CN112634123A (en)*2019-10-082021-04-09北京京东尚科信息技术有限公司Image processing method and device
CN113129208A (en)*2019-12-312021-07-16深圳云天励飞技术有限公司Human face image generation method based on sketch and related product
CN113129208B (en)*2019-12-312024-03-26深圳云天励飞技术有限公司Sketch-based face image generation method and related products
CN112995534A (en)*2021-02-052021-06-18北京字跳网络技术有限公司Video generation method, device, equipment and readable storage medium
CN112995534B (en)*2021-02-052023-01-24北京字跳网络技术有限公司 Video generation method, device, device and readable storage medium

Similar Documents

PublicationPublication DateTitle
US12277665B2 (en)Electronic device for generating image including 3D avatar reflecting face motion through 3D avatar corresponding to face and method of operating same
CN108833818B (en)Video recording method, device, terminal and storage medium
CN107967667A (en)Sketch generation method and device, terminal equipment and storage medium
CN105229673B (en)Apparatus and associated method
US11461949B2 (en)Electronic device for providing avatar and operating method thereof
CN111432267B (en)Video adjusting method and device, electronic equipment and storage medium
US20230419582A1 (en)Virtual object display method and apparatus, electronic device, and medium
EP2720126A1 (en)Method and apparatus for generating task recommendation icon in a mobile device
KR20160015727A (en)Method and apparatus for visualizing music information
CN108550117A (en) An image processing method, device and terminal equipment
US20190377755A1 (en)Device for Mood Feature Extraction and Method of the Same
CN110443769A (en)Image processing method, image processing device and terminal equipment
CN110809090A (en)Call control method and related product
CN110827195B (en)Virtual article adding method and device, electronic equipment and storage medium
KR102090948B1 (en)Apparatus saving conversation and method thereof
CN109331455A (en) Action error correction method, device, storage medium and terminal for human posture
CN108021905A (en) Image processing method, device, terminal equipment and storage medium
CN110544287B (en)Picture allocation processing method and electronic equipment
US20250039537A1 (en)Screenshot processing method, electronic device, and computer readable medium
CN107948503A (en)A kind of photographic method, camera arrangement and mobile terminal
CN107665074A (en)A kind of color temperature adjusting method and mobile terminal
CN109829965B (en) Action processing method, device, storage medium and electronic equipment of human face model
CN112766389B (en)Image classification method, training method, device and equipment of image classification model
CN106791775A (en)A kind of image processing method and mobile terminal
US20250247606A1 (en)Electronic device for generating image and method of operating same

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20180427


[8]ページ先頭

©2009-2025 Movatter.jp