CN101339612B - Face contour checking and classification method - Google Patents

Face contour checking and classification method Download PDF

Info

Publication number
CN101339612B
CN101339612B CN2008101506710A CN200810150671A CN101339612B CN 101339612 B CN101339612 B CN 101339612B CN 2008101506710 A CN2008101506710 A CN 2008101506710A CN 200810150671 A CN200810150671 A CN 200810150671A CN 101339612 B CN101339612 B CN 101339612B
Authority
CN
China
Prior art keywords
face
ratio
contour
curve
cheek
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
CN2008101506710A
Other languages
Chinese (zh)
Other versions
CN101339612A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN2008101506710A priority Critical patent/CN101339612B/en
Publication of CN101339612A publication Critical patent/CN101339612A/en
Application granted granted Critical
Publication of CN101339612B publication Critical patent/CN101339612B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to an image processing method, in particular to a detecting and classifying method of facial-form contours. The invention aims at solving the problems in the prior art that the accurate facial-form contour can not detected and the techniques can not be really applied to the facial-form classification. The invention provides the technical proposal that: the step 1, the human face is positioned; the step 2, the facial contour is detected: an egg-shaped face is set into a vector closed and symmetrical curve Lm that consists of one or a plurality of points, and then, the forehead height, the chin height, the abscissa position that keeps to the sides of the left cheek and the right cheek extremely and the gill shape are modified; the step 3, the facial forms are classified. The invention can provide the effective and automatic image processing measures for a plurality of industries such as image design, facial make-up, hairdressing, jewelry, face-painting, entertainment, and the like, and provides the automated and objective technical support for a plurality of applied industries.

Description

A kind of detection of face contour and sorting technique
Technical field
The present invention relates to a kind of image processing method, relate to a kind of detection and sorting technique of face contour especially.
Background technology
Raising day by day along with China people living standard, people increase rapidly in the demand of self-image design aspect, synchronous therewith, pairing service industry, as image design, cosmetology, custom jewelry, cosmetic amusement etc., also just develop towards personalized, specialized, scientific, informationalized direction.A lot of occasions in these fields, service provider need make corresponding design or recommendation according to client's shape of face when products ﹠ services are provided, wear as hair style selection, jewellery etc.In daily life, comprise the historical records from our country, people's shape of face is had some typical classification method, for example, a kind of method is divided into seven kinds (referring to Fig. 3) such as round face, square face, egg face, brill type face, triangle face, long face, foreign pears faces to shape of face.At these shapes of face, although people also sum up many widely rules of approval in long-term practice, for example, the people of which kind of shape of face is fit to which kind of hair style, jewellery etc., but irregular the differing of attendant's level of these industries is difficult to judge accurately for the client provides high level, science at present.The deviation that human factor produced exists often, and the shape of face of arbitrarily making is judged and made the client be difficult to convince and satisfaction based on the service that this result provided.This state of the art has greatly limited the service quality and the development of these industries.Fundamental purpose of the present invention is exactly the image processing method that a kind of science is provided for these industries, makes people evidence-based when work, and science is quick, information-based, digitizing.
Flame Image Process is the important component part in present multimedia technology and signal processing technology field, wherein the people's face in the image being carried out detection and Identification is that the researchist has carried out a technology for many years, obtained abundant technological achievement, and obtained effectively to use in fields such as multimedia processing, camera technique, security protection, public security.
At present, the people's face position in the image detected and locate relatively effective method, for example: adopt classical H aar method for detecting human face etc.These class methods can be carried out detection and location to the people's face in the image.Its basic skills is, at first carries out modeling by front or side feature to people's face, sets up feature database, then, in use entire image scanned and mates, and determines whether there is people's face in the image, and particular location (referring to Fig. 1); Next is the profile of the definite face in definite back, people's face position in image.In Flame Image Process, people have also proposed to carry out the method that profile (edge) detects, as Canny, and Sobel, Prewitt etc.In the Canny method, by local maximum gray scale gradient in the searching image, and the method for setting thresholding is differentiated each marginal position in the image.But because this method is not supposed the content of image, the profile that will obtain there are not any hypothesis and requirement yet, therefore, when a width of cloth facial image is handled, because the factor of light when taking, can obtain the profile testing result of discontinuous, a complexity that the edge is concavo-convex in most cases, especially locate, as shown in Figure 2 at hair, chin etc.Therefore this method can not get face contour, also just more can't utilize this result to carry out the shape of face classification.Also there is same problem in other edge detection method.
Therefore usually the said face recognition technology of people in fact is only to comprise two, the degree of closeness of the characteristics of image of nose face in an interior rectangular area in the comparison people face, does not have direct relation with facial contour.That is to say and existing utilize prior art to detect to obtain face contour accurately, therefore can't really this class technology be applied to carry out the shape of face classification.
Summary of the invention
The detection and the sorting technique that the purpose of this invention is to provide a kind of face contour obtain face contour accurately to overcome can't detecting that prior art exists, and therefore can't really this class technology be applied to carry out the problem that shape of face is classified.
For overcoming the problem that prior art exists, technical scheme provided by the invention is:
A kind of detection of face contour and sorting technique may further comprise the steps:
Step (one): people's face location
Adopt conventional detection to detect the position of one or more people face in the arbitrary image, and provide the rectangular area ABCD of face, wherein the coordinate to angular vertex is A (Xa, Ya), and C (Xc, Yc), the coordinate O of central point O ((Xa+Xc)/2, (Ya+Yc)/2);
Step (two): facial contour detects
The basic model of at first setting face contour is one and forms vector sealing symmetrical curve L by some spots m, its coordinate sequence is (x i, y i), 1=1,2 .., M; With the egg type face in common seven kinds of shapes of face as basic model.
Make (x i, y i) the height y of coordinate iUniformly-spaced change, so only need determine the horizontal ordinate x of each point iJust can determine face contour.The horizontal ordinate that defines this profile central shaft is 0, and does normalization so that face is wide, and promptly establishing face wide is 1, and the face height is determined subsequently with ratio.
With vector curve L mThe center overlap with the central point O of face, be benchmark with the size of the rectangular area ABCD of face, be reference point with O, to L mIt is flexible to make vector, makes L mThe K of summit up and down 1, K 2, K 3, K 4Cut each edge of the scope ABCD of face respectively, with the initial value L of each curvilinear coordinates at this moment as face contour 0At initial profile L 0The basis on, the details at each position of face revised, comprising the horizontal ordinate position that the height of forehead, the height of chin, left and right sides cheek keep to the side most, be described below respectively,
(1) height of forehead is determined: the top of forehead generally is the junction of more shallow forehead skin and darker hair, the line of promptly gaining fame and fortune
The step of revising is:
(a) in human face region rectangle ABCD, take out the part B of the centre 1/2 in last 1/4 zone 1, represent that with shade the latter half is a forehead in this part image, the first half is a hair.
(b) determine the to gain fame and fortune detection criteria of line: with area B 1The picture element gray level G at interior each some place XyBe divided into N interval, the gray level of adding up all picture elements, the picture element interval of searching number minimum is with the gray level thresholding G of this interval intermediate value as the line pixel of gaining fame and fortune T
(c) in area B 1In, bottom-up, the gray level of statistics every each pixel of row in the image of getting is higher than thresholding G TThe number of point, in certain delegation, be higher than thresholding G TThe number of pixel and the ratio of the total number of this row pixel be higher than at 1/7 o'clock, determine the residing upright position of this row gain fame and fortune exactly line, the i.e. top of forehead.
(d) according to the upright position on forehead top, the flexible L that adjusts 0, make summit K on it 1Overlap with this upright position, revised contour curve is kept at L 1In.
If,, at this moment just keep initial value L with not satisfying the condition of above-mentioned (c) because the whole coverings of line of will gaining fame and fortune of the hair of facial image can not find in the photo at all 0Constant;
(2) determining of chin height: the upright position of chin is the junction of the dark color (illumination is weak) of light areas of chin (illumination is stronger) and neck, and determining step is:
(a) in human face region rectangle ABCD, vertically extract facial in the middle of 1/3 zone, bottom-up 1/10 the area B of getting 2
(b) to area B 2In pixel grayscale summation of each row and that delegation's correspondence of value minimum be exactly the height and position of chin.
(c) according to the upright position of chin, the flexible L that adjusts 1, revised contour curve is kept at L 2In.
(3) left and right sides cheek determines
(a) remove vertical part of middle 1/3 in the human face region rectangle ABCD, two zones are B 31And B 32
(b) be B to the zone 31And B 32The gray level of each row pixel sue for peace;
(c) search left field B 31The zone and the right side area B of W/15 width on the left side 32The zone of W/15 width on the right in the minimum value of each row pixel grayscale sum, obtain the horizontal ordinate position of left and right sides cheek.
(d) according to the horizontal level of cheek, level is stretched and is adjusted L 2, revised contour curve is kept at L 3In.
Step (three): shape of face classification
After obtaining the face contour curve, can utilize existing method to classify.
In the above-mentioned steps (two), can also comprise the revision of (4) cheek shape, its concrete steps are:
(a) Lower Half of taking out human face region ABCD separately assigns to extract the image of people's face cheek;
(b) utilize the Canny method to carry out rim detection, obtain some discontinuous contour edges at cheek;
(c) find out the longest lines l of length in the many contour edge lines of cheek, preserve the coordinate (x that is had a few of these root lines j, y j), j=1,2 ..., P;
(d) adopt following surface function to simulate the cheek curve data of egg type face model,
x i=0.5 sin α i+k(sin β i) 0.4
y i=0.5·i/N
K=1 wherein, i=0,1,2 ..., N, N=M/4-1 obtains one group of α and β thus.Then, in this function, only need regulate the k value and can change the cheek curvature of curve, form various cheek shape;
(e) utilize above-mentioned function, the k value changed from-0.1 to 0.1, seek with (c) in the most identical curve of lines l that finds, make on each height, the horizontal range mean square deviation minimum of this curve and lines l, these lines are cheek best edge curve;
(f), replace L according to the best edge curve 3In respective coordinates, revised contour curve is kept among the L.
In the above-mentioned steps (three), the sorting technique that is adopted is specifically: according to facial contour calculated characteristics parameter as a result, then characteristic parameter and classification thresholding are compared, the final the most representative characteristic parameter of shape of face classification that obtains: the ratio H2W_RATIO that the face height is wide with face, the ratio XB_RATIO that chin is wide and face is wide, the ratio ET_RATIO that forehead is wide and face is wide, the ratio LS_RATIO that two cheeks are wide and face is wide, chin curvature YJ_RATIO2, utilize these eigenwerts to add up, can obtain concrete classification threshold parameter, provide the Rule of judgment of a simple shape of face classification in the table below
The shape of face title Condition (with relation)
Microscler face H2W_RATIO>=1.43
The egg type face H2W_RATIO>=1.33 H2W_RATIO<1.40
Round face H2W_RATIO<1.30
The shape of face title Condition (with relation)
Side's face LS_RATIO+ET_RATIO>=1.51 ET_RATIO>0.7 LS_RATIO>0.76
Heart-shaped face XB_RATIO<0.48 LS_RATIO<=0.69 ET_RATIO>=0.75 YJ_RATIO2<-0.03
The ocean pears XB_RATIO>=0.55 LS_RATIO>=0.80 ET_RATIO<=0.68 LS_RATIO-ET_RATIO>=0.13 LS_RATIO-ET_RATIO>0.25
Bore the shape face XB_RATIO<0.52 LS_RATIO<0.75 ET_RATIO<0.7 LS_RATIO+ET_RATIO<=1.40 LS_RATIO+ET_RATIO<1.34
When certain shape of face did not satisfy any one condition combination, he may be between certain two kinds of shape of face.
In the above-mentioned steps (), described face area detection method is the Harr method
In the above-mentioned steps (two), symmetrical curve L mCoordinate sequence be (x i, y i), i=1,2 .., M, M are big more, and precision is high more.
Compared with prior art, advantage of the present invention is:
The present invention proposes a kind of method that detects people's face external form profile in the arbitrary image, and this method is at first oriented the position of people's face from image, determine complete, continuous, a smooth face contour then, at last the type of people's face external form profile is classified.The present invention can provide the automated graphics processing means of effect for all conglomeraties such as image design, beauty treatment, hairdressing, clothes, jewellery, cosmetic, amusements, for various application industries provide robotization, objectively technical support.Simultaneously, also can help broad masses to carry out self-shape of face and judge, carry out the self-image design according to rule.
Description of drawings:
Fig. 1: utilize Harr shape of face detection method can detect the position of people's face in the piece image effectively;
Fig. 2: utilize the Canny method to carry out the result of rim detection;
Fig. 3: seven kinds of common shapes of face;
Fig. 4: the basic model and the vertex position thereof of egg type face are represented;
Fig. 5: face's scope and the area schematic of carrying out forehead, chin search;
Fig. 6: face's scope and the area schematic of carrying out left and right sides cheek search;
Fig. 7: the input/output relation flow process that shape of face location, profile detect and classify;
Fig. 8: facial contour detection method flow process;
Fig. 9: shape of face classification process;
Figure 10: profile detects specific embodiment, and the red curve among the figure is the result that computing machine calculates automatically.
Embodiment:
Below in conjunction with accompanying drawing the present invention is done and to explain.
The objective of the invention is from piece image, to detect the position of people's face, obtain its face's external form profile, finally provide classification results.Referring to Fig. 4, implementation step was divided into for three steps, and promptly people's face location, facial contour detect and the shape of face classification.
Step (one): people's face location,
Adopt existing Harr detection method can effectively detect the position of one or more people face in the arbitrary image, and provide the coordinate on the summit, rectangular area of face.In the narration of back, we are that example is explained with a width of cloth facial image only.When having more than a width of cloth people face in the original graph photo, this method can detect the position and the scope of every width of cloth people face one by one.
Referring to Fig. 1, the coordinate that defines four angles of detected human face region is respectively A, B, and C, D, wherein the coordinate of A is that (Xa, Ya), the coordinate of C is that (Xc, Yc), central point is O ((Xa+Xc)/2, (Ya+Yc)/2).
Step (two): facial contour detects, and process is referring to Fig. 5, comprising in the coordinate of face area respectively to the height of forehead, the height of chin, the horizontal ordinate position that left and right sides cheek keeps to the side most, the cheek shape is revised the synthetic final face contour in back.
Behind the coordinate that obtains face area, the Flame Image Process work of seeking face contour just is confined near this zone.For the face contour that makes acquisition is smooth, continuous, as a to seal curve, we adopt following method:
The basic model of at first setting face contour is for being made of vector sealing symmetrical curve L some spots m, its coordinate sequence is (x i, y i), i=1,2 .., M, the egg type face is as basic model among employing Fig. 3, and Fig. 7 provides the synoptic diagram on this shape of face and each summit thereof.
It is symmetrical to provide one of employing in the present embodiment, constitutes the profile of egg type face as basic model by M=72 point.Make (x i, y i) height of coordinate uniformly-spaced changes, and so only need determine that the horizontal ordinate of each point just can be determined face contour.The horizontal ordinate that defines this profile central shaft is 0, and does normalization so that face is wide, and promptly face is wide is 1, and it is fixed that height comes with ratio.Provide the coordinate following (left-right symmetric) of half 36 point in one group of profile that the present invention adopts below, the order of horizontal ordinate is from the chin to the forehead:
x i=[0.0000 0.2501 0.3025 0.3549 0.3889 0.4153 0.4346 0.4524 0.4672
0.4759 0.4850 0.4907 0.4938 0.5000 0.4999 0.4996 0.4990 0.4979
0.4958 0.4914 0.4826 0.4776 0.4675 0.4557 0.4447 0.4308 0.4157
0.3939 0.3709 0.3459 0.3168 0.2792 0.2376 0.1834 0.1459 0.0000]
y i=H/35·(i-1),i=1,2,...,36
H=Yc-Ya
W=Xc-Xa
Because the approximate range ABCD of our known face therefore can be with vector curve L mThe center overlap with the central point O of face, be benchmark with face's range size, be reference point with O, to L mIt is flexible to make vector, makes L mThe K of summit up and down 1, K 2, K 3, K 4Stick each edge of the scope ABCD of face respectively, with the initial value L of each curvilinear coordinates at this moment as face contour 0
At initial profile L 0The basis on, need revise the details at each position of face, comprising the horizontal ordinate position that the height of forehead, the height of chin, left and right sides cheek keep to the side most, cheek shape etc.The method of determining these several parameters can obtain by the analysis to image gray levels.We are after passing through observation and statistical experiment to a large amount of photos, obtained the highly effective method of a cover, in Fig. 8, provide the implementation step flow process, positioning result according to people's face, can roughly obtain people's face scope apex coordinate, accurately locate forehead height, chin height again, the horizontal vertex position of left and right sides cheek according to this, the cheek curve, finally synthetic face contour.Concrete grammar describes in detail below.In definite process of this Several Parameters, initial value L originally 0Can adjust according to the revision result, the gained result will approach true face contour L gradually.
The height of forehead is determined
The top of forehead generally is the junction of more shallow forehead skin and darker hair, the line of promptly gaining fame and fortune.Find the upright position of the line of gaining fame and fortune, just can be used for further revising face contour initial value L 0The exact position on topmost summit.
Determine that the gain fame and fortune where the shoe pinches of line of forehead is, be not every photo all outside the clearly naked leakage of the line of gaining fame and fortune, sometimes be a part, sometimes just almost can't see.Blocking of hair becomes main difficulty.Take following method for this reason:
At first, we have had initial value L 0The position on topmost summit.Line just can not find at all if gain fame and fortune, and we just do not revise initial value L 0If some spills, we just might detect the line of gaining fame and fortune so, revise initial value L 0
The method of judging the line of gaining fame and fortune is:
(a) as shown in Figure 7, in human face region rectangle ABCD, take out the area B of the centre 1/2 in last 1/4 zone 1, represent that with shade the latter half should be forehead in this part image, the first half should be hair.
(b) determine the to gain fame and fortune detection criteria of line.With area B 1The picture element gray level G at interior each some place XyBe divided into N interval (for example, N=10).In this part, the yellow corresponding gray scale level pixel of the black of hair and forehead is should proportion higher, and the gray level picture element at the line place of gaining fame and fortune is compared and occupied the minority.Therefore, we add up the gray level of all picture elements, seek the picture element interval of number minimum, with the gray level thresholding G of this interval intermediate value as the line pixel of gaining fame and fortune T
(c) in area B 1In, bottom-up, the gray level of statistics every each pixel of row in the image of getting is higher than thresholding G TThe number of point.In certain delegation, be higher than thresholding G TThe number of pixel and the ratio of the total number of this row pixel be higher than (empirical value) at 1/7 o'clock, think the residing upright position of this row gain fame and fortune exactly line, the i.e. top of forehead.
(d) according to the upright position on forehead top, the flexible L that adjusts 0, revised contour curve is kept at L 1In.
Determining of chin height
Referring to Fig. 1, the upright position of chin is the junction of the dark color (illumination is weak) of light areas of chin (illumination is stronger) and neck.Concrete determination methods is:
(a) referring to Fig. 7, in face area, vertically extract facial in the middle of 1/3 zone, bottom-up 1/10 the area B of getting 2
(b) to area B 2In pixel grayscale summation of each row and that delegation's correspondence of value minimum be exactly the height and position of chin.
(c) according to the upright position of chin, the flexible L that adjusts 1, revised contour curve is kept at L 2In.Determining of left and right sides cheek
The comparison difficulty is determined in the influence of determining to be subjected to ear, hair, irradiate light, contextual factor of cheek horizontal ordinate position, the left and right sides.Concrete determination methods is:
(a) as shown in Figure 8, remove vertically middle 1/3rd part of people's face scope, do like this and can remove the influence of ear part.Two zones are B 31And B 32
(b) be B to the zone 31And B 32The gray level of each row pixel sue for peace;
(c) according to the features of shape of people's face, in most photos, search for left field B 31The zone and the right side area B of W/15 width on the left side 32The zone of W/15 width on the right in the minimum value of each row pixel grayscale sum, just can obtain the horizontal ordinate position of left and right sides cheek.
(d) according to the horizontal level of cheek, level is stretched and is adjusted L 2, revised contour curve is kept at L 3In.
Because above employing always is a basic shape of face model, just carry out the fat or thin variation of height on this basis simply, do that so most of shape of face can be met the demands substantially.
But as square face, heart-shaped face etc., just can not well approach some.At this moment we need readjust cheek (curve of whole face contour bottom 1/2).
The revision of cheek shape
Concrete implementation step is as follows:
(a) image of extraction people face cheek, as shown in Figure 1, we take out the latter half of regional ABCD separately.
(b) utilize the Canny method to carry out rim detection.We can obtain some desultory edges like this.Zone as shown in phantom in Figure 2 has the lines that some lines are cheek profiles here, and many lines then are not.
(c) find out the longest lines l of length in all multi-lines of cheek, these root lines generally are exactly facial contour, preserve the coordinate (x that is had a few of these root lines j, y j), j=1,2 ..., P.
(d) adopt following surface function to simulate the cheek curve data of egg type face model,
x i=0.5 sin α i+k(sin β i) 0.4
y i=0.5·i/N
K=1 wherein, i=0,1,2 ..., N, N=M/4-1 obtains one group of α and β thus.Then, in this function, only need regulate the k value and can change the cheek curvature of curve, form various cheek shape.For example, when M=72, we can obtain
α=[1.5708 1.6297 1.6887 1.7482 1.8083 1.8693 1.9315 1.9952 2.0608
2.1287 2.1997 2.2745 2.3545 2.4414 2.5384 2.6516 2.7969 3.14159]
β=[0.0000 0.0057 0.0201 0.0435 0.0763 0.1188 0.1718 0.2361 0.3131
0.4042 0.5119 0.6390 0.7906 0.9736 1.2002 1.4947 1.9200 3.14159]
The cheek curve is the first half of face contour curve L, and left-right symmetric gets final product Yi Bian calculate, 18 points totally.
(d) utilize above-mentioned function, the k value is changed from-0.1 to 0.1, seek and the most identical curve of lines l, make on each height, the horizontal range mean square deviation minimum of this curve and lines l, these lines are cheek best edge curve.
(e), replace L according to the best edge curve 3In respective coordinates, revised contour curve is kept among the L.
(f) face contour calculates and finishes.
Step (three); The shape of face classification
Referring to Fig. 9.At first, then characteristic parameter and classification thresholding are compared, finally obtain the shape of face classification according to facial contour calculated characteristics parameter as a result.
In order to distinguish different shapes of face, determined the most representative following characteristic parameter: the ratio that the face height is wide with face, the wide ratio wide of chin, the wide ratio wide of forehead, the wide ratio wide of two cheeks, chin curvature with face with face with face.By these parameter individual events are added up, carry out the thresholding setting then and compare, just can realize every width of cloth shape of face is classified, sorting parameter is as follows:
(a) the face height ratio H2W_RATIO wide with face
(b) the wide ratio XB_RATIO wide of chin with face
(c) the wide ratio ET_RATIO wide of forehead with face
(d) the wide ratio LS_RATIO wide of two cheeks with face
(e) chin curvature YJ_RATIO2
Utilize these eigenwerts to add up, can obtain concrete classification threshold parameter, provide the Rule of judgment of a simple shape of face classification in the table below.
The shape of face title Condition (with relation)
Microscler face H2W_RATIO>=1.43
The egg type face H2W_RATIO>=1.33 H2W_RATIO<1.40
Round face H2W_RATIO<1.30
Side's face LS_RATIO+ET_RATIO>=1.51 ET_RATIO>0.7 LS_RATIO>0.76
Heart-shaped face XB_RATIO<0.48 LS_RATIO<=0.69 ET_RATIO>=0.75 YJ_RATIO2<-0.03
The shape of face title Condition (with relation)
The ocean pears XB_RATIO>=0.55 LS_RATIO>=0.80
ET_RATIO<=0.68 LS_RATIO-ET_RATIO>=0.13 LS_RATIO-ET_RATIO>0.25
Bore the shape face XB_RATIO<0.52 LS_RATIO<0.75 ET_RATIO<0.7 LS_RATIO+ET_RATIO<=1.40 LS_RATIO+ET_RATIO<1.34
When certain shape of face did not satisfy any one condition combination, he may be between certain two kinds of shape of face.This situation can be handled according to user's demand.
After automatic face contour detection was finished, the user can also revise voluntarily among a small circle, so that reach optimum efficiency.
With the people's face among Figure 10 is example, further complete description each step of the present invention.
At first, the people's face in the image is positioned.The Harr detection method can utilize the people's face mapping function among the computer vision storehouse OpenCV that increases income of Intel to realize, concrete function name is cvHaarDetectObjects.Utilize this function just can obtain position, scope and the number of people's face in image.The use of relevant this function is following description in the C language.
cvHaarDetectObjects(m_plmg,cascade,storage,1.2,2,CV_HAAR_DO_CANNY_PRUNING,cvSize(0,0));
Positioning result is shown in Figure 10 (a).At this moment the frame of a rectangle has been determined people's face scope roughly, and in making that this scope necessarily is included in everyone face part;
The second, be foundation with the shape of face position, the model that adopts the egg shape face is as initial profile, and profile variation at this moment is bigger, regardless of different kinds of, still with the pressing close to degree and all can not satisfy request for utilization of true shape of face.
The 3rd, the forehead position of shape of face part is adjusted.According to the method that we propose, the position of forehead is effectively adjusted, and, can see at this moment that the position of forehead is well adjusted referring to the forehead position of Figure 10 (b), and basic and physical location is coincide.
The 4th, the chin position of shape of face part is adjusted, referring to Figure 10 (c), after the chin position is accurately located, extremely press close to actual position.
The 5th, the cheek position is adjusted, referring to Figure 10 (d), at this moment the position of cheek coincide with actual position.
The 6th, the cheek curve is calculated, referring to Figure 10 (e), position and top basically identical are because original just suitable substantially.
The 7th, carry out the shape of face classification.According to definition, the result of each characteristic parameter is as follows:
(a) the face height ratio H2W_RATIO=1.45 wide with face
(b) the wide ratio XB_RATIO=0.51 wide of chin with face
(c) the wide ratio ET_RATIO=0.70 wide of forehead with face
(d) the wide ratio LS_RATIO=0.68 wide of two cheeks with face
(e) chin curvature YJ_RATIO2=0.01
According to above-mentioned judgment condition, this shape of face is long shape of face, extremely kiss with our visual result and.

Claims (3)

1. the method for the detection of a face contour and classification may further comprise the steps:
Step (one): people's face location
Adopt conventional detection to detect the position of one or more people face in the arbitrary image, and provide the rectangular area ABCD of face, wherein the coordinate to angular vertex is A (Xa, Ya), and C (Xc, Yc), the coordinate O of central point O ((Xa+Xc)/2, (Ya+Yc)/2);
Step (two): facial contour detects
The model of at first setting face contour is the vector sealing symmetrical curve L that some points are formed m, its coordinate sequence is (x i, y i), i=1,2 .., M; With the egg type face in common seven kinds of shapes of face as basic model,
Make (x i, y i) the height y of coordinate iUniformly-spaced change, so only need determine the horizontal ordinate x of each point iJust can determine the face contour curve.The horizontal ordinate that defines this contour curve central shaft is 0, and does normalization so that face is wide, and promptly establishing face wide is 1, and the face height is determined subsequently with ratio.
With vector curve L mThe center overlap with the central point O of face, be benchmark with the size of the rectangular area ABCD of face, be reference point with O, to L mIt is flexible to make vector, makes L mThe K of summit up and down 1, K 2, K 3, K 4Cut each edge of the scope ABCD of face respectively, with the initial value L of each curvilinear coordinates at this moment as face contour 0At initial profile L 0The basis on, the details at each position of face is revised, comprising: horizontal ordinate position, cheek shape that the height of forehead, the height of chin, left and right sides cheek keep to the side most are described below respectively:
(1) the forehead height is determined: the top of forehead generally is the junction of more shallow forehead skin and darker hair, the line of promptly gaining fame and fortune, and the step of correction is:
(a) in human face region rectangle ABCD, take out the part B of the centre 1/2 in last 1/4 zone 1, represent that with shade the latter half is a forehead in this part image, the first half is a hair;
(b) determine the to gain fame and fortune detection criteria of line: with area B 1The picture element gray level G at interior each some place XyBe divided into N interval, the gray level of adding up all picture elements, the picture element interval of searching number minimum is with the gray level thresholding G of this interval intermediate value as the line pixel of gaining fame and fortune T
(c) in area B 1In, bottom-up, the gray level of statistics every each pixel of row in the image of getting is higher than thresholding G TThe number of point, in certain delegation, be higher than thresholding G TThe number of pixel and the ratio of the total number of this row pixel be higher than at 1/7 o'clock, determine the residing upright position of this row gain fame and fortune exactly line, the i.e. top of forehead;
(d) according to the upright position on forehead top, the flexible L that adjusts 0, make summit K on it 1Overlap with this upright position, revised contour curve is kept at L 1In;
If,, at this moment just keep initial value L with not satisfying the condition of above-mentioned (c) because the whole coverings of line of will gaining fame and fortune of the hair of facial image can not find in the photo at all 0Constant;
(2) determining of chin height: the upright position of chin is the junction of the dark color of the light areas of chin and neck, and determining step is:
(a) in human face region rectangle ABCD, vertically extract facial in the middle of 1/3 zone, bottom-up 1/10 the area B of getting 2
(b) to area B 2In pixel grayscale summation of each row and that delegation's correspondence of value minimum be exactly the height and position of chin;
(c) according to the upright position of chin, the flexible L that adjusts 1, revised contour curve is kept at L 2In;
(3) left and right sides cheek determines
(a) remove vertical part of middle 1/3 in the human face region rectangle ABCD, two zones are B 31And B 32
(b) be B to the zone 31And B 32The gray level of each row pixel sue for peace;
(c) search left field B 31The zone and the right side area B of W/15 width on the left side 32The zone of W/15 width on the right in the minimum value of each row pixel grayscale sum, obtain the horizontal ordinate position of left and right sides cheek;
(d) the flexible L that adjusts of level 2, revised contour curve is kept at L 3In;
(4) revision of cheek shape, its concrete steps are:
(a) Lower Half of taking out human face region ABCD separately assigns to extract the image of people's face cheek;
(b) utilize the Canny method to carry out rim detection, obtain some discontinuous contour edges at cheek;
(c) find out the longest lines l of length in the many contour edge lines of cheek, preserve the coordinate (x that is had a few of these root lines j, y j), j=1,2 ..., P;
(d) adopt following surface function to simulate the cheek curve data of egg type face model,
x i=0.5sinα i+k(sinβ i) 0.4
y i=0.5·i/N
K=1 wherein, i=0,1,2 ..., N, N=M/4-1 obtains one group of α and β thus.Then, in this function, only need regulate the k value and can change the cheek curvature of curve, form various cheek shape;
(e) utilize above-mentioned function, the k value changed from-0.1 to 0.1, seek with (c) in the most identical curve of lines l that finds, make on each height, the horizontal range mean square deviation minimum of this curve and lines l, these lines are cheek best edge curve;
(f), replace L according to the best edge curve 3In respective coordinates, revised contour curve is kept among the L;
Step (three): shape of face classification
After obtaining the face contour curve, can utilize existing method to classify;
Described sorting technique specifically is, according to facial contour as a result L calculate these characteristic parameters, then characteristic parameter and classification thresholding are compared, finally obtain the shape of face classification,
The characteristic feature parameter comprises: the ratio H2W_RATIO that the face height is wide with face, the wide ratio XB_RATIO wide with face of chin, the wide ratio ET_RATIO wide with face of forehead, the wide ratio LS_RATIO wide with face of two cheeks, chin curvature YJ_RATIO2
Utilize these eigenwerts to add up, obtained concrete classification threshold parameter, provide these thresholdings and a simple shape of face classification Rule of judgment relation in the table below.
The shape of face title Condition (with relation) Microscler face H2W_RATIO>=1.43 The egg type face H2W_RATIO>=1.33 H2W_RATIO<1.40 Round face H2W_RATIO<1.30 Side's face LS_RATIO+ET_RATIO>=1.51 ET_RATIO>0.7 LS_RATIO>0.76
The shape of face title Condition (with relation) Heart-shaped face XB_RATIO<0.48 LS_RATIO<=0.69 ET_RATIO>=0.75 YJ_RATIO2<-0.03 The ocean pears XB_RATIO>=0.55 LS_RATIO>=0.80 ET_RATIO<=0.68 LS_RATIO-ET_RATIO>=0.13 LS_RATIO-ET_RATIO>0.25 Bore the shape face XB_RATIO<0.52 LS_RATIO<0.75 ET_RATIO<0.7 LS_RATIO+ET_RATIO<=1.40 LS_RATIO+ET_RATIO<1.34
2. the method for the detection of a kind of face contour as claimed in claim 1 and classification, it is characterized in that: in the described step (), the face area detection method is the Harr method.
3. the method for the detection of a kind of face contour as claimed in claim 1 or 2 and classification is characterized in that: in the described step (two), and symmetrical curve L mCoordinate sequence be (x i, y i), i=1,2 .., M, M are big more, and precision is high more.
CN2008101506710A 2008-08-19 2008-08-19 Face contour checking and classification method Expired - Fee Related CN101339612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101506710A CN101339612B (en) 2008-08-19 2008-08-19 Face contour checking and classification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101506710A CN101339612B (en) 2008-08-19 2008-08-19 Face contour checking and classification method

Publications (2)

Publication Number Publication Date
CN101339612A CN101339612A (en) 2009-01-07
CN101339612B true CN101339612B (en) 2010-06-16

Family

ID=40213677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101506710A Expired - Fee Related CN101339612B (en) 2008-08-19 2008-08-19 Face contour checking and classification method

Country Status (1)

Country Link
CN (1) CN101339612B (en)

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509284B (en) * 2011-09-30 2013-12-25 北京航空航天大学 Method for automatically evaluating portrait lighting artistry
CN104715224B (en) * 2013-12-11 2019-01-04 腾讯科技(深圳)有限公司 A kind of method and device for the facial feature image obtaining user group
CN104751405B (en) * 2015-03-11 2018-11-13 百度在线网络技术(北京)有限公司 A kind of method and apparatus for being blurred to image
CN104751406B (en) * 2015-03-11 2018-05-01 百度在线网络技术(北京)有限公司 A kind of method and apparatus for being blurred to image
CN104751407B (en) * 2015-03-11 2019-01-25 百度在线网络技术(北京)有限公司 A kind of method and apparatus for being blurred to image
MX2018005143A (en) * 2015-10-30 2018-06-06 Unilever Nv Hair curl measurement.
WO2017165191A2 (en) * 2016-03-23 2017-09-28 The Procter & Gamble Company Imaging method for determining stray fibers
CN106295520B (en) * 2016-07-28 2019-10-18 维沃移动通信有限公司 A kind of fat or thin detection method and mobile terminal
CN109419140A (en) 2017-08-31 2019-03-05 丽宝大数据股份有限公司 Recommend eyebrow shape display methods and electronic device
CN109522773A (en) * 2017-09-18 2019-03-26 丽宝大数据股份有限公司 Biological information analytical equipment and its shape of face detection method
CN107682629B (en) * 2017-09-29 2020-08-11 惠州Tcl移动通信有限公司 Correction method of photographing interface, storage medium and mobile terminal
CN109359317A (en) * 2017-11-02 2019-02-19 广东数相智能科技有限公司 A kind of lipstick is matched colors the model building method and lipstick color matching selection method of selection
CN108701216B (en) * 2017-11-13 2021-12-03 深圳和而泰智能控制股份有限公司 Face recognition method and device and intelligent terminal
CN108509866B (en) * 2018-03-12 2020-06-19 华南理工大学 Face contour extraction method
CN108875605A (en) * 2018-05-31 2018-11-23 深圳和而泰数据资源与云技术有限公司 Shape of face determines method and device
CN109840476B (en) * 2018-12-29 2021-12-21 维沃移动通信有限公司 Face shape detection method and terminal equipment
CN110032959B (en) * 2019-03-29 2021-04-06 北京迈格威科技有限公司 Face shape judging method and device
CN110188590B (en) * 2019-04-09 2021-05-11 浙江工业大学 Face shape distinguishing method based on three-dimensional face model
CN110348286B (en) * 2019-05-24 2023-05-23 广东工业大学 Face fitting and matching method based on least square method
CN110349202B (en) * 2019-07-05 2021-07-20 合肥聚美网络科技有限公司 Hairstyle design method based on face analysis
CN112149559A (en) * 2020-09-22 2020-12-29 沈澈 Face recognition method and device, readable storage medium and computer equipment
CN112149095B (en) * 2020-10-26 2021-06-29 上海松鼠课堂人工智能科技有限公司 Student data safety management method and system
CN113255488A (en) * 2021-05-13 2021-08-13 广州繁星互娱信息科技有限公司 Anchor searching method and device, computer equipment and storage medium
CN113592851B (en) * 2021-08-12 2023-06-20 北京滴普科技有限公司 Pore detection method based on full-face image
CN113837067B (en) * 2021-09-18 2023-06-02 成都数字天空科技有限公司 Organ contour detection method, organ contour detection device, electronic device, and readable storage medium
CN115007480B (en) * 2022-06-30 2024-03-22 重庆泰美自动化科技有限公司 Scissors foot visual identification screening system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1179293A (en) * 1996-09-05 1998-04-22 株式会社资生堂 Method for classifying face features and map representing features
CN1529278A (en) * 2003-10-09 2004-09-15 重庆大学 Multi-category-based human face classifying and identifying method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1179293A (en) * 1996-09-05 1998-04-22 株式会社资生堂 Method for classifying face features and map representing features
CN1529278A (en) * 2003-10-09 2004-09-15 重庆大学 Multi-category-based human face classifying and identifying method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张艳丽.人脸检测系统的算法研究与实现.人脸检测系统的算法研究与实现.2008,46-60. *
时书剑.基于正侧面级联匹配的人脸识别算法研究.基于正侧面级联匹配的人脸识别算法研究.2008,45-50. *

Also Published As

Publication number Publication date
CN101339612A (en) 2009-01-07

Similar Documents

Publication Publication Date Title
CN101339612B (en) Face contour checking and classification method
CN103824059B (en) Facial expression recognition method based on video image sequence
CN104834898B (en) A kind of quality classification method of personage's photographs
CN104036278B (en) The extracting method of face algorithm standard rules face image
CN105160317B (en) One kind being based on area dividing pedestrian gender identification method
CN101305913B (en) Face beauty assessment method based on video
CN110097034A (en) A kind of identification and appraisal procedure of Intelligent human-face health degree
CN104732200B (en) A kind of recognition methods of skin type and skin problem
CN106960202A (en) A kind of smiling face's recognition methods merged based on visible ray with infrared image
CN104299011A (en) Skin type and skin problem identification and detection method based on facial image identification
CN104036247A (en) Facial feature based face racial classification method
CN1975759A (en) Human face identifying method based on structural principal element analysis
CN105139404A (en) Identification camera capable of detecting photographing quality and photographing quality detecting method
CN101667245A (en) Human face detection method by cascading novel detection classifiers based on support vectors
CN112396573A (en) Facial skin analysis method and system based on image recognition
CN101853397A (en) Bionic human face detection method based on human visual characteristics
CN106407915A (en) SVM (support vector machine)-based face recognition method and device
CN104794693A (en) Human image optimization method capable of automatically detecting mask in human face key areas
CN106372624A (en) Human face recognition method and human face recognition system
CN110032932A (en) A kind of human posture recognition method based on video processing and decision tree given threshold
CN103020614A (en) Human movement identification method based on spatio-temporal interest point detection
CN108416304B (en) Three-classification face detection method using context information
CN101887513B (en) Expression detecting device and method
CN110956184A (en) Abstract diagram direction determination method based on HSI-LBP characteristics
Castelo-Quispe et al. Optimization of brazil-nuts classification process through automation using colour spaces in computer vision

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
EE01 Entry into force of recordation of patent licensing contract

Assignee: Xi'an Low-Carbon Energy-Saving Technology Service Co.,Ltd.

Assignor: Chen Jianfeng

Contract record no.: 2011610000022

Denomination of invention: Face contour checking and classification method

Granted publication date: 20100616

License type: Exclusive License

Open date: 20090107

Record date: 20110415

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

Granted publication date: 20100616

Termination date: 20130819