CN102622613B - Hair style design method based on eyes location and face recognition - Google Patents

Hair style design method based on eyes location and face recognition Download PDF

Info

Publication number
CN102622613B
CN102622613B CN 201110423144 CN201110423144A CN102622613B CN 102622613 B CN102622613 B CN 102622613B CN 201110423144 CN201110423144 CN 201110423144 CN 201110423144 A CN201110423144 A CN 201110423144A CN 102622613 B CN102622613 B CN 102622613B
Authority
CN
China
Prior art keywords
face
image
hair
hair style
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.)
Expired - Fee Related
Application number
CN 201110423144
Other languages
Chinese (zh)
Other versions
CN102622613A (en
Inventor
彭强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Zhida letter Network Technology Co., Ltd.
Original Assignee
彭强
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 彭强 filed Critical 彭强
Priority to CN 201110423144 priority Critical patent/CN102622613B/en
Publication of CN102622613A publication Critical patent/CN102622613A/en
Application granted granted Critical
Publication of CN102622613B publication Critical patent/CN102622613B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a hair style design method based on eyes location and face recognition. The hair style design method comprises the following steps: S1) inputting a face image; S2) performing automatic eyes location on the face image, automatically identifying the face profile, displaying a eyes location point and a face profile line on the face image, and manually adjusting when the face profile is not enough accurately identified; then calculating face shape and size parameters to obtain the location information of the face image at last; S3) selecting a hair image in a database, and obtaining the location parameter of the hair image; S4) according to the location parameter of the hair image and the location information of the face image, automatically matching the face image with the hair image, and manually adjusting when the matching is not enough accurate; and S5) performing hair style design on the hair image. According to the hair style design method, the hair image and the face image can be automatically, simply and conveniently matched, and the hair image is designed and modified.

Description

A kind of hair styling method based on eyes location and shape of face identification
Technical field
The present invention relates to utilize the locating information of hair image and face image to realize the method for exact matching, and the method processed of synthetic images.
Background technology
In traditional barber shop, client usually can be directly by exchanging with stylist's oral account before haircut, and perhaps client's hair style picture that magazine, electronic equipment are stored of leafing through, allow the stylist with reference to design.Yet exist between client and hairdresser on speech and cognitive drop, and client can't learn in advance whether hair style previous and that the hairdresser is discussed out can be fit to oneself.In this case, after client's hair style design is completed, tend to find that actual effect is less than expection.
Having in present hair style design software is much first to import a face image, then selects a certain hair image from the inside, hair style storehouse, and the operator adjusts the size of face image and hair image and overlaps the position by handwork.Can there be a large amount of manual operation processes in this process, inefficiency.
In contrast, although have according to the face area shape, size, the position that calculate, the width of mediation face image and hair image and height, the method of automatically mating (seeing patented claim CN 101770574A), but, in the method, be to carry out manual localization process to face image before Auto-matching, automaticity is not high.
The method that patented claim CN 101404910A provides, realized human eye is located automatically, and then automatically detect the profile of people's face, then be in harmonious proportion face image and hair image width and the height, the coupling of automatically carrying out, but do not consider shape of face and the unmatched situation of hair image of input face image, belong to the face image of oval face such as the hair images match that is fit to round face with a width, can cause the not nature of coupling.
Summary of the invention
Technical matters to be solved by this invention is: a kind of hair styling method based on eyes location and shape of face identification is provided, and coupling hair image and facial image that the method can be automatic and easy, and the hair image is carried out Change In Design.
The technical solution adopted in the present invention is: a kind of hair styling method based on eyes location and shape of face identification comprises the following steps successively:
S1) face image acquisition module input face image;
S2) the face image locating module carries out eyes to face image and automatically locates, and face mask is identified automatically, and eyes anchor point and the face mask line that identifies is presented on face image, in the situation that identification is not accurate enough, manually adjusts; Then calculate shape and the size parameter of face, finally obtain the locating information of face image;
S3) hair style is selected to select hair image in database with matching module, and obtains its positional parameter (the hair image refers to only comprise hair information, does not comprise the image of facial information);
S4) hair style is selected the positional parameter that carries according to the hair image with matching module and the locating information of face image, and Auto-matching face image and hair image if mate not accurate enoughly, are manually adjusted;
S5) hair style design and processing module are carried out the hair style design processing to the hair image.
Described method, the detailed process of step S2 comprises:
S21) eyes of face image are located automatically, show detected eyes anchor point on face image, if identification is inaccurate, the operator makes the eyes anchor point more accurate by manual operations;
S22) calculate left eye centre of form E according to anchor point 1fTo right eye centre of form E 2fDistance C f, the left eye centre of form is to the distance A in image Far Left sideline f, the left eye centre of form apart from the character facial picture topmost the sideline apart from B f
S23) profile and face's eyebrow, the lip coordinate of face image are detected automatically, identify the face mask line of face image, and face's eyebrow coordinate position in face image, face's lip coordinate position in face image, and be presented on face image; If identification is inaccurate, the operator manually adjusts;
S24) calculate the width W of face image eyebrow place face according to face mask line and face's eyebrow, lip position coordinates 1f, face image lip place face width W 2f, the width W of face's the widest part in face image f, the height L of face in face image fAccording to face mask line and the face's width and the height parameter W that calculate 1f, W 2f, W f, L f, extrapolate the affiliated shape of face of this face image.
Described method, the method for extrapolating the affiliated shape of face of this face image in S24 is:
1. calculate the length breadth ratio L of face f/ W fIf, L f/ W fValue greater than 3/2, this shape of face with this character facial image is labeled as the elongated face; If L f/ W fValue less than 4/3, entered for the 2. step; If L f/ W fValue between 4/3 and 3/2, entered for the 3. step;
2. at L f/ W fValue less than 4/3 o'clock, calculate near the degree of crook of the face mask line face's the widest part in face image, concrete computing method are first to draw the horizontal line that the both ends, face left and right of face's the widest part connect, and are all L in the distance up and down of this horizontal line fTwo parallel lines are drawn in/7 place, obtain the intersection point of these two parallel lines and face mask line, all get the intersection point on the left side.Draw at last the angle of the tangent line of these two points, if the value of this angle just is labeled as square face with the shape of face of face in the hair style image than 25 ° little, if the value of this angle just is labeled as round face with the shape of face of this character facial image unlike 25 ° little;
3. at L f/ W fValue between 4/3 and 3/2 time, W relatively 1f, W 2f, W fBetween value, if W 2f/ W 1fValue less than 0.7, the shape of face of this character facial image is labeled as the inverted triangle face; If W 1f/ W 2fValue less than 0.7, it is labeled as foreign pears face; If 0.7<W 1f/ W 2f<1.43, and W 1f/ W f, W 2f/ W fAll more than or equal to 0.9, just it is labeled as the egg shape face, if W 1f/ W f, W 2f/ W fAll less than 0.9, just it is labeled as the diamond pattern face.
Described method, step S3 specifically comprises:
S31) input contains the hair style image of facial information;
S32) proofread and correct the hair style image, make people's face center line perpendicular to the horizontal edge of image;
S33) eyes in the face of hair style image are located automatically, identify the coordinate points E of the right and left eyes centre of form of face in the hair style image 1h, E 2h(the hair style image refers to both comprise hair information, also comprises the image of facial information);
S34) according to coordinate points E 1h, E 2h, calculate the left eye centre of form apart from the distance A in hair style picture Far Left sideline h, and the left eye centre of form apart from the hair style picture topmost the sideline apart from B h, the distance C in the hair style picture between the eyes centre of form h
S35) face mask of hair style image detected automatically, identify the face mask line of hair style image, and face's eyebrow coordinate position in the hair style image, face's lip coordinate position in the hair style image; If identify not accurate enoughly, carry out manual setting;
S36) according to face's eyebrow coordinate position in the hair style image, and the face mask line computation of the hair style image that identifies goes out the width W of face's eyebrow in hair style image place face 1hAccording to face's lip coordinate position in the hair style image, and the face mask line computation of the hair style image that identifies goes out the width W of face's lip in hair style image place face 2hScan the face mask line of hair style image, calculate the width W of face's the widest part in the hair style image hThe forehead peak of the face mask line of the hair style image that scanning recognition goes out and lower jaw minimum point calculate the height L of face of character facial image hAccording to face mask line and these width that calculates and height parameter W 1h, W 2h, W h, L h, extrapolate the shape of face of face in the hair style image;
S37) facial information in removal hair style image, obtain to have kept parameter information A h, B h, C h, W 1h, W 2h, L hThe hair image, and the shape of face under this hair style image is labeled as the resulting shape of face of previous step.
Described method, step S36 calculates that the method for face's shape of face is:
1. calculate the length breadth ratio L of face h/ W hIf, L h/ W hValue greater than 3/2, the shape of face with this hair style image is labeled as the elongated face; If L h/ W hValue less than 4/3, entered for the 2. step; If L h/ W hValue between 4/3 and 3/2, entered for the 3. step;
2. at L h/ W hValue less than 4/3 o'clock, calculate near the degree of crook of the face mask line face's the widest part in the hair style image, concrete account form is exactly first to draw the horizontal line that the both ends, face left and right of face's the widest part connect, and is all L in the distance up and down of this horizontal line hTwo parallel lines are drawn in/7 place, obtain the intersection point of these two parallel lines and face mask line, all get the intersection point on the left side.Draw at last the angle of the tangent line of these two intersection points, if the value of this angle just is labeled as square face with the shape of face of face in the hair style image than 25 ° little, if the value of this angle just is labeled as round face with the shape of face of this hair style image unlike 25 ° little;
3. at L h/ W hValue between 4/3 and 3/2 time, W relatively 1h, W 2h, W hBetween value, if W 2h/ W 1hValue less than 0.7, the shape of face with this hair style image is labeled as the inverted triangle face; If W 1h/ W 2hValue less than 0.7, it is labeled as foreign pears face; If 0.7<W 1h/ W 2h<1.43, and W 1h/ W h, W 2f/ W hAll more than or equal to 0.9, just it is labeled as the egg shape face, if W 1h/ W h, W 2h/ W hAll less than 0.9, just it is labeled as the diamond pattern face.
Described method, step S4 specifically comprises:
S41) face of contrast face image and hair style image height L f, L h, the left eye centre of form is to the distance C of the right eye centre of form f, C h, distinguish in the horizontal and vertically upper convergent-divergent hair image according to their ratio; And the left eye centre of form of hair style image is to the distance A in image Far Left sideline h, the left eye centre of form apart from the character facial picture topmost the sideline apart from B h, face image eyebrow place face width W 1h, face image lip place face width information W 2hAlso make equal proportion thereupon and change, obtain respectively new corresponding parameter A h', B h', W 1h', W 2h';
S42) according to the distance A of the left eye centre of form in the hair style image after face image and convergent-divergent to image Far Left sideline f, A h', the left eye centre of form apart from the character facial picture topmost the sideline apart from B f, B h', to the position that is complementary with face image, namely in two figure, the corresponding right and left eyes centre of form overlaps, and completes preliminary Auto-matching the hair style image translation;
S43) if the shape of face that the hair style image is fit to and character facial image shape of face are mated, finish the Auto-matching process of S4; If do not mate, contrast the width W of face image eyebrow place face 1f, W 1h', corresponding width information W in the width of lip place face and hair image 2f, W 2h', draw respectively two groups of stand outs
Figure BDA0000120983900000031
S44) according to two groups of stand outs
Figure BDA0000120983900000032
With the method for smearing processing, inside contracting or extending out to a certain degree carried out in hair image appointed area; If smear the respond well of processing, the hair style coupling is very accurate, finishes the matching process of S4, otherwise enters next step;
S45) if mate not accurate enoughly, the operator adjusts size and the position of hair image by manual operations, until perfect matching.
Described method in step S23 or S35, is used the human face characteristic positioning method based on active shape model, and face mask line, eyebrow coordinate position and lip coordinate position are detected.
Described method, the method for the hair image being carried out the hair style design processing comprises that hair style pruning, hair style adjustment, hair style are had hair dyed, manually improved looks or light is played up.
Described method, it also comprises step at last: the S6) plane/video teaching of plane/video teaching module by associating with every money hair image provides the study design cycle of moulding corresponding to hair image.And set up special advertisement position in plane/video teaching, and the every money hair style of design material used is mapped with relevant product, realize the accurate advertisement delivery.
Advantage of the present invention: the present invention is in the hair styling method based on eyes location and shape of face identification, suitable face image to input, automatically detect the eyes centre of form coordinate in the face image of inputting, and face mask, then according to the hair image with the comparison of parameter, horizontal or vertical zoomed image, the position of mating automatically hair image and face image.Automaticity is high, does not need operator's handwork, just can simply carry out this synthetic.
And the present invention is after the profile identification to face image, its shape of face is identified, and in the pre-service of hair image, its shape of face that is fit to is sorted out, so just can automatically list the hair image that can naturally mate this face image, avoided the operator to go manual searching.Even if the shape of face that selected hair image is fit to and the shape of face of face image are not mated, also can be after the operator have selected this hair image, to the hair image stretch automatically, deformation process, make the coupling face image that it finally also can nature.
After hair image in the database of completing character facial image and selection synthetic, can also the dyeing of hair image be pruned, and the processing of stretching, deformation, until reach satisfied final effect.
In a word, the present invention locates automatically by eyes and shape of face is identified automatically, hair image in automatic and easy coupling face image and database, and also the coupling of face image and hair image is not lost naturality.After coupling, can also prune by hair style, the hair dyeing of hair style adjustment, hair style, manually beauty treatment or light are played up, and revise design hair image.Client before haircut, just can be before display terminal the satisfied hair style design effect of preview oneself, and and the hairdresser come together to determine whole design cycle.The present invention is as a kind of desktop computer that is applicable to, and the hair styling method based on eyes location and shape of face identification of notebook computer and intelligent movable platform is widely used in hair style design industry.
Description of drawings
Fig. 1: the architecture of the hair styling method of identifying based on eyes location and shape of face.
Fig. 2: synthetic face image and hair integral image coupling process flow diagram.
Fig. 3: the concrete Auto-matching process of face image and hair image.
Fig. 4: client's character facial image.
Fig. 5: the eyes of client's character facial image are located key diagram.
Fig. 6: client's character facial image contour line is located key diagram.
Fig. 7: the eyes location key diagram of hair style picture face.
Fig. 8: hair style picture face mask line is located key diagram.
Fig. 9: the hair image shows figure after the facial information in removal hair style image.
Figure 10: the polymorphic type hair style of composograph is pruned the effect exploded view.
Figure 11: the profile cut operation exploded view of composograph.
Figure 12: the hair style adjusting operation exploded view of composograph.
Figure 13: the liquefaction algorithm principle is introduced key diagram.
Figure 14: the light rendering effect exploded view of composograph.
Figure 15: the liquefaction algorithm principle is introduced key diagram.
Symbol description:
E 1f: the left eye centre of form coordinate points of the character facial image that identifies.
E 2f: the right eye centre of form coordinate points of the character facial image that identifies.
A f: in the character facial image, the left eye centre of form is apart from the distance in character facial image Far Left sideline.
B f: in the character facial image, the left eye centre of form is apart from the distance in sideline, character facial image the top.
C f: the distance between the right and left eyes centre of form.
W 1f: the width of face's eyebrow place face in the character facial image.
W 2f: the width of face's lip place face in the character facial image.
W f: the width of face's the widest part face in the character facial image.
L f: face's height of character facial image.
E 1h: the left eye centre of form coordinate points of the hair style image that identifies.
E 2h: the right eye centre of form coordinate points of the hair style image that identifies.
A h: in hair image institute information, the left eye centre of form is apart from the distance in character facial picture Far Left sideline.
B h: in hair image institute information, the left eye centre of form is apart from the character facial picture distance in sideline topmost.
C h: the width between the eyes centre of form in hair image institute information.
L h: the face's height in hair image institute information.
W 1h: the width of face's eyebrow place face in hair image institute information.
W 2h: the width of face's lip place face in hair image institute information.
W h: the width of the widest part face of face in hair image institute information.
A h': after convergent-divergent hair image, in the hair image, the left eye centre of form is apart from the distance in character facial picture Far Left sideline.
B h': after convergent-divergent hair image, in the hair image, the left eye centre of form is apart from the distance in sideline, character facial picture the top.
W 1h': after convergent-divergent hair image, the width of face's eyebrow place face in the hair image.
W 2h': after convergent-divergent hair image, the width of face's lip place face in the hair image.
Figure BDA0000120983900000051
W 1fWith W 1h' difference.
Figure BDA0000120983900000052
W 2fWith W 2h' difference.
C h': after convergent-divergent hair image, the width between the eyes centre of form of hair image.
L h': after convergent-divergent hair image, the face of hair image height.
Embodiment
During practical application of the present invention, operate on desktop computer, notebook computer or intelligent movable platform.As shown in architecture Fig. 1, the present invention includes face image acquisition module, face image locating module, hair style selection and matching module, hair style design and the processing module, the plane/video teaching module that are connected successively.
The present invention mainly completes the hair style design based on eyes location and shape of face identification as follows: the input face image; Computing machine carries out eyes to face image and automatically locates, automatic identification with face mask, the eyes anchor point and the face mask line that identify are presented on face image, in the situation that identification is not accurate enough, can manually adjust anchor point and face mask line until accurately; Select hair image in database; The positional parameter that carries according to the hair image and the locating information of face image, Auto-matching face image and hair image also can be by manually adjusting, and the hair image and the face image that make reach the perfect matching effect; After coupling was completed, synthetic images carried out hair style pruning, hair style adjustment, hair style hair dyeing, manually beauty treatment or the light processing of playing up, and reached the hair style design effect of Customer Satisfaction.
Concrete scheme of the present invention is as follows:
S1) character facial image input.
S2) eyes of face image are located automatically, show detected eyes anchor point on face image, if identification is inaccurate, the operator can make the eyes anchor point more accurate by manual operations.
S3) calculate the left eye centre of form according to anchor point and arrive the image distance in sideline topmost to the distance of the right eye centre of form, distance, the left eye centre of form that the left eye centre of form arrives image Far Left sideline.
S4) profile and face's eyebrow, the lip coordinate of face image are detected automatically, show detected face mask line and face's eyebrow, lip position coordinates on face image.If identification is inaccurate, the operator can manually adjust the face mask line of the character facial image that identifies, and allows the face mask line mate more exactly the face mask of personage's face image; In like manner, also can adjust as required face's eyebrow position coordinates and the lip position coordinates of the character facial image that identifies.
S5) calculate the height of face in the width, face image of face's the widest part in the width, face image of width, the face image lip place face of face image eyebrow place face according to face mask line and face's eyebrow, lip position coordinates.According to face mask line and the face's width and the height parameter that calculate, extrapolate the affiliated shape of face of this face image.For eyes to face image are accurately located automatically, and detect the outline line of character facial, the character facial image of input is positive and face image do not covered face by hair preferably.
S6) anticipated in selection hair style storehouse, the hair image of containing parameter information (the hair image refers to only comprise hair information, does not comprise the image of facial information), the hair image of suitable this face image of the preferential displaying of hair style this moment storehouse meeting is for you to choose.Wherein, similar to preprocessing process and the face image of all hair images, all obtain each positional parameter of their correspondence, its key step comprises:
A) input contains the hair style image of facial information.(the hair style picture refers to both comprise hair information, also comprises the image of facial information)
B) proofread and correct the hair style image, make people's face center line perpendicular to the horizontal edge of picture.
C) the hair style picture that contains facial information is carried out eyes and automatically locate, and the outline line that automatically detects face.In addition, the professional can adjust locating information by manual operations, makes more accurate that in eyes anchor point and face mask line and hair style picture, face mates.
D) calculate the width of face's the widest part in the width, hair style picture of lip in the width, hair style picture of the position, the left eye centre of form of face area eyebrow place face in the distance of the right eye centre of form, hair style picture place face and the height of face according to anchor point and outline line.
E) facial information in removal hair style image, obtain the hair image that comprises locator data.
S7) according to the right and left eyes centre of form co-ordinate position information of the character facial image that calculates, width information between the eyes centre of form, the width of face's eyebrow place face in the character facial image, the width of face's lip place face in the character facial image, face's height in the character facial image, with in the hair image with the contrast of corresponding information, coupling personage's face image and hair image.
S8) height of contrast face image and hair image, the left eye centre of form be to the distance of the right eye centre of form, according to they ratio respectively in the horizontal and vertically upper convergent-divergent hair image.And, the left eye centre of form of hair image to the distance in image Far Left sideline, the left eye centre of form to image topmost the information such as width of the width of the distance in sideline, face image eyebrow place face, face image lip place face also make equal proportion thereupon and change.
S9) arrive the distance in sideline, image the top to distance, the left eye centre of form in image Far Left sideline according to the left eye centre of form in the hair image after face image and convergent-divergent, to the position that is complementary with face image, namely in two figure, the corresponding right and left eyes centre of form overlaps the hair image translation.Complete preliminary Auto-matching.
S10) if the shape of face that the hair image is fit to and character facial image shape of face are mated, at this moment the Auto-matching process is completed.If do not mate, contrast corresponding width information in the width of width, lip place face of face image eyebrow place face and hair image, draw two groups of stand outs.
S11) two groups of stand outs that draw according to S10 step to the appointed area liquefaction of hair image, make that hair is local, and inside contracting or extending out to a certain degree occur with the liquefaction algorithm, and wherein, degree is determined by above-mentioned stand out.So far the Auto-matching process is completed.
S12) if mate not accurate enoughly, the operator also can adjust by manual operations size and the position of hair image, or extends out or inside contract the hair image with the liquefaction algorithm at regional area, makes hair image and face image perfect matching.
S13) after the coupling of the hair image in the database of the character facial image of completing input and selection, the image after the method that can select to provide in software is completed coupling further designs processing.These methods comprise: hair style pruning, hair style adjustment, hair style are had hair dyed, manually improve looks or light is played up.
Below, with reference to accompanying drawing, explain the present invention.
The architecture of the hair styling method that is based on eyes location and shape of face identification that Fig. 1 represents; What Fig. 2 represented is synthetic face image and hair integral image coupling process flow diagram; What Fig. 3 represented is the detailed process of computing machine Auto-matching face image and hair image.Whole step comprises successively:
(1) character facial image of input.The character facial image of input is positive and face image do not covered face by hair preferably.As shown in Figure 4 in example
(2) computing machine is located automatically to the eyes of character facial image, identifies the coordinate points E of the eyes centre of form of character facial image 1f, E 2fIf identification is inaccurate, the operator can manually adjust E 1f, E 2f, make the location of the left eye centre of form and the right eye centre of form more accurate.
(3) according to coordinate points E 1f, E 2f, calculate the left eye centre of form apart from the distance A in character facial picture Far Left sideline f, and the left eye centre of form apart from the character facial image topmost the sideline apart from B f, the distance C between the eyes centre of form f, as shown in Figure 5 in example.
(4) computing machine detects automatically to the face mask of character facial image, the face mask line of the character facial image that identifies, and face's eyebrow coordinate position in the character facial image, face's lip coordinate position in the character facial image.If identification is inaccurate, the operator can manually adjust the face mask line of the character facial image that identifies, and allows the face mask line mate more accurately the face mask of personage's face image; In like manner, also can adjust as required face's eyebrow position coordinates of the character facial image that identifies, and face's lip position coordinates of character facial image.Can use the human face characteristic positioning method based on active shape model (ASM), face mask and face feature are detected automatically.Active shape model is a kind of image search method based on statistical model, is proposed the earliest by people such as T.F.Cootes.ASM describes the shape of target with some distributed model (Point Distribution Model, PDM).It is by carrying out statistical modeling to having certain representational same class target image.He is similar to active contour model theoretically, namely defines an energy function, by the adjustment model parameter, energy function is minimized.Utilize priori to carry out model preliminary examination in the target search process and locate, then utilize local texture model to carry out the unique point search, and utilize shape that shape rationally is similar to adjust.
(5) according to face's eyebrow coordinate position in the character facial image, and the face mask line computation of the character facial image that identifies goes out the width W of face's eyebrow in character facial image place face 1fAccording to face's lip coordinate position in the character facial image, and the face mask line computation of the character facial image that identifies goes out the width W of face's lip in character facial image place face 2fScan the face mask line of character facial image, calculate the width W of face's the widest part in the character facial image fThe forehead peak of the face mask line of the character facial image that goes out according to scanning recognition and the height L of the face that the lower jaw minimum point calculates the character facial image f, concrete as shown in Figure 6 in example.Extrapolate shape of face under this character facial image according to the outline line of character facial image and the face's width that calculates and height parameter, its detailed step comprises:
1. calculate the length breadth ratio L of face f/ W fIf, L f/ W fValue greater than 3/2, this shape of face with this character facial image is labeled as the elongated face; If L h/ W hValue less than 4/3, entered for the 2. step; If L h/ W hValue between 4/3 and 3/2, entered for the 3. step;
2. at L f/ W fValue less than 4/3 o'clock, calculate near the degree of crook of the face mask line face's the widest part in face image, concrete account form is exactly first to draw the horizontal line that the both ends, face left and right of face's the widest part connect, and is all L in the distance up and down of this horizontal line fTwo parallel lines are drawn in/7 place, obtain the intersection point of these two parallel lines and face mask line, all get the intersection point on the left side.Draw at last the angle (getting that less angle) of the tangent line of these two intersection points.If the value of this angle just is labeled as square face with the shape of face of face in the hair style image than the threshold value of setting is little, if the value of this angle just is labeled as round face with the shape of face of this character facial image greatly than the threshold value of setting, Threshold is 25 °;
3. at L f/ W fValue between 4/3 and 3/2 time, W relatively 1f, W 2f, W fBetween value, if W 2fMuch smaller than W 1f, i.e. W 2f/ W 1fValue less than 0.7, the shape of face with this character facial image is labeled as the inverted triangle face; If W 1fMuch smaller than W 2f, i.e. W 1f/ W 2fValue less than 0.7, it is labeled as positive triangle face (foreign pears face); If W 1fAnd W 2fVery approaching, again in two kinds of situation, if W fWith W 1f, W 2fValue very near (two groups of ratio W 1f/ W f, W 2f/ W fAll be not less than 0.9) just it is labeled as the egg shape face; Otherwise just it is labeled as the diamond pattern face;
(6) according to the shape of face under the character facial image extrapolated, the hair style storehouse can preferentially show be fit to this face image the hair image for you to choose, the operator also can select other hair image arbitrarily.Hair image in database was all anticipated, and contained specific parameter information.Anticipating of the hair image of mentioning in this step, its detailed step comprises:
A) input contains the hair style image of facial information.
B) proofread and correct the hair style image, make people's face center line perpendicular to the horizontal edge of image.
C) computing machine is located automatically to the eyes in the face of hair style image, identifies the coordinate points E of the eyes centre of form of face in the hair style image 1h, E 2h
D) according to coordinate points E 1h, E 2h, calculate the left eye centre of form apart from the distance A in hair style picture Far Left sideline h, and the left eye centre of form apart from the character facial picture topmost the sideline apart from B h, the distance C between the eyes centre of form h, as shown in Figure 7.
E) computing machine detects automatically to the face mask of hair style image, the face mask line of the character facial image that identifies, and face's eyebrow coordinate position in the character facial image, face's lip coordinate position in the character facial image.Because hair style image major part exists hair to cover the problem of face image, it is more accurate that face mask line and eyebrow, lip position coordinates need that manual operations go to adjust.
F) according to face's eyebrow coordinate position in the hair style image, and the face mask line computation of the hair style image that identifies goes out the width W of face's eyebrow in character facial image place face 1hAccording to face's lip coordinate position in the hair style image, and the face mask line computation of the hair style image that identifies goes out the width W of face's lip in character facial image place face 2hScan the face mask line of hair style image, calculate the width W of face's the widest part in the hair style image hThe forehead peak of the face mask line of the character facial image that scanning recognition goes out and lower jaw minimum point calculate the height L of face of character facial image h, as shown in Figure 8.According to face mask line and these width that calculates and height parameter, extrapolate the shape of face of face in the hair style image, its detailed step comprises:
1. calculate the length breadth ratio L of face h/ W hIf, L h/ W hValue greater than 3/2, this shape of face with face in this hair style image is labeled as the elongated face; If L h/ W hValue less than 4/3, entered for the 2. step; If L h/ W hValue between 4/3 and 3/2, entered for the 3. step;
2. at L h/ W hValue less than 4/3 o'clock, calculate near the degree of crook of the face mask line face's the widest part in the hair style image, concrete account form is exactly first to draw the horizontal line that the both ends, face left and right of face's the widest part connect, and is all L in the distance up and down of this horizontal line hTwo parallel lines are drawn in/7 place, obtain the intersection point of these two parallel lines and face mask line, all get the intersection point on the left side.Draw at last the angle (getting that less angle) of the tangent line of these two intersection points.If the value of this angle just is labeled as square face with the shape of face of face in the hair style image than the threshold value of setting is little, if the value of this angle just is labeled as round face with the shape of face of this hair style image greatly than the threshold value of setting, Threshold is 25 °;
3. at L h/ W hValue between 4/3 and 3/2 time, W relatively 1h, W 2h, W hBetween value, if W 2hMuch smaller than W 1h, i.e. W 2h/ W 1hValue less than 0.7, the shape of face with face in this hair style image is labeled as the inverted triangle face; If W 1hMuch smaller than W 2h, i.e. W 1h/ W 2hValue less than 0.7, it is labeled as positive triangle face (foreign pears face); If W 1hAnd W 2hVery approaching, again in two kinds of situation, if W hWith W 1h, W 2hValue very near (two groups of ratio W 1h/ W h, W 2h/ W hAll be not less than 0.9) just it is labeled as the egg shape face, otherwise just it is labeled as the diamond pattern face.
G) facial information in removal hair style image, obtain to have kept parameter information A h, B h, C h, W 1h, W 2h, L hThe hair image, and the shape of face under this hair style image is labeled as the shape of face that the hair image is fit to, as shown in Figure 9.Hair image and corresponding parameter information are written to data, complete the pre-service of hair image.Remove this process of facial information in the hair style image, can complete with the software photoshop that adobe company provides.
(7) according to the right and left eyes centre of form co-ordinate position information A of the character facial image that calculates f, B f, the width information C between the eyes centre of form f, the width W of face's eyebrow place face in the character facial image 1f, the width W of face's lip place face in the character facial image 2f, face's height L in the character facial image f, with in the hair image with the contrast of corresponding information, coupling personage's face image and hair image.
(8) respectively according to width C fAnd the width C between the eyes centre of form in hair image institute information hBetween ratio, the height L fWith the character facial height L in institute's information in the hair image hBetween ratio, horizontal and vertical convergent-divergent hair image makes C f=C h', L f=L h'.Wherein, C h', L h' be respectively C h, L hResult after variation.In addition, other parameters of convergent-divergent hair image, obtain new A in proportion h', B h', W 1h', W 2h'.
(9) with the hair image as upper tomographic image, face image is as bottom layer image, according to the left eye locating information A of two figure f, B fWith A h', B h', mobile hair style picture on the bottom picture makes the C of both correspondences f, C h' overlap, complete preliminary Auto-matching.
(10) if the shape of face that the hair image is fit to and character facial image shape of face are mated, the Auto-matching process is completed.If the shape of face that the hair image is fit to and character facial image shape of face are not mated, contrast corresponding width information in the width of width, lip place face of face image eyebrow place face and hair image, draw two groups of stand outs.
(11) calculate W 1fAfter convergent-divergent hair image, the width W of face's eyebrow place face in the hair image 1h' difference
Figure BDA0000120983900000101
Namely And W 2fAfter convergent-divergent hair image, the width W of face's eyebrow place face in the hair image 2h' difference
Figure BDA0000120983900000104
Namely According to
Figure BDA0000120983900000106
With
Figure BDA0000120983900000107
Value, extend out or inside contract the hair image with the liquefaction algorithm at regional area, make more natural that the figure of hair image and face mates.So far the Auto-matching process is completed.The basic functional principle of liquefaction algorithm is as follows:
In Figure 15, the shade annulus represents that a radius is r maxCircular constituency.Wherein, C is the center of circle in circular constituency, when C moves to M, causes the some U in image to transform to an X, and the inverse transformation formula of this coordinate transform is formula 1.Wherein
Figure BDA0000120983900000108
Be respectively a U, X, C, M be the position vector in coordinate system in the drawings.When providing a some X, can obtain the coordinate U (accurate floating-point coordinate) before its conversion, then draw near the pixel value of the pixel of image coordinate points U before changing.Find the solution by these pixel values are carried out bilinear interpolation, derive and namely draw the pixel value of an X.So each pixel in circular constituency is carried out evaluation, just can draw the image after conversion.
u r = x r = ( r max 2 - | x r - c r | 2 ( r max 2 - | x r - c r | 2 + | m r - c r | 2 ) ) 2 × ( m r - c r ) (formula 1)
(12) if mate not accurate enoughly, the operator also can adjust by manual operations size and the position of hair image, or extends out or inside contract the hair image with liquify tool at regional area, makes hair image and face image perfect matching.
(13) then the operator can also further process the image after synthetic with the image processing method of summary, and these methods mainly comprise: hair style pruning, hair style adjustment, hair style are had hair dyed, manually improve looks or light is played up.
The method that hair style in step (13) is pruned comprises following four kinds of methods:
1. straight snips: straight snips is the hair image to be pruned as template with border circular areas.When with template, the hair image being pruned, the hair image information of template overlay area can be wiped.The operator realizes the pruning work to the hair image, as shown in figure 10 by dragging the mode of mouse.
2. tooth is cut: it is the hair image to be pruned as template with jagged irregular area that tooth is cut, by the height of regulating sawtooth and the tooth cut-off-die plate that bottom width is set up different densities.When with template, the hair image being pruned, the hair image information of template overlay area can be wiped, and the hair that the sawtooth on template is encountered will be cut into jagged breach.Each jagged breach intersects and will form the thin silky effect that thins when dragging template fast with mouse, makes the hair image after pruning not lose naturality, has more stereovision.
3. profile is pruned: as shown in figure 11, the face mask line of face image is presented on composograph, and the operator can change the zone that the face mask line covers by point on the drag wheel profile, and the information of the hair image in capped zone can be wiped.The operator simply just can wipe unnecessary hair information by the mode that drags a little like this, realizes the function that hair style is pruned.
4. hair style is cloned: the operator first gets a point on the hair image by mouse, orientate source point as.Then mouse press drag in, near the hair information source point will by the complete zone that mouse drags that copies to, can realize lengthening the effect of hair like this.
Hair style adjustment in step (13): the operator can be simply by dragging the point of appointment on the hair image, and the hair image that stretches makes it more mate face image, as shown in figure 12.On the operator drags in the point of some marks, utilize the liquefaction algorithm to being carried out image deformation as the zone of the appointment radius in the center of circle and process to drag a little in the hair image, the basic functional principle of liquefaction algorithm is consistent with the principle of the middle introduction of embodiment (11).
As shown in architecture Fig. 1, the method for the hair style dyeing in step (13) comprises following four kinds of methods:
1. choose and dye: the operator smears the hair image by pressing the mode of mouse drag, and specifying needs the zone of having hair dyed in the hair image, and then the color of object of hair dyeing is provided, and just can easily realize changing the colouring information of application area, realizes hair dyeing effect.The mode of color change is: kept the brightness attribute of former hair color, form and aspect, the saturation attributes of color are revised.And in the place that the regional area of the hair image that is modified color attribute is connected with the part that is not modified, the effect that color is revised is that gradual manner weakens gradually, makes the whole structure after dyeing more natural.
2. colour code hair dyeing: the operator provides the color of object of hair dyeing, just can change the integral color information of hair image, realizes whole hair dyeing effect.The mode of color change is: kept the brightness attribute of former hair color, form and aspect, the saturation attributes of color are revised, made the stereovision of the hair image after being colored well be kept.
3. multiple dimensioned hair dyeing: on the hair image, acquiescence superposeed multilayer and the onesize figure layer of hair image, these figure layers all possess respectively the information of certain regional area of hair image.The operator only need to provide and want the color of object of having hair dyed just can change the figure layer color that these possess local region information like this, realizes like a cork the hair dyeing of regional area.The mode of color change is the brightness attribute that keeps former hair color, and form and aspect, the saturation attributes of color are modified, and makes the stereovision of the hair image after being colored well be kept.Like this operator can be very easily to hair some specific zones dyeing, and during the hair image blend of these figure layers and the bottom, those edges of regions and bottoms that are changed color attribute are that gradual change is merged, and make the effect of dyeing more natural.
4. path hair dyeing: the operator need at a plurality of points of hair image pickup, connect into the path.Extend out a certain size radius take this paths as the axle center, form the regional area of an appointment in the hair image, the operator get a little describe after, select or own adjustment required color, just easily realizing route is had hair dyed.The mode of color change is: kept the brightness attribute of former hair color, form and aspect, the saturation attributes of color are modified.In the regional area that is modified color attribute hair image and the place that is not modified part and is connected, the effect that color is revised weakens gradually with gradual manner, makes the whole structure after dyeing more natural.
As shown in architecture Fig. 1, the manual beauty treatment in step (13) comprises following two kinds of methods:
1. grind the skin anti-acne: face area is combined with Gaussian Blur algorithm and skin detection algorithm, face image is carried out anti-acne process.
2. skin is cloned: the operator first gets a point by mouse face area on composograph, orientates source point as.Then mouse press drag in, near the facial information source point will be by the complete zone that mouse drags that copies to, and can cover with skin area information preferably the skin area information of other parts like this.
In step (13), light is played up: add the effect of light-illuminating to composograph, as shown in figure 14.
By above-mentioned steps, the operator can design brand-new, beautiful moulding like a cork on the basis of the face image of inputting.
(14) after designing moulding, the stylist can also be by the plane/video teaching that associates with every money hair image, corresponding moulding, the design cycle of study hair image.
Plane/video teaching: hair image corresponding in the design flow diagram of each moulding on the website and design Video tutorials and database is associated, and operator (particularly stylist) just can learn according to the curricula on the website making flow process of this hair style (hair style refers to the effect that the hair image represents).And set up special advertisement position in plane/video teaching, and the every money hair style of design material used is mapped with relevant product, realize the accurate advertisement delivery.
Embodiment:
A kind of hair styling method architecture based on eyes location and shape of face identification that the present invention proposes comprises: hair image in coupling input face image and database, formation composograph as shown in Figure 1; Synthetic images carries out hair style design; Plane/video teaching;
S1) hair image in coupling input face image and database, the process that forms composograph comprises:
(1) character facial image input;
(2) eyes of face image are located automatically, show detected eyes anchor point on face image, if identification is inaccurate, the operator can make the eyes anchor point more accurate by manual operations;
(3) calculate the left eye centre of form according to anchor point and arrive the image distance in sideline topmost to the distance of the right eye centre of form, distance, the left eye centre of form that the left eye centre of form arrives image Far Left sideline;
(4) profile and face's eyebrow, the lip coordinate of face image are detected automatically, show detected face mask line and face's eyebrow, lip position coordinates on face image.If identification is inaccurate, the operator can manually adjust the face mask line of the character facial image that identifies, and allows the face mask line mate more exactly personage's face image face mask; In like manner, also can adjust as required the face's eyebrow position coordinates that identifies, and the lip position coordinates;
(5) according to the face mask line of face image and eyebrow, lip position coordinates, calculate the height of face in the width, face image of face's the widest part in the width, face image of width, the face image lip place face of face image eyebrow place face.According to face mask line and the face's width and the height parameter that calculate, extrapolate the affiliated shape of face of this face image.For eyes to face image are accurately located automatically, and detect the outline line of character facial, the character facial image of input is positive and face image do not covered face by hair preferably.
(6) anticipated in selection hair style storehouse, the hair image of containing parameter information (the hair image refers to only comprise hair information, does not comprise the image of facial information), the hair image of suitable this face image of the preferential displaying of hair style this moment storehouse meeting is for you to choose.Wherein, similar to preprocessing process and the face image of all hair images, all obtain each positional parameter of their correspondence.
(7) according to the right and left eyes centre of form co-ordinate position information of the character facial image that calculates, width information between the eyes centre of form, the width of face's eyebrow place face in the character facial image, the width of face's lip place face in the character facial image, face's height in the character facial image, with in the hair image with the contrast of corresponding information, coupling personage's face image and hair image.
(8) height of contrast face image and hair image, the left eye centre of form be to the distance of the right eye centre of form, according to they ratio respectively in the horizontal and vertically upper convergent-divergent hair image.And, the left eye centre of form of hair image to the distance in Far Left sideline, the left eye centre of form to image topmost the information such as width of the width of the distance in sideline, face image eyebrow place face, face image lip place face also make equal proportion thereupon and change.
(9) arrive the distance in sideline, image the top to distance, the left eye centre of form in image Far Left sideline according to the left eye centre of form in the hair image after face image and convergent-divergent, to the position that is complementary with face image, namely in two figure, the corresponding right and left eyes centre of form overlaps the hair image translation.Complete preliminary Auto-matching.
(10) if the shape of face that the hair image is fit to and character facial image shape of face are mated, at this moment the Auto-matching process is completed.If do not mate, contrast corresponding width information in the width of width, lip place face of face image eyebrow place face and hair image, draw two groups of stand outs.
(11) two groups of stand outs that draw according to S10 step to the appointed area liquefaction of hair image, make that hair is local, and inside contracting or extending out to a certain degree occur with the liquefaction algorithm, and wherein, degree is determined by above-mentioned stand out.So far the Auto-matching process is completed.
(12) if mate not accurate enoughly, the operator also can adjust by manual operations size and the position of hair image, or extends out or inside contract the hair image with the liquefaction algorithm at regional area, makes hair image and face image perfect matching.
S2) the composograph process of carrying out hair style design comprises:
(1) hair style is pruned, and the hair image is carried out pruning modes;
(2) the hair image is adjusted in hair style adjustment, make that itself and face image fit better;
(3) hair style dyeing adds Color for synthetic image, makes moulding seem more fashion;
(4) manually beauty treatment, process face image, beautifies composograph;
(5) light is played up, and adds the effect of light-illuminating to composograph, completes final hair style design process;
S3) plane/video teaching: offer one of stylist and learn easily passage, learn cutting, the operating process of the different hair styles of more moneys.

Claims (8)

1. hair styling method based on eyes location and shape of face identification is characterized in that: comprise connected, face image locating module, hair style selection and matching module, hair style design and processing module successively, comprise the following steps successively:
S1) face image acquisition module input face image;
S2) the face image locating module carries out eyes to face image and automatically locates, and face mask is identified automatically, and eyes anchor point and the face mask line that identifies is presented on face image, in the situation that identification is not accurate enough, manually adjusts; Then calculate shape and the size parameter of face, finally obtain the locating information of face image;
S3) hair style is selected to select hair image in database with matching module, and obtains its positional parameter;
S4) hair style is selected the positional parameter that carries according to the hair image with matching module and the locating information of face image, and Auto-matching face image and hair image if mate not accurate enoughly, are manually adjusted;
S5) hair style design and processing module are carried out the hair style design processing to the hair image;
The detailed process of described step S2 comprises:
S21) eyes of face image are located automatically, show detected eyes anchor point on face image, if identification is inaccurate, the operator makes the eyes anchor point more accurate by manual operations;
S22) calculate left eye centre of form E according to anchor point 1fTo right eye centre of form E 2fDistance C f, the left eye centre of form is to the distance A in image Far Left sideline f, the left eye centre of form apart from the character facial picture topmost the sideline apart from B f
S23) profile and face's eyebrow, the lip coordinate of face image are detected automatically, identify the face mask line of face image, and face's eyebrow coordinate position in face image, face's lip coordinate position in face image, and be presented on face image; If identification is inaccurate, the operator manually adjusts;
S24) calculate the width W of face image eyebrow place face according to face mask line and face's eyebrow, lip position coordinates 1f, face image lip place face width W 2f, the width W of face's the widest part in face image f, the height L of face in face image fAccording to face mask line and the face's width and the height parameter W that calculate 1f, W 2f, W f, L f, extrapolate the affiliated shape of face of this face image.
2. method according to claim 1, is characterized in that, the method for extrapolating the affiliated shape of face of this face image in S24 is:
1. calculate the length breadth ratio L of face f/ W fIf, L f/ W fValue greater than 3/2, this shape of face with this character facial image is labeled as the elongated face; If L f/ W fValue less than 4/3, entered for the 2. step; If L f/ W fValue between 4/3 and 3/2, entered for the 3. step;
2. at L f/ W fValue less than 4/3 o'clock, calculate near the degree of crook of the face mask line face's the widest part in face image, concrete computing method are first to draw the horizontal line that the both ends, face left and right of face's the widest part connect, and are all L in the distance up and down of this horizontal line fTwo parallel lines are drawn in/7 place, obtain the intersection point of these two parallel lines and face mask line, all get the intersection point on the left side, draw at last the angle of the tangent line of these two points, if the value of this angle just is labeled as square face with the shape of face of face in the hair style image than 25 ° little, if the value of this angle just is labeled as round face with the shape of face of this character facial image unlike 25 ° little;
3. at L f/ W fValue between 4/3 and 3/2 time, W relatively 1f, W 2f, W fBetween value, if W 2f/ W 1fValue less than 0.7, the shape of face of this character facial image is labeled as the inverted triangle face; If W 1f/ W 2fValue less than 0.7, it is labeled as foreign pears face; If 0.7<W 1f/ W 2f<1.43, and W 1f/ W f, W 2f/ W fAll more than or equal to 0.9, just it is labeled as the egg shape face, if W 1f/ W f, W 2f/ W fAll less than 0.9, just it is labeled as the diamond pattern face.
3. method according to claim 1, is characterized in that, step S3 specifically comprises:
S31) input contains the hair style image of facial information;
S32) proofread and correct the hair style image, make people's face center line perpendicular to the horizontal edge of image;
S33) eyes in the face of hair style image are located automatically, identify the coordinate points E of the right and left eyes centre of form of face in the hair style image 1h, E 2h
S34) according to coordinate points E 1h, E 2h, calculate the left eye centre of form apart from the distance A in hair style picture Far Left sideline h, and the left eye centre of form apart from the hair style picture topmost the sideline apart from B h, the distance C in the hair style picture between the eyes centre of form h
S35) face mask of hair style image detected automatically, identify the face mask line of hair style image, and face's eyebrow coordinate position in the hair style image, face's lip coordinate position in the hair style image; If identify not accurate enoughly, manually adjust;
S36) according to face's eyebrow coordinate position in the hair style image, and the face mask line of the hair style image that identifies, calculate the width W of face's eyebrow in hair style image place face 1hAccording to face's lip coordinate position in the hair style image, and the face mask line of the hair style image that identifies, calculate the width W of face's lip in hair style image place face 2hScan the face mask line of hair style image, calculate the width W of face's the widest part in the hair style image hThe forehead peak of the face mask line of the hair style image that scanning recognition goes out and lower jaw minimum point calculate the height L of face of character facial image hAccording to face mask line and these width that calculates and height parameter W 1h, W 2h, W h, L h, extrapolate the shape of face of face in the hair style image;
S37) facial information in removal hair style image, obtain to have kept parameter information A h, B h, C h, W 1h, W 2h, L hThe hair image, and the shape of face under this hair style image is labeled as the resulting shape of face of previous step.
4. method according to claim 3, is characterized in that, step S36 calculates that the method for face's shape of face is:
1. calculate the length breadth ratio L of face h/ W hIf, L h/ W hValue greater than 3/2, the shape of face with this hair style image is labeled as the elongated face; If L h/ W hValue less than 4/3, entered for the 2. step; If L h/ W hValue between 4/3 and 3/2, entered for the 3. step;
2. at L h/ W hValue less than 4/3 o'clock, calculate near the degree of crook of the face mask line face's the widest part in the hair style image, concrete account form is exactly first to draw the horizontal line that the both ends, face left and right of face's the widest part connect, and is all L in the distance up and down of this horizontal line hTwo parallel lines are drawn in/7 place, obtain the intersection point of these two parallel lines and face mask line, all get the intersection point on the left side, draw at last the angle of the tangent line of these two intersection points, if the value of this angle just is labeled as square face with the shape of face of face in the hair style image than 25 ° little, if the value of this angle just is labeled as round face with the shape of face of this hair style image unlike 25 ° little;
3. at L h/ W hValue between 4/3 and 3/2 time, W relatively 1h, W 2h, W hBetween value, if W 2h/ W 1hValue less than 0.7, the shape of face with this hair style image is labeled as the inverted triangle face; If W 1h/ W 2hValue less than 0.7, it is labeled as foreign pears face; If 0.7<W 1h/ W 2h<1.43, and W 1h/ W h, W 2f/ W hAll more than or equal to 0.9, just it is labeled as the egg shape face, if W 1h/ W h, W 2h/ W hAll less than 0.9, just it is labeled as the diamond pattern face.
5. method according to claim 3, is characterized in that, step S4 specifically comprises:
S41) face of contrast face image and hair style image height L f, L h, the left eye centre of form is to the distance C of the right eye centre of form f, C h, distinguish in the horizontal and vertically upper convergent-divergent hair image according to their ratio; And the left eye centre of form of hair style image is to the distance A in image Far Left sideline h, the left eye centre of form apart from the character facial picture topmost the sideline apart from B h, face image eyebrow place face width W 1h, face image lip place face width information W 2hAlso make equal proportion thereupon and change, obtain respectively new corresponding parameter A h', B h', W 1h', W 2h';
S42) according to the distance A of the left eye centre of form in the hair style image after face image and convergent-divergent to image Far Left sideline f, A h', the left eye centre of form apart from the character facial picture topmost the sideline apart from B f, B h', to the position that is complementary with face image, namely in two figure, the corresponding right and left eyes centre of form overlaps, and completes preliminary Auto-matching the hair style image translation;
S43) if the shape of face that the hair style image is fit to and character facial image shape of face are mated, finish the Auto-matching process of S4; If do not mate, contrast the width W of face image eyebrow place face 1f, W 1h', corresponding width information W in the width of lip place face and hair image 2f, W 2h', draw respectively two groups of stand out ▽ W 1, ▽ W 2
S44) according to two groups of stand out ▽ W 1, ▽ W 2, with the method for smearing processing, inside contracting or extending out to a certain degree carried out in hair image appointed area; If the liquefaction algorithm process is respond well, the hair style coupling is very accurate, finishes the matching process of S4, otherwise enters next step;
S45) if mate not accurate enoughly, the operator adjusts size and the position of hair image by manual operations, until perfect matching.
6. according to claim 1 or 3 described methods, is characterized in that: in step S23 or S35, use the human face characteristic positioning method based on active shape model, face mask line, eyebrow coordinate position and lip coordinate position are detected.
7. method according to claim 1 is characterized in that: the hair image is carried out the method that hair style design processes comprise hair style prunings, hair style adjustment, hair style hair dyeing, manually improve looks or light is played up.
8. method according to claim 1, is characterized in that, it also comprises step at last: the S6) plane/video teaching of plane/video teaching module by associating with every money hair image provides the design cycle of the corresponding moulding of hair image; And set up special advertisement position in plane/video teaching, and the every money hair style of design material used is mapped with relevant product, realize the accurate advertisement delivery.
CN 201110423144 2011-12-16 2011-12-16 Hair style design method based on eyes location and face recognition Expired - Fee Related CN102622613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110423144 CN102622613B (en) 2011-12-16 2011-12-16 Hair style design method based on eyes location and face recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110423144 CN102622613B (en) 2011-12-16 2011-12-16 Hair style design method based on eyes location and face recognition

Publications (2)

Publication Number Publication Date
CN102622613A CN102622613A (en) 2012-08-01
CN102622613B true CN102622613B (en) 2013-11-06

Family

ID=46562523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110423144 Expired - Fee Related CN102622613B (en) 2011-12-16 2011-12-16 Hair style design method based on eyes location and face recognition

Country Status (1)

Country Link
CN (1) CN102622613B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140207608A1 (en) * 2013-01-23 2014-07-24 Cortney Leupke System of Providing an Enhanced Salon Experience
CN103310234B (en) * 2013-07-03 2016-04-27 深圳时尚空间网络有限公司 The method of coupling hair style, dress ornament and/or accessories is obtained based on face signature analysis
WO2015029372A1 (en) * 2013-08-30 2015-03-05 パナソニックIpマネジメント株式会社 Makeup assistance device, makeup assistance system, makeup assistance method, and makeup assistance program
CN103455800A (en) * 2013-09-09 2013-12-18 苏州大学 Advertisement system based on intelligent identification and method for pushing corresponding advertisement
CN104866807B (en) * 2014-02-24 2019-09-13 腾讯科技(深圳)有限公司 A kind of Face detection method and system
CN105320921B (en) * 2014-07-31 2019-07-19 腾讯科技(深圳)有限公司 Eyes localization method and eyes positioning device
CN104484664B (en) * 2014-12-31 2018-03-20 小米科技有限责任公司 Face picture treating method and apparatus
CN104794275A (en) * 2015-04-16 2015-07-22 北京联合大学 Face and hair style matching model for mobile terminal
CN105045968B (en) * 2015-06-30 2019-02-12 青岛理工大学 A kind of hair styling method and system
CN105022877A (en) * 2015-07-17 2015-11-04 江西洪都航空工业集团有限责任公司 Intelligent eye-brow shaping machine
CN105117445A (en) * 2015-08-13 2015-12-02 北京建新宏业科技有限公司 Automatic hairstyle matching method, device and system
CN106096128A (en) * 2016-06-08 2016-11-09 吴雨欢 A kind of method and system of hair style coupling
CN105844267A (en) * 2016-06-14 2016-08-10 皖西学院 Face recognition algorithm
CN106971164B (en) * 2017-03-28 2020-02-04 北京小米移动软件有限公司 Face shape matching method and device
CN107545051A (en) * 2017-08-23 2018-01-05 武汉理工大学 Hair style design system and method based on image procossing
CN109522773A (en) * 2017-09-18 2019-03-26 丽宝大数据股份有限公司 Biological information analytical equipment and its shape of face detection method
CN108805046B (en) * 2018-05-25 2022-11-04 京东方科技集团股份有限公司 Method, apparatus, device and storage medium for face matching
CN110188590B (en) * 2019-04-09 2021-05-11 浙江工业大学 Face shape distinguishing method based on three-dimensional face model
CN110349202B (en) * 2019-07-05 2021-07-20 合肥聚美网络科技有限公司 Hairstyle design method based on face analysis
CN110738126A (en) * 2019-09-19 2020-01-31 平安科技(深圳)有限公司 Lip shearing method, device and equipment based on coordinate transformation and storage medium
CN111182350B (en) * 2019-12-31 2022-07-26 广州方硅信息技术有限公司 Image processing method, device, terminal equipment and storage medium
CN111898513A (en) * 2020-07-24 2020-11-06 星业(海南)科技有限公司 Method and system for processing hairstyle of face image
CN113628350A (en) * 2021-09-10 2021-11-09 广州帕克西软件开发有限公司 Intelligent hair dyeing and testing method and device
CN113763286A (en) * 2021-09-27 2021-12-07 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN114399787B (en) * 2021-12-09 2022-10-21 慧之安信息技术股份有限公司 Cow face identification method based on AI

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1369842A (en) * 2001-02-16 2002-09-18 无敌科技(西安)有限公司 Computer aided design system for dress and hair style
CN101770574A (en) * 2010-01-22 2010-07-07 黄禹 Method for positioning eyes and identifying facial form

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3542958B2 (en) * 2000-07-03 2004-07-14 ファイルド株式会社 Hair design system and its use
US7039222B2 (en) * 2003-02-28 2006-05-02 Eastman Kodak Company Method and system for enhancing portrait images that are processed in a batch mode

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1369842A (en) * 2001-02-16 2002-09-18 无敌科技(西安)有限公司 Computer aided design system for dress and hair style
CN101770574A (en) * 2010-01-22 2010-07-07 黄禹 Method for positioning eyes and identifying facial form

Also Published As

Publication number Publication date
CN102622613A (en) 2012-08-01

Similar Documents

Publication Publication Date Title
CN102622613B (en) Hair style design method based on eyes location and face recognition
US11908052B2 (en) System and method for digital makeup mirror
CN101779218B (en) Makeup simulation system, makeup simulation apparatus, makeup simulation method, and makeup simulation program
CN105844706B (en) A kind of full-automatic three-dimensional scalp electroacupuncture method based on single image
US10799010B2 (en) Makeup application assist device and makeup application assist method
CN107123083B (en) Face edit methods
US5875265A (en) Image analyzing and editing apparatus using psychological image effects
CN102708575A (en) Daily makeup design method and system based on face feature region recognition
CN103456010A (en) Human face cartoon generation method based on feature point localization
JP5261586B2 (en) Makeup simulation system, makeup simulation apparatus, makeup simulation method, and makeup simulation program
Phan et al. Color orchestra: Ordering color palettes for interpolation and prediction
CN105045968B (en) A kind of hair styling method and system
CN104798101A (en) Makeup support device, makeup support method, and makeup support program
CN105913416A (en) Method for automatically segmenting three-dimensional human face model area
CN102831584B (en) Data-driven object image restoring system and method
CN104239855B (en) Image style transfer synthesis method based on stroke synthesis
CN107153805A (en) Customize makeups servicing unit and method
CN107545576A (en) Image edit method based on composition rule
CN108920490A (en) Assist implementation method, device, electronic equipment and the storage medium of makeup
WO2018005884A1 (en) System and method for digital makeup mirror
CN109993838A (en) Method and system is sent out in virtual examination based on WebGL and human face rebuilding
CN106327231A (en) Personalized commodity matching and recommending system and method
CN104978708B (en) Interactive colored woodcut digital synthesis method out of print
CN111046976A (en) Virtual manicure try-on method based on deep learning
Lee et al. Emotion-inspired painterly rendering

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: WUHAN ZHIDAXIN NETWORK TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: PENG QIANG

Effective date: 20140401

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 430074 WUHAN, HUBEI PROVINCE TO: 430070 WUHAN, HUBEI PROVINCE

TR01 Transfer of patent right

Effective date of registration: 20140401

Address after: 430070 Hubei Province, Wuhan city Hongshan District Wuluo road 717, Siu Fu International Building room 1502

Patentee after: Wuhan Zhida letter Network Technology Co., Ltd.

Address before: 430074 Hubei city of Wuhan province Luo Shi Road No. 120 Wuhan University of Technology east campus hospital consists of No. 4 Building Room 1012

Patentee before: Peng Qiang

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20131106

Termination date: 20161216

CF01 Termination of patent right due to non-payment of annual fee