CN104157001A - Method and device for drawing head caricature - Google Patents

Method and device for drawing head caricature Download PDF

Info

Publication number
CN104157001A
CN104157001A CN201410389489.6A CN201410389489A CN104157001A CN 104157001 A CN104157001 A CN 104157001A CN 201410389489 A CN201410389489 A CN 201410389489A CN 104157001 A CN104157001 A CN 104157001A
Authority
CN
China
Prior art keywords
face
hair style
unique point
caricature
shape
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
CN201410389489.6A
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.)
ThunderSoft Co Ltd
Original Assignee
ThunderSoft 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 ThunderSoft Co Ltd filed Critical ThunderSoft Co Ltd
Priority to CN201410389489.6A priority Critical patent/CN104157001A/en
Publication of CN104157001A publication Critical patent/CN104157001A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The application provides a method and a device for drawing a head caricature. The method comprises the following steps: extracting a face shape model from an original head image input by a user; determining a matched face shape in a preset face shape comic library according to a plurality of facial feature points in the feature points contained in the face shape model; determining a matched hairstyle in a preset hairstyle comic library according to a plurality of hairstyle feature points in the feature points contained in the face shape model; performing affine transformation and caricaturing processing on images of five sense organs extracted from the original head image, and then fusing the determined face shape, the determined hairstyle and the facial image subjected to the caricaturing processing into a preset comic base map to obtain the head caricature of the original head image. Compared with the prior art, the five sense organs serve as a whole to be subjected to caricaturing processing by only searching the matched face shape and the hairstyle in a preset comic library without searching each comic elements of the five sense organs after the five sense organs are split; the process is simple, and the success rate is high.

Description

A kind of method for drafting of head caricature and device
Technical field
The present invention relates to technical field of image processing, especially a kind of method for drafting of head caricature and device.
Background technology
Caricature, it is a kind of artistic expression, it carrys out the sight pictures such as life, personage, event by gimmick simple and exaggeration, wherein, the figure image especially drafting demand of head caricature is increasing, and the mode of traditional professional's manual drawing can not meet above-mentioned growing demand.Along with the development of image processing techniques, utilize professional drawing software can realize automatic generation cartoon image.
Particularly, in the image of user's input, extract head feature, in this head feature, extract a plurality of minutias, and in caricature database, search for the caricature element similar to minutia one by one, and then the element combinations searching is generated to cartoon image.
Yet described cartoon-drawing method need to be searched for one by one caricature element corresponding to a plurality of minutias in database, the loaded down with trivial details and poor effect of process.
Summary of the invention
In view of this, the application provides a kind of method for drafting and device of head caricature, in order to solve cartoon-drawing method of the prior art, need in database, search for one by one caricature element corresponding to a plurality of minutias, the technical matters of the loaded down with trivial details and poor effect of process.For realizing described goal of the invention, technical scheme provided by the invention is as follows:
A method for drafting for head caricature, comprising:
In the original header image of user's input, extract people's face shape model; Wherein, described people's face shape model comprises a plurality of unique points;
According to a plurality of facial feature points in described unique point, in default shape of face caricature storehouse, determine the shape of face matching with described people's face shape model; Wherein, described face mask unique point is in order to characterize the face mask in described people's face shape model;
According to a plurality of hair style unique points in described unique point, in default hair style caricature storehouse, determine the hair style matching with described people's face shape model; Wherein, described hair style unique point is in order to characterize the hair style in described people's face shape model;
The face image extracting from described original header image is carried out to affined transformation and animating processing;
The face image co-registration that described definite shape of face, described definite hair style and described animating are processed is in default caricature base map, to obtain the head caricature of this original header image.
Said method, preferably, a plurality of hair style unique points in the described unique point of described foundation, in default hair style caricature storehouse, determine the hair style matching with described people's face shape model, comprising:
According to a plurality of hair style unique points in described unique point, determine bang rectangular area;
In described bang rectangular area, utilize not bending moment algorithm of Hu, extract the bang Hu unique point of predetermined number;
According to described a plurality of bang Hu unique points, in default hair style caricature storehouse, determine the hair style matching with described people's face shape model.
Said method, preferably, the described a plurality of bang Hu unique points of described foundation, in default hair style caricature storehouse, determine the hair style matching with described people's face shape model, comprising:
Calculate respectively in described Hu unique point and default hair style caricature storehouse Euclidean distance between each hair style template Hu unique point;
Hair style template corresponding to the minimum value in described each Euclidean distance is defined as to the hair style that described people's face shape model matches.
Said method, preferably, a plurality of hair style unique points in the described unique point of described foundation, determine bang rectangular area, comprising:
The unique point that characterizes brow ridge of take is foundation, determines the mid point of bang rectangular area lower limb length;
The unique point that characterizes the bridge of the nose of take is foundation, determines the horizontal level of bang rectangular area lower limb length;
Two the highest unique points in face mask unique point of take are foundation, determine bang rectangular area lower limb length value;
The minimum unique point in described mid point and face mask unique point of take is foundation, determines the height value of bang rectangular area;
Wherein, by described mid point, described horizontal level, described length value and described height value, be used for determining described bang rectangular area.
Said method, preferably, a plurality of facial feature points in the described unique point of described foundation, in default shape of face caricature storehouse, determine the shape of face matching with described people's face shape model, comprising:
Utilize affine transformation equation P l P r P m * M M l M r M m , Calculate affined transformation coefficient M;
Wherein, P l, P rand P mthe corresponding people's face shape model extracting, is respectively the center of this shape left eye unique point, the center of right eye unique point, and the center of face unique point, M l, M rand M mpreset standard shape of face template image in corresponding default shape of face caricature storehouse, is respectively the center of this template image left eye unique point, the center of right eye unique point, and the center of face unique point;
According to described affined transformation coefficient M, the contour feature point in described a plurality of facial feature points is carried out to affined transformation;
Described in calculating respectively, carry out in contour feature point after affined transformation and default shape of face caricature storehouse Euclidean distance between each shape of face template characteristic point;
Shape of face template corresponding to the minimum value in described each Euclidean distance is defined as to the shape of face that described people's face shape model matches.
The present invention also provides a kind of drawing apparatus of head caricature, comprising:
Shape extraction unit, for the original header image in user's input, extracts people's face shape model; Wherein, described people's face shape model comprises a plurality of unique points;
Shape of face template determining unit, for a plurality of facial feature points according to described unique point, in default shape of face caricature storehouse, determines the shape of face matching with described people's face shape model; Wherein, described face mask unique point is in order to characterize the face mask in described people's face shape model;
Hair style template determining unit, for a plurality of hair style unique points according to described unique point, in default hair style caricature storehouse, determines the hair style matching with described people's face shape model; Wherein, described hair style unique point is in order to characterize the hair style in described people's face shape model;
Face graphics processing unit, processes for the face image extracting from described original header image being carried out to affined transformation and animating;
Head caricature synthesis unit, for face image co-registration that described definite shape of face, described definite hair style and described animating are processed to default caricature base map, to obtain the head caricature of this original header image.
Said apparatus, preferably, described hair style template determining unit comprises:
Subelement is determined in bang region, for a plurality of hair style unique points according to described unique point, determines bang rectangular area;
Bang feature point extraction subelement, in described bang rectangular area, utilizes not bending moment algorithm of Hu, extracts the bang Hu unique point of predetermined number;
Hair style template matches subelement, for according to described a plurality of bang Hu unique points, in default hair style caricature storehouse, determines the hair style matching with described people's face shape model.
Said apparatus, preferably, described hair style template matches subelement comprises:
Euclidean distance computation subunit, for calculating respectively Euclidean distance between described Hu unique point and default hair style caricature storehouse each hair style template Hu unique point;
Hair style template is determined subelement, for hair style template corresponding to the minimum value of described each Euclidean distance is defined as to the hair style that described people's face shape model matches.
Said apparatus, preferably, described bang region determines that subelement comprises:
Subelement is determined at center, and the unique point that characterizes brow ridge for take is foundation, determines the mid point of bang rectangular area lower limb length;
Horizontal level is determined subelement, and the unique point that characterizes the bridge of the nose for take is foundation, determines the horizontal level of bang rectangular area lower limb length;
Length is determined subelement, for take two the highest unique points of face mask unique point, is foundation, determines bang rectangular area lower limb length value;
Highly determining subelement, is foundation for take the minimum unique point of described mid point and face mask unique point, determines the height value of bang rectangular area;
Wherein, by described mid point, described horizontal level, described length value and described height value, be used for determining described bang rectangular area.
Said apparatus, preferably, described shape of face template determining unit comprises:
Conversion coefficient computation subunit, for utilizing affine transformation equation P l P r P m * M M l M r M m , Calculate affined transformation coefficient M;
Wherein, P l, P rand P mthe corresponding people's face shape model extracting, is respectively the center of this shape left eye unique point, the center of right eye unique point, and the center of face unique point, M l, M rand M mpreset standard shape of face template image in corresponding default shape of face caricature storehouse, is respectively the center of this template image left eye unique point, the center of right eye unique point, and the center of face unique point;
Affined transformation subelement, for according to described affined transformation coefficient M, carries out affined transformation to the contour feature point in described a plurality of facial feature points;
Euclidean distance generates subelement, for carrying out Euclidean distance between contour feature point after affined transformation and each shape of face template characteristic point of default shape of face caricature storehouse described in calculating respectively;
Shape of face template is determined subelement, for shape of face template corresponding to the minimum value of described each Euclidean distance is defined as to the shape of face that described people's face shape model matches.
Compared with prior art, the present invention has following beneficial effect:
Method for drafting and the device of the head caricature that the embodiment of the present invention provides, in the original header image of user's input, extract people's face shape model, and a plurality of facial feature points in the unique point comprising according to people's face shape model, in default shape of face caricature storehouse, determine the shape of face matching, a plurality of hair style unique points in the unique point comprising according to people's face shape model, in default hair style caricature storehouse, determine the hair style matching, the face image extracting from original header image is carried out to affined transformation and animating processing, and then by described definite shape of face, the face image co-registration that described definite hair style and described animating are processed is in default caricature base map, to obtain the head caricature of this original header image, compared with prior art, the present invention only need search shape of face and the hair style of coupling in default caricature storehouse, do not need each caricature element of search face after face are split, but face are carried out to animating processing as a whole, process is simple and success ratio is higher.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skills, do not paying under the prerequisite of creative work, other accompanying drawing can also be provided according to the accompanying drawing providing.
The process flow diagram of the head cartoon-drawing method that Fig. 1 provides for the embodiment of the present invention;
The exemplary plot of people's face shape model that Fig. 2 provides for the embodiment of the present invention;
The face image rendering process exemplary plot that Fig. 3 provides for the embodiment of the present invention;
Another embodiment part process flow diagram of head cartoon-drawing method that Fig. 4 provides for the embodiment of the present invention;
The bang rectangular area exemplary plot that Fig. 5 provides for the embodiment of the present invention;
The head caricature anabolic process exemplary plot that Fig. 6 provides for the embodiment of the present invention;
The structured flowchart of the head cartoon-drawing device that Fig. 7 provides for the embodiment of the present invention;
Another embodiment part-structure block diagram of head cartoon-drawing device that Fig. 8 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Referring to Fig. 1, the flow process that it shows the head cartoon-drawing method that the embodiment of the present invention provides, specifically comprises the following steps:
Step S101: in the original header image of user's input, extract people's face shape model; Wherein, described people's face shape model comprises a plurality of unique points.
Wherein, the image of user's input can be the photograph of directly shooting or the pre-stored picture of selection.Particularly, the process of extracting people's face shape model in the image of described input can be: first, utilize people's face detection algorithm, in this image, determine human face region, then, utilize facial Feature Localization algorithm to set up shape to this human face region, as shown in Figure 2, in the shape of setting up, including a plurality of unique points (white point), is to characterize people's face shape feature by described a plurality of unique points.
It should be noted that, people's face detection algorithm can be that in prior art, any one image is processed the human face region detection algorithm using, and alternatively, is the AdaBoost algorithm based on Haar-Like feature; Facial Feature Localization algorithm is also any one face characteristic location algorithm in prior art, alternatively, for ASM (Active Sharp Model) algorithm, this algorithm is the algorithm based on a distributed model, specifically the human face region detecting is set up the local texture model of unique point, the preset requirement that whether meets human face characteristic point according to the relation between the local texture model between each unique point is again screened each unique point, thereby finally determine this people's face shape model, this model is explained by a plurality of unique points, as shown in Figure 2.
Step S102: according to a plurality of facial feature points in described unique point, in default shape of face caricature storehouse, determine the shape of face matching with described people's face shape model; Wherein, described face mask unique point is in order to characterize the face mask in described people's face shape model.
Wherein, according to the unique point that can be used for characterizing facial contour in the plurality of unique point, the shape of face model that search matches in default shape of face caricature storehouse, this shape of face model is the shape of face that possesses caricature feature.
Step S103: according to a plurality of hair style unique points in described unique point, in default hair style caricature storehouse, determine the hair style matching with described people's face shape model; Wherein, described hair style unique point is in order to characterize the hair style in described people's face shape model.
Equally, according to a plurality of unique points that can be used for characterizing hair style feature in the plurality of unique point, in default hair style caricature storehouse, search for suitable hair style model, this hair style model is the hair style that possesses caricature feature.
Step S104: the face image extracting from described original header image is carried out to affined transformation and animating processing.
In reality, the image size of different user input and direction etc. there are differences, set in advance the size of composograph, in the present embodiment, need to carry out convergent-divergent, rotation and the map function of translation equiaffine to face image, thereby face image is transformed to default big or small image, to realize the processing to the original image of various different sizes, shape, direction.
Wherein, the face image of extraction is carried out to animating processing as a whole, the detailed process description that vide infra.Compared with prior art, the present embodiment is not in default caricature element database, search for one by one the caricature element of each face element, but by the face that extract as a whole, carry out animating processing, avoided the process of coupling one by one, process is simple, and the more realistic image of face element after processing, effect is better.
Step S105: the face image co-registration that described definite shape of face, described definite hair style and described animating are processed is in default caricature base map, to obtain the head caricature of this original header image.
In the present embodiment, pre-rendered caricature base map, can comprise colour of skin background color, illumination and shade etc. in this figure, and the colour of skin makes case of caricatures of persons more true, and in addition, illumination and shade etc. are in order to strengthen caricature effect.
In prior art, need in default caricature element database, search for the caricature element that each face after shape of face, hair style and fractionation match, after the caricature element searching is combined, directly generate cartoon image.Yet, the head cartoon-drawing method that the embodiment of the present invention provides, in default shape of face caricature storehouse, determine the shape of face of coupling, and determine the hair style of mating in default hair style caricature storehouse, and, the face image extracting from described original header image is carried out to affined transformation and animating processing, after face, the shape of face of determining and the hair style after animating is processed merges in default caricature base map, generate final head cartoon image.
Visible, the embodiment of the present invention is made the face image in original header image as a whole, directly it is carried out to animating processing, avoid the search procedure one by one in default caricature storehouse, processing mode is simpler, and will not split by face, has improved the effect of cartoon-drawing.
Alternatively, the process of in step S104, face image being carried out to affined transformation can be: the coordinate position of each organ (removal ear) set in advance face in default caricature base map in, the face image extracting is carried out to affined transformation according to described predeterminated position, so that face image is transformed to preset standard size, facilitate follow-up and caricature base map and the shape of face of extracting from caricature storehouse and hair style to combine.It should be noted that the description that can vide infra of concrete affine process.
Alternatively, the process that step S105 is fused to default caricature base map by shape of face, hair style and caricaturized face can be, first by the face image co-registration after animating in caricature base map, and then the shape of face of determining and hair style are added to this base map.Wherein, fusion method can be used Poisson fusion method, and background color, illumination and shade etc. in the face image after caricature and caricature base map are combined.
Particularly, above-mentioned two processes can be as shown in Figure 3, the face image extracting from original header image 31 is carried out to animating processing, according to the coordinate position that sets in advance each organ in face (removal ear) in default caricature base map 32, carry out affined transformation, and according to the marked region 33 setting in advance, merged to default caricature base map, thereby first generated the cartoon image 34 that comprises face's face.Wherein, described marked region 33 is for limiting face after affined transformation to caricature base map fusion process, and integration region can not exceed this marked region.
The process of meanwhile, in step S104, face image being carried out to animating processing in said method embodiment is:
Utilize bilateral wave filter to carry out filtering processing to described face image, to obtain the face image of details obfuscation.Because the image boundary of user's input picture is comparatively clear, and possess more true details, and do not meet caricature characteristic, so the filtering of wave filter processing can make face image carry out Fuzzy processing, the characteristic that only retains strong border, makes this face image meet caricature feature.
Further, judge that whether the contrast of face image is lower than predetermined threshold value, if so, strengthen the contrast of the face image after described filtering is processed.Particularly, utilize sobel edge detection algorithm, the edge of the face image that detection is extracted from original header image, and the pixel value of the edge pixel detecting is set to 0, make it become black, simultaneously, the pixel value of residual pixel is set to 255, make it become white, thereby acquisition edge image, and the image after this edge image and above-mentioned filtering processing is multiplied each other by pixel, to obtain obfuscation and to strengthen the face image after contrast, as the face image in image in Fig. 3 34, this image possesses caricature feature.
Referring to Fig. 4, in said method embodiment, step S103 can realize in the following manner:
Step S201: according to a plurality of hair style unique points in described unique point, determine bang rectangular area.
Wherein, bang rectangular area refers to the rectangular area that comprises bang, and as shown in Figure 5, this rectangular area can utilize a part of unique point (hair style unique point) in people's face shape model as shown in Figure 2 to determine.The mode of determining rectangular area can be a variety of, such as: determine rectangular centre and cornerwise length; Or, determine length center, length value, length horizontal level and height value.Thus, specifically determine that the mode of rectangular area is different, the unique point being applied to is also different, but identical, is all the unique point that can utilize described people's face shape model to comprise, determines the rectangular area of bang.
Alternatively, as shown in Figure 5, this step can realize in the following manner:
The unique point that characterizes brow ridge of take is foundation, determines the mid point of bang rectangular area lower limb length.See Fig. 5, brow ridge unique point is P 21and P 17two coordinate points, the mid point P of lower limb length c=(P 21+ P 17)/2.
The unique point that characterizes the bridge of the nose of take is foundation, determines the horizontal level of bang rectangular area lower limb length.See Fig. 5, the unique point that characterizes the bridge of the nose is P 33and P 62two coordinate points, are connected to straight line by these two coordinate points, and the orientation determination perpendicular with this straight line is the horizontal level of line edge length.
Two the highest unique points in face mask unique point of take are foundation, determine bang rectangular area lower limb length value.See Fig. 5, the highest two unique point P in face mask unique point 0and P 14, the length between these two unique points is defined as to the length value of lower limb.
Take described mid point and to characterize minimum unique point in face mask unique point be foundation, determine the height value of bang rectangular area.See Fig. 5, in face mask unique point, minimum unique point is P 7, by described mid point P cwith P 7between distance 1/3rd be defined as rectangle height value.
Wherein, by described mid point, described horizontal level, described length value and described height value, be used for determining described bang rectangular area.
Step S202: in described bang rectangular area, utilize not bending moment algorithm of Hu, extract the bang Hu unique point of predetermined number.
Wherein, in bang rectangular area, not only comprise bang, also comprise forehead part.In this rectangular area, get rid of forehead part, using remainder as bang, and then, with Hu bending moment algorithm not, extract the bang Hu unique point of predetermined number.
Alternatively, forehead part can be determined by Face Detection algorithm, concrete, in the definite human face region of people's face shape model, select a plurality of colour of skin Seed Points, this colour of skin Seed Points is carried out to the estimation of colour of skin statistical model (high order distributed model, mean value model or Tobin's mean variance model etc.), and utilize the colour of skin statistical model of estimating to screen a plurality of colour of skin Seed Points of selecting, thereby extract area of skin color.The area of skin color that utilization extracts is determined forehead part and this part is removed, thereby obtains bang region.
Step S203: according to described a plurality of bang Hu unique points, in default hair style caricature storehouse, determine the hair style matching with described people's face shape model.
Wherein, described Hu unique point is the one group of vector that comprises 7 unique point coordinates, utilizes described unique point to mate one by one with each hair style template in default hair style caricature storehouse, to determine coupling hair style.Alternatively, calculate respectively in described Hu unique point and default hair style caricature storehouse Euclidean distance between each hair style template Hu unique point; Hair style template corresponding to the minimum value in described each Euclidean distance is defined as to the hair style that described people's face shape model matches.
Particularly, calculate in advance each hair style template Hu unique point S in hair style caricature storehouse 2={ s 21, s 22... s 27, suppose that bang Hu unique point vector is for S 1={ s 11, s 12... s 17, by Euclidean distance algorithm obtain each Euclidean distance L, thereby, the hair style that hair style template corresponding to minimum Euclidean distance L is defined as matching.
Alternatively, in said method embodiment, step S102, according to a plurality of facial feature points in described unique point, in default shape of face caricature storehouse, determines that the shape of face matching with described people's face shape model can realize by following manner:
Utilize affine transformation equation P l P r P m * M M l M r M m , Calculate affined transformation coefficient M;
Wherein, P l, P rand P mthe corresponding people's face shape model extracting, is respectively the center of this shape left eye unique point, the center of right eye unique point, and the center of face unique point, M l, M rand M mpreset standard shape of face template image in corresponding default shape of face caricature storehouse, is respectively the center of this template image left eye unique point, the center of right eye unique point, and the center of face unique point;
According to described affined transformation coefficient M, the contour feature point in described a plurality of facial feature points is carried out to affined transformation.
Wherein, described contour feature point refers to each unique point that can characterize face's exterior contour, as shown in Figure 5, is 15 coordinate points of 0 to 14.It should be noted that, each shape of face template in shape of face caricature storehouse need to be carried out affined transformation in advance, to complete the unitized of coordinate system, to facilitate, utilizes coordinate points to carry out the matching process of shape of face.
Described in calculating respectively, carry out in contour feature point after affined transformation and default shape of face caricature storehouse Euclidean distance between each shape of face template characteristic point;
Shape of face template corresponding to the minimum value in described each Euclidean distance is defined as to the shape of face that described people's face shape model matches.
Wherein, the algorithm of Euclidean distance can, referring to describing process above, not repeat at this.
Shown in Figure 6, will after the fused images that comprises face image 61 shown in Fig. 3, the hair style 62 of determining and shape of face 63 combination determined, generate caricature head image 64.
The drawing apparatus of the head the caricature below embodiment of the present invention being provided is introduced, and it should be noted that, can the explanation to head cartoon-drawing method with reference to the present invention to the explanation of the drawing apparatus of head caricature, do not repeat.
Referring to Fig. 7, the drawing apparatus structure that it shows the head caricature that the embodiment of the present invention provides, comprising:
Shape extraction unit 100, for the original header image in user's input, extracts people's face shape model; Wherein, described people's face shape model comprises a plurality of unique points;
Shape of face template determining unit 200, for a plurality of facial feature points according to described unique point, in default shape of face caricature storehouse, determines the shape of face matching with described people's face shape model; Wherein, described face mask unique point is in order to characterize the face mask in described people's face shape model;
Hair style template determining unit 300, for a plurality of hair style unique points according to described unique point, in default hair style caricature storehouse, determines the hair style matching with described people's face shape model; Wherein, described hair style unique point is in order to characterize the hair style in described people's face shape model;
Face graphics processing unit 400, processes for the face image extracting from described original header image being carried out to affined transformation and animating;
Head caricature synthesis unit 500, for face image co-registration that described definite shape of face, described definite hair style and described animating are processed to default caricature base map, to obtain the head caricature of this original header image.
From above technical scheme, the drawing apparatus of the head caricature that the embodiment of the present invention provides, in default shape of face caricature storehouse, determine the shape of face of coupling, and determine the hair style of mating in default hair style caricature storehouse, and, the face image extracting from described original header image is carried out to affined transformation and animating processing, after face, the shape of face of determining and the hair style after animating is processed merges in default caricature base map, generate final head cartoon image.
Visible, the embodiment of the present invention is made the face image in original header image as a whole, directly it is carried out to animating processing, avoid the search procedure one by one in default caricature storehouse, processing mode is simpler, and will not split by face, has improved the effect of cartoon-drawing.
Referring to Fig. 8, alternatively, the hair style template determining unit 300 in said apparatus embodiment comprises:
Subelement 301 is determined in bang region, for a plurality of hair style unique points according to described unique point, determines bang rectangular area;
Bang feature point extraction subelement 302, in described bang rectangular area, utilizes not bending moment algorithm of Hu, extracts the bang Hu unique point of predetermined number;
Hair style template matches subelement 303, for according to described a plurality of bang Hu unique points, in default hair style caricature storehouse, determines the hair style matching with described people's face shape model.
Alternatively, described hair style template matches subelement 303 comprises:
Euclidean distance computation subunit, for calculating respectively Euclidean distance between described Hu unique point and default hair style caricature storehouse each hair style template Hu unique point;
Hair style template is determined subelement, for hair style template corresponding to the minimum value of described each Euclidean distance is defined as to the hair style that described people's face shape model matches.
Alternatively, described bang region determines that subelement 301 comprises:
Subelement is determined at center, and the unique point that characterizes brow ridge for take is foundation, determines the mid point of bang rectangular area lower limb length;
Horizontal level is determined subelement, and the unique point that characterizes the bridge of the nose for take is foundation, determines the horizontal level of bang rectangular area lower limb length;
Length is determined subelement, for take two the highest unique points of face mask unique point, is foundation, determines bang rectangular area lower limb length value;
Highly determining subelement, is foundation for take the minimum unique point of described mid point and face mask unique point, determines the height value of bang rectangular area;
Wherein, by described mid point, described horizontal level, described length value and described height value, be used for determining described bang rectangular area.
Alternatively, described shape of face template determining unit 200 comprises:
Conversion coefficient computation subunit, for utilizing affine transformation equation P l P r P m * M M l M r M m , Calculate affined transformation coefficient M;
Wherein, P l, P rand P mthe corresponding people's face shape model extracting, is respectively the center of this shape left eye unique point, the center of right eye unique point, and the center of face unique point, M l, M rand M mpreset standard shape of face template image in corresponding default shape of face caricature storehouse, is respectively the center of this template image left eye unique point, the center of right eye unique point, and the center of face unique point;
Affined transformation subelement, for according to described affined transformation coefficient M, carries out affined transformation to the contour feature point in described a plurality of facial feature points;
Euclidean distance generates subelement, for carrying out Euclidean distance between contour feature point after affined transformation and each shape of face template characteristic point of default shape of face caricature storehouse described in calculating respectively;
Shape of face template is determined subelement, for shape of face template corresponding to the minimum value of described each Euclidean distance is defined as to the shape of face that described people's face shape model matches.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.
Above-mentioned explanation to the disclosed embodiments, makes professional and technical personnel in the field can realize or use the present invention.To the multiple modification of these embodiment, will be apparent for those skilled in the art, General Principle as defined herein can, in the situation that not departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. a method for drafting for head caricature, is characterized in that, comprising:
In the original header image of user's input, extract people's face shape model; Wherein, described people's face shape model comprises a plurality of unique points;
According to a plurality of facial feature points in described unique point, in default shape of face caricature storehouse, determine the shape of face matching with described people's face shape model; Wherein, described face mask unique point is in order to characterize the face mask in described people's face shape model;
According to a plurality of hair style unique points in described unique point, in default hair style caricature storehouse, determine the hair style matching with described people's face shape model; Wherein, described hair style unique point is in order to characterize the hair style in described people's face shape model;
The face image extracting from described original header image is carried out to affined transformation and animating processing;
The face image co-registration that described definite shape of face, described definite hair style and described animating are processed is in default caricature base map, to obtain the head caricature of this original header image.
2. method according to claim 1, is characterized in that, a plurality of hair style unique points in the described unique point of described foundation, in default hair style caricature storehouse, are determined the hair style matching with described people's face shape model, comprising:
According to a plurality of hair style unique points in described unique point, determine bang rectangular area;
In described bang rectangular area, utilize not bending moment algorithm of Hu, extract the bang Hu unique point of predetermined number;
According to described a plurality of bang Hu unique points, in default hair style caricature storehouse, determine the hair style matching with described people's face shape model.
3. method according to claim 2, is characterized in that, the described a plurality of bang Hu unique points of described foundation, in default hair style caricature storehouse, are determined the hair style matching with described people's face shape model, comprising:
Calculate respectively in described Hu unique point and default hair style caricature storehouse Euclidean distance between each hair style template Hu unique point;
Hair style template corresponding to the minimum value in described each Euclidean distance is defined as to the hair style that described people's face shape model matches.
4. method according to claim 2, is characterized in that, a plurality of hair style unique points in the described unique point of described foundation, determine bang rectangular area, comprising:
The unique point that characterizes brow ridge of take is foundation, determines the mid point of bang rectangular area lower limb length;
The unique point that characterizes the bridge of the nose of take is foundation, determines the horizontal level of bang rectangular area lower limb length;
Two the highest unique points in face mask unique point of take are foundation, determine bang rectangular area lower limb length value;
The minimum unique point in described mid point and face mask unique point of take is foundation, determines the height value of bang rectangular area;
Wherein, by described mid point, described horizontal level, described length value and described height value, be used for determining described bang rectangular area.
5. method according to claim 1, is characterized in that, a plurality of facial feature points in the described unique point of described foundation, in default shape of face caricature storehouse, are determined the shape of face matching with described people's face shape model, comprising:
Utilize affine transformation equation P l P r P m * M M l M r M m , Calculate affined transformation coefficient M;
Wherein, P l, P rand P mthe corresponding people's face shape model extracting, is respectively the center of this shape left eye unique point, the center of right eye unique point, and the center of face unique point, M l, M rand M mpreset standard shape of face template image in corresponding default shape of face caricature storehouse, is respectively the center of this template image left eye unique point, the center of right eye unique point, and the center of face unique point;
According to described affined transformation coefficient M, the contour feature point in described a plurality of facial feature points is carried out to affined transformation;
Described in calculating respectively, carry out in contour feature point after affined transformation and default shape of face caricature storehouse Euclidean distance between each shape of face template characteristic point;
Shape of face template corresponding to the minimum value in described each Euclidean distance is defined as to the shape of face that described people's face shape model matches.
6. a drawing apparatus for head caricature, is characterized in that, comprising:
Shape extraction unit, for the original header image in user's input, extracts people's face shape model; Wherein, described people's face shape model comprises a plurality of unique points;
Shape of face template determining unit, for a plurality of facial feature points according to described unique point, in default shape of face caricature storehouse, determines the shape of face matching with described people's face shape model; Wherein, described face mask unique point is in order to characterize the face mask in described people's face shape model;
Hair style template determining unit, for a plurality of hair style unique points according to described unique point, in default hair style caricature storehouse, determines the hair style matching with described people's face shape model; Wherein, described hair style unique point is in order to characterize the hair style in described people's face shape model;
Face graphics processing unit, processes for the face image extracting from described original header image being carried out to affined transformation and animating;
Head caricature synthesis unit, for face image co-registration that described definite shape of face, described definite hair style and described animating are processed to default caricature base map, to obtain the head caricature of this original header image.
7. device according to claim 6, is characterized in that, described hair style template determining unit comprises:
Subelement is determined in bang region, for a plurality of hair style unique points according to described unique point, determines bang rectangular area;
Bang feature point extraction subelement, in described bang rectangular area, utilizes not bending moment algorithm of Hu, extracts the bang Hu unique point of predetermined number;
Hair style template matches subelement, for according to described a plurality of bang Hu unique points, in default hair style caricature storehouse, determines the hair style matching with described people's face shape model.
8. device according to claim 7, is characterized in that, described hair style template matches subelement comprises:
Euclidean distance computation subunit, for calculating respectively Euclidean distance between described Hu unique point and default hair style caricature storehouse each hair style template Hu unique point;
Hair style template is determined subelement, for hair style template corresponding to the minimum value of described each Euclidean distance is defined as to the hair style that described people's face shape model matches.
9. device according to claim 7, is characterized in that, described bang region determines that subelement comprises:
Subelement is determined at center, and the unique point that characterizes brow ridge for take is foundation, determines the mid point of bang rectangular area lower limb length;
Horizontal level is determined subelement, and the unique point that characterizes the bridge of the nose for take is foundation, determines the horizontal level of bang rectangular area lower limb length;
Length is determined subelement, for take two the highest unique points of face mask unique point, is foundation, determines bang rectangular area lower limb length value;
Highly determining subelement, is foundation for take the minimum unique point of described mid point and face mask unique point, determines the height value of bang rectangular area;
Wherein, by described mid point, described horizontal level, described length value and described height value, be used for determining described bang rectangular area.
10. device according to claim 6, is characterized in that, described shape of face template determining unit comprises:
Conversion coefficient computation subunit, for utilizing affine transformation equation P l P r P m * M M l M r M m , Calculate affined transformation coefficient M;
Wherein, P l, P rand P mthe corresponding people's face shape model extracting, is respectively the center of this shape left eye unique point, the center of right eye unique point, and the center of face unique point, M l, M rand M mpreset standard shape of face template image in corresponding default shape of face caricature storehouse, is respectively the center of this template image left eye unique point, the center of right eye unique point, and the center of face unique point;
Affined transformation subelement, for according to described affined transformation coefficient M, carries out affined transformation to the contour feature point in described a plurality of facial feature points;
Euclidean distance generates subelement, for carrying out Euclidean distance between contour feature point after affined transformation and each shape of face template characteristic point of default shape of face caricature storehouse described in calculating respectively;
Shape of face template is determined subelement, for shape of face template corresponding to the minimum value of described each Euclidean distance is defined as to the shape of face that described people's face shape model matches.
CN201410389489.6A 2014-08-08 2014-08-08 Method and device for drawing head caricature Pending CN104157001A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410389489.6A CN104157001A (en) 2014-08-08 2014-08-08 Method and device for drawing head caricature

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410389489.6A CN104157001A (en) 2014-08-08 2014-08-08 Method and device for drawing head caricature

Publications (1)

Publication Number Publication Date
CN104157001A true CN104157001A (en) 2014-11-19

Family

ID=51882489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410389489.6A Pending CN104157001A (en) 2014-08-08 2014-08-08 Method and device for drawing head caricature

Country Status (1)

Country Link
CN (1) CN104157001A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104715447A (en) * 2015-03-02 2015-06-17 百度在线网络技术(北京)有限公司 Image synthesis method and device
CN106372333A (en) * 2016-08-31 2017-02-01 北京维盛视通科技有限公司 Method and device for displaying clothes based on face model
CN106407904A (en) * 2016-08-31 2017-02-15 浙江大华技术股份有限公司 Bang zone determining method and device
CN107153807A (en) * 2016-03-03 2017-09-12 重庆信科设计有限公司 A kind of non-greedy face identification method of two-dimensional principal component analysis
CN107451950A (en) * 2016-05-30 2017-12-08 北京旷视科技有限公司 Face image synthesis method, human face recognition model training method and related device
CN107730573A (en) * 2017-09-22 2018-02-23 西安交通大学 A kind of personal portrait cartoon style generation method of feature based extraction
CN108335423A (en) * 2017-12-08 2018-07-27 广东数相智能科技有限公司 A kind of system for drawing portrait, method and storage medium
CN108463823A (en) * 2016-11-24 2018-08-28 华为技术有限公司 A kind of method for reconstructing, device and the terminal of user's Hair model
CN109410315A (en) * 2018-08-31 2019-03-01 南昌理工学院 Hair styling method, device, readable storage medium storing program for executing and intelligent terminal
CN109919016A (en) * 2019-01-28 2019-06-21 武汉恩特拉信息技术有限公司 A kind of method and device generating human face expression on the object of no face's organ
CN110363107A (en) * 2019-06-26 2019-10-22 成都品果科技有限公司 Face forehead point Quick Extended method, apparatus, storage medium and processor
CN110677587A (en) * 2019-10-12 2020-01-10 北京市商汤科技开发有限公司 Photo printing method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477696A (en) * 2009-01-09 2009-07-08 彭振云 Human character cartoon image generating method and apparatus
CN101847268A (en) * 2010-04-29 2010-09-29 北京中星微电子有限公司 Cartoon human face image generation method and device based on human face images
CN103236075A (en) * 2013-05-13 2013-08-07 苏州华漫信息服务有限公司 Drawing method of SVG (scalable vector graphics) face cartoon

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477696A (en) * 2009-01-09 2009-07-08 彭振云 Human character cartoon image generating method and apparatus
CN101847268A (en) * 2010-04-29 2010-09-29 北京中星微电子有限公司 Cartoon human face image generation method and device based on human face images
CN103236075A (en) * 2013-05-13 2013-08-07 苏州华漫信息服务有限公司 Drawing method of SVG (scalable vector graphics) face cartoon

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘嘉敏 等: "基于Hu不变矩的车标识别", 《科技信息(学术研究)》 *
葛长伟: "嵌入式智能视频监控系统的研究及实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104715447B (en) * 2015-03-02 2019-08-30 百度在线网络技术(北京)有限公司 Image composition method and device
CN104715447A (en) * 2015-03-02 2015-06-17 百度在线网络技术(北京)有限公司 Image synthesis method and device
CN107153807A (en) * 2016-03-03 2017-09-12 重庆信科设计有限公司 A kind of non-greedy face identification method of two-dimensional principal component analysis
CN107451950A (en) * 2016-05-30 2017-12-08 北京旷视科技有限公司 Face image synthesis method, human face recognition model training method and related device
CN106372333A (en) * 2016-08-31 2017-02-01 北京维盛视通科技有限公司 Method and device for displaying clothes based on face model
CN106407904A (en) * 2016-08-31 2017-02-15 浙江大华技术股份有限公司 Bang zone determining method and device
CN106407904B (en) * 2016-08-31 2019-09-17 浙江大华技术股份有限公司 A kind of method and device in determining fringe region
CN108463823A (en) * 2016-11-24 2018-08-28 华为技术有限公司 A kind of method for reconstructing, device and the terminal of user's Hair model
CN107730573A (en) * 2017-09-22 2018-02-23 西安交通大学 A kind of personal portrait cartoon style generation method of feature based extraction
CN108335423A (en) * 2017-12-08 2018-07-27 广东数相智能科技有限公司 A kind of system for drawing portrait, method and storage medium
CN109410315A (en) * 2018-08-31 2019-03-01 南昌理工学院 Hair styling method, device, readable storage medium storing program for executing and intelligent terminal
CN109919016A (en) * 2019-01-28 2019-06-21 武汉恩特拉信息技术有限公司 A kind of method and device generating human face expression on the object of no face's organ
CN110363107A (en) * 2019-06-26 2019-10-22 成都品果科技有限公司 Face forehead point Quick Extended method, apparatus, storage medium and processor
CN110677587A (en) * 2019-10-12 2020-01-10 北京市商汤科技开发有限公司 Photo printing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104157001A (en) Method and device for drawing head caricature
CN101477696B (en) Human character cartoon image generating method and apparatus
CN105404392B (en) Virtual method of wearing and system based on monocular cam
CN102332095B (en) Face motion tracking method, face motion tracking system and method for enhancing reality
US20090087035A1 (en) Cartoon Face Generation
EP3992919B1 (en) Three-dimensional facial model generation method and apparatus, device, and medium
US20150042663A1 (en) System and method for creating avatars or animated sequences using human body features extracted from a still image
US20070258627A1 (en) Face recognition system and method
CN106709931B (en) Method for mapping facial makeup to face and facial makeup mapping device
CN105913416A (en) Method for automatically segmenting three-dimensional human face model area
CN108388882A (en) Based on the gesture identification method that the overall situation-part is multi-modal RGB-D
CN103366400A (en) Method for automatically generating three-dimensional head portrait
CN110263768A (en) A kind of face identification method based on depth residual error network
CN111652123B (en) Image processing and image synthesizing method, device and storage medium
CN111783511A (en) Beauty treatment method, device, terminal and storage medium
US20210158593A1 (en) Pose selection and animation of characters using video data and training techniques
CN102567716A (en) Face synthetic system and implementation method
KR102353556B1 (en) Apparatus for Generating Facial expressions and Poses Reappearance Avatar based in User Face
CN106033539A (en) Meeting guiding method and system based on video face recognition
JP2014194617A (en) Visual line direction estimating device, visual line direction estimating method, and visual line direction estimating program
CN111046976A (en) Virtual manicure try-on method based on deep learning
CN110728242A (en) Image matching method and device based on portrait recognition, storage medium and application
CN112699857A (en) Living body verification method and device based on human face posture and electronic equipment
CN113361387A (en) Face image fusion method and device, storage medium and electronic equipment
CN113362422A (en) Shadow robust makeup transfer system and method based on decoupling representation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141119

RJ01 Rejection of invention patent application after publication