CN106682571A - Skin color segmentation and wavelet transformation-based face detection method - Google Patents
Skin color segmentation and wavelet transformation-based face detection method Download PDFInfo
- Publication number
- CN106682571A CN106682571A CN201610979984.1A CN201610979984A CN106682571A CN 106682571 A CN106682571 A CN 106682571A CN 201610979984 A CN201610979984 A CN 201610979984A CN 106682571 A CN106682571 A CN 106682571A
- Authority
- CN
- China
- Prior art keywords
- region
- image
- connected region
- skin color
- labelling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention relates to a skin color segmentation and wavelet transformation-based face detection method. The method includes the following steps of: input image skin color segmentation: illumination compensation is performed on an input image, the illumination compensated image is converted from a RGB color space to a YCbCr color space, a skin color region is segmented through setting a threshold interval, and de-noising processing and connected region marking are performed on the segmented region; input image feature extraction: wavelet transformation is performed on the input image, and a low-dimensional image can be finally obtained; and length-variable template matching: mask operation is performed on the low-dimensional image based on connected regions, the size of each connected region is put into statistics, templates of different sizes are manufactured according to different connected regions, so that length-variable template matching is performed on the obtained connected regions, and the degrees of the correlation of the connected regions and the templates are judged, so that a face detection process is completed. According to the method, the size of the connected regions obtained after skin color segmentation is considered, and different templates are set for the connected regions of different sizes, and the self-adaption of template matching is realized.
Description
Technical field
The invention belongs to computer vision and technical field of image processing, more particularly to a kind of comprehensive Skin Color Information and stricture of vagina
The method for detecting human face based on template matching of reason information.
Background technology
With the fast development of current artificial intelligence and field of machine vision, because recognition of face has untouchable spy
Point, therefore have broad application prospects in terms of man-machine interaction.Face datection in image or is regarded as the basis of recognition of face
How the position of fast accurate ground detection face is still current study hotspot in frequency.
At present, the method for detecting human face of main flow mainly has three kinds:(1) based on face characteristics such as the colour of skin, edge, geometrical relationships
Detection method, the general arithmetic speed of such method is very fast, but has the disadvantage to be affected larger by local feature.(2) based on template
The detection method matched somebody with somebody, the general operand of such method is larger, and match time is longer.(3) detection method based on data, such side
Method extracts face characteristic by statistical knowledge, and advantage is that accuracy of detection is higher, but the very big data set of needs and longer time
Training is gone, and the method is a kind of black box algorithm, it is impossible to the principle of Face datection is intuitively understood from inside.
Above-mentioned first method is belonged to based on the method for detecting human face of features of skin colors, the method is sieved using the cluster of the colour of skin
Select area of skin color, its amount of calculation is little, can rapidly by the region segmentation to be measured of face out.But features of skin colors is vulnerable to class skin
Color background and non-face area of skin color are disturbed.
Two difficult points are had based on the method for detecting human face of template matching:One is the selection of template.Template matching will seek template
Contained information is simply effective, at present mostly using " the intrinsic face " after Karhunen-Loeve transformation as detection template but special in Karhunen-Loeve transformation
The operand that value indicative is decomposed is larger.Two is the scanning times of template matching.Template matching needs the size pair of constantly conversion template
Input picture carries out sliding window scanning, uncertain yet with template size, can only take the side of conversion template size Multiple-Scan
Formula, therefore its detection time can be elongated.This 2 points can all have a strong impact on detection performance.
[Yang Y, Xie C, Du L, the et al.A new face detection algorithm based on such as poplar
Skin color segmentation [C] //Chinese Automation Congress.IEEE, 2015.] by features of skin colors
After extraction, judge whether it is face by the way that whether every piece of area of skin color of differentiation meets certain symmetry, although the method
It is easy but accuracy is relatively low, without profound the feature for removing excavation facial image.Chinese patent CN103632132A is by the colour of skin
Segmentation is combined to carry out Face datection with template matching, and uses connected component labeling, and its template matching is also with certain oneself
Adaptability.But it is that, using the eigenvalue for directly calculating each colour of skin connected region, its operand is larger when template matching is carried out,
And easily affected by large stretch of non-face area of skin color, so as to cause verification and measurement ratio relatively low.
The content of the invention
In order to solve the above problems, it is an object of the invention to provide a kind of based on skin color segmentation and the face of wavelet transformation
Detection method.
In order to achieve the above object, what the present invention was provided is included based on the method for detecting human face of skin color segmentation and wavelet transformation
The following steps for carrying out in order:
1) input picture skin color segmentation:Illumination compensation is carried out to input picture, then by the image after illumination compensation from RGB
Color space conversion is split to YCbCr color spaces by given threshold interval to area of skin color, then to segmentation after
Region carries out denoising and connected component labeling;
2) input picture feature extraction:Wavelet transformation is carried out to input picture, level frequency in the image after wavelet transformation is taken
The class edge feature of rate component and vertical frequency component two time high-frequency information reconstructed image, in then carrying out to the reconstructed image
Value filtering, finally gives low-dimensional image;
3) elongated template matching:By step 1) in the connected region that obtains to step 2) in the low-dimensional image that obtains cover
Modular arithmetic, then by statistic procedure 1) in labelling each connected region size, make different big for different connected regions
Little template carrying out elongated template matching to the connected region for obtaining, eventually through judging to have come with the size of template dependency
Into face detection process.
In step 1) in, described input picture skin color segmentation is comprised the following steps that:
(1.1) illumination compensation
Choose input image lightness front 5 percent meansigma methodss as luminance compensation reference value, by the use of the value as being
Number is multiplied with input picture, thus carries out illumination compensation to input picture, and its formula is:
Wherein IoriRepresent input picture, sort0.05() represents the luminance components for taking before input picture 5 percent,
Mean () is represented and is taken average computing, and ref is luminance compensation reference value, and I is the image after illumination compensation;
(1.2) color space conversion and skin color segmentation
Image after above-mentioned illumination compensation is transformed into into YCbCr color spaces from RGB color space, color space conversion is public
Formula is:
The pixel I of every bit in image after illumination compensation(i,j)By I after meridional (2) conversionY (i,j)ICr (i,j)ICb (i,j)
Represent, wherein i and j represents the row and column that the pixel is located, and then screens and use two-value by area of skin color by formula (3)
Graphical representation, wherein black represent " 0 " that white represents " 1 ";
Thus skin color segmentation is completed;
(1.3) denoising and connected component labeling
Described denoising and method for marking connected region are comprised the following steps that:
1.3.1) filling cavity:Little hole-filling in region after above-mentioned segmentation is good;
1.3.2) opening operation removes tiny burr:The present invention has carried out altogether opening operation operation twice, is respectively adopted 5 × 5 and 9
Used as opening operation unit, 5 × 5 operators are used to remove some tiny noise spots × 9 square operator, and 9 × 9 operators are used to split
There is the connected region of faint connection, be easy to follow-up connected component labeling;
1.3.3) connected component labeling:The step in whole denoising screening process altogether using twice, first time connected region
After opening operation, second connected component labeling is after all denoisings and screening are completed as the output of skin color segmentation for field mark;
1.3.4 the abnormal connected region of length-width ratio) is removed:Jing connected component labelings obtain connected region QiAfterwards, the company of calculating
Logical region QiMaximum boundary rectangleLong liWith wide wi;Because the normal Aspect Ratio of face is about 4:3, by arranging
Length-width ratio:
To reject the unreasonable region in part, when length-width ratio is unreasonable, can determine whether that the region is non-face, so as to reject the area
Domain;Often link together with face part in view of neck, the present invention is using T > 3 and T < 0.33 as the abnormal area of length-width ratio
Between;
1.3.5 the less region of area) is removed:Calculate the area S of each connected regioni=sum (Qi), that is, count each
The number of connected region pixel, arranges the thresholding related to the average area of each connected region to reject less connected region
Domain;The average area of connected region is:
The present invention adopts the average area S of 0.3 times of connected regionaveAs the threshold value for rejecting pocket;
1.3.6 the irrational region of area structure) is removed:Calculate the area S of connected regioniWith maximum boundary rectangle areaRatioThe present invention arranges ratio riThreshold value be ri>=0.5, the region of unreasonable structure is picked
Remove, complete screening;
The final connected region to Jing after above-mentioned denoising screening re-starts labelling and obtains Q 'i, total connected region face
Product is:
In step 1.3.1) in, it is the step of described filling cavity:
1.3.1.1) bianry image is traveled through, by I(i,j)=0 pixel point value is labeled as point to be located, and is labeled as Wait;
1.3.1.2 bianry image) is traveled through, the point to be located that will be close to border is labeled as False, i.e., does not carry out filling up operation;
1.3.1.3) searching loop bianry image, when 4 neighborhood points of the point to be located for being labeled as Wait have the labelling of False
When, this point to be located is labeled as into False, when the point to be located for being labeled as Wait is not further added by, terminate traversal;
1.3.1.4) point to be located for being labeled as Wait is set to into 1, the point to be located for being labeled as the close border of False does not change
Pixel value originally.
In step 1.3.3) in, it is the step of described connected component labeling:
1.3.3.1) from left to right, the image after opening operation is scanned from top to bottom;
1.3.3.2) if pixel is 1,:
If a. pixel upper point or left side point only one of which labelling, replicate the labelling;
If b. have identical labelling, the labelling is replicated at 2 points;
If c. 2 points have a not isolabeling, replicate the labelling of upper point and will constitute in the two labellings input tables of equal value etc.
Valency label sets;
Distribute a new labelling and this labelling be input into into table of equal value d. otherwise to the pixel;
1.3.3.3) if considering more points, step 1.3.3.2 is returned to);
1.3.3.4) each equal tag in table of equal value is focused to find out minimum labelling;
1.3.3.5 bianry image) is scanned, with the minimum mark of each equal tag collection in table of equal value each labelling is replaced;
Each connected region Jing after connected component labeling is by QiRepresent, wherein i for connected region label, final labelling
Good connected region number is n.
In step 2) in, the method for described input picture feature extraction is:
Wavelet decomposition is carried out to input picture I with Haar small echos and Wavelet image is obtained, for the ease of showing, by small echo figure
The detail coefficients of picture take absolute value and octuple amplification;Merely with horizontal componentAnd vertical componentWavelet reconstruction is completed, most
The class edge feature information of image is obtained eventually, medium filtering is carried out to the image after reconstruct and image blurringization is made, finally obtain
Low-dimensional image is simultaneously designated as W.
In step 3) in, described elongated template matching is comprised the following steps that:
3.1) mask computing
By step 1) in the connected region Q ' that obtains after skin color segmentation to step 2) in the low-dimensional image W that obtains be masked
Computing;
3.2) template matching
3.2.1) template construct
Concrete grammar is:69 1 cun of bare-headed photos are chosen on the net, and photo human face region is intercepted according to following rules and made
For the source of template construct, its rule is:Using the distance between the canthus of two outsides as the width for intercepting part, and by length direction
Position is fixed;Intercept part length and meet length-width ratio 4 with wide:3, nose lower limb line corresponds to the position of long 0.618, comes true with this
Determine the position of width;Finally the image size for intercepting part is converted into into 40 × 30 pixels;According to above-mentioned rule, obtain
69 approximate faces in big little identical, position;Subsequently, this 69 photos are carried out into aforesaid wavelet transformation and reconstruct, then will
Photo after reconstruct adds up, and image blurringization after will add up by medium filtering is subsequently normalized, and finally gives face
The template of matching;
3.2.2) elongated template matching
Elongated template matching method is to step 1) in marked multiple connected regions Q for obtainingiCarry out respectively adaptive
Sliding window is answered to scan;By reference to each connected region Q after labellingiLength and width, select 4 kinds with connected region QiSize correlation
Template is matched;The present invention one connected region Q of acquiescenceiMiddle only one of which face, its step is:
3.2.2.1) the connected region Q ' of i will be numberedi1 is put, other connected regions for being numbered non-i put -100,;
3.2.2.2) calculate connected region Q 'iLong liWith wide wi, and by connected region QiMiddle upper and lower, left and right border institute
The position at placeRecord;
3.2.2.3) take connected region Q 'iLong liWith wide wiMinima in value:When a length of minima is taken, make a width of
Long 3/4 times;When a width of minima is taken, make a length of wide 4/3 times, make length-width ratio meet fixed 4:3, the length for finally giving
With it is a width ofWith
3.2.2.4) basisAnd Wi *Original template is converted into into 4 kinds of various sizes of matching templates, respectively:
3.2.2.5) from connected region Q 'iOriginal positionWithSliding window scanning is proceeded by, is performed altogether
Four times, every time scanning all converts single pass size, and size and step 3.2.2.4) in template size it is identical;Sweep each time
Retouch swept to region all with conversion after the template of formed objects carry out related operation, compare both similarities;Finally four
Correlation ρ after secondary scanningiMaximum position Pi, area sizeWith correlation ρiRecord, step is jumped to again
3.2.2.1);
The computing formula of correlation ρ values is:
Wherein, μA、σAAnd μB、σBIt is the average and standard deviation of vectorial A and vector B, vectorial A and vector B here are by square
The conversion of formation formula;
After elongated template matching, each connected region Q 'iThere is a correlation ρiMaximum demarcation region, and its
Area isCorrelation is ρi;By each areaCorrelation ρiAll divided by its corresponding subset{ρiIn be worthSelectIt is in threshold intervalInterior region is human face region.
What the present invention was provided has the advantages that (1) carries based on the method for detecting human face of skin color segmentation and wavelet transformation
A kind of new image characteristics extraction mode is gone out.By carrying out wavelet decomposition to image, two of image radio-frequency components are carried
Take out and reconfigure image, and reconstructed image is obscured using medium filtering, a kind of new low-dimensional may finally be obtained
Face characteristic.(2) present invention denoising stage in skin color segmentation, from picture structure, eliminate most of unreasonable inhuman
The area of skin color of face, reduces operand.(3) in template matching, the connected region size of skin color segmentation is taken into account, pin
Different templates are arranged to different size of connected domain, the self adaptation of template matching is realized.
Description of the drawings
Fig. 1 for the present invention provide based on skin color segmentation and the method for detecting human face flow chart of wavelet transformation.
Fig. 2 (a), (b) are respectively the image before skin color segmentation and the bianry image after skin color segmentation.
Fig. 3 is denoising and connected component labeling flow chart in the present invention.
Fig. 4 is the design sketch in the present invention Jing after denoising and connected component labeling.
Fig. 5 is input picture feature extracting method schematic diagram in the present invention.
Fig. 6 is mask operation effect figure in the present invention.
Fig. 7 is template manufacturing process block diagram in the present invention.
Fig. 8 is elongated template matching process schematic in the present invention.
Specific embodiment
Below in conjunction with the accompanying drawings the face based on skin color segmentation and wavelet transformation that the present invention is provided is examined with specific embodiment
Survey method is described in detail.
As shown in figure 1, the method for detecting human face based on skin color segmentation and wavelet transformation that the present invention is provided is included in order
The following steps for carrying out:
1) input picture skin color segmentation:Illumination compensation is carried out to input picture, then by the image after illumination compensation from RGB
Color space conversion is split to YCbCr color spaces by given threshold interval to area of skin color, then to segmentation after
Region carries out denoising and connected component labeling;
Described input picture skin color segmentation is comprised the following steps that:
(1.1) illumination compensation
Illumination compensation can improve the accuracy of skin color segmentation, and the present invention chooses the flat of front 5 the percent of input image lightness
Average is multiplied as coefficient by the use of the value as luminance compensation reference value with input picture, thus carries out illumination to input picture
Compensate, its formula is:
Wherein IoriRepresent input picture, sort0.05() represents the luminance components for taking before input picture 5 percent,
Mean () is represented and is taken average computing, and ref is luminance compensation reference value, and I is the image after illumination compensation;
(1.2) color space conversion and skin color segmentation
Because the colour of skin has good cluster in YCbCr color spaces, and the colour of skin is unrelated with luminance components, the present invention
Image after above-mentioned illumination compensation is transformed into into YCbCr color spaces from RGB color space, color space conversion formula is:
The pixel I of every bit in image after illumination compensation(i,j)By I after meridional (2) conversionY (i,j)ICr (i,j)ICb (i,j)
Represent, wherein i and j represents the row and column that the pixel is located, and then screens and use Fig. 2 by area of skin color by formula (3)
Shown bianry image represents that wherein black is represented " 0 ", and white represents " 1 ".
Thus skin color segmentation is completed.
(1.3) denoising and connected component labeling
Because there are many tiny noises and some non-face regions in the bianry image obtained in above-mentioned steps (1.2),
Therefore denoising and connected component labeling need to be carried out to the region after above-mentioned segmentation.
As shown in figure 3, described denoising and method for marking connected region are comprised the following steps that:
1.3.1) filling cavity:Little hole-filling in region after above-mentioned segmentation is good, and step is:
1.3.1.1) bianry image is traveled through, by I(i,j)=0 pixel point value is labeled as point to be located, and is labeled as Wait;
1.3.1.2 bianry image) is traveled through, the point to be located that will be close to border is labeled as False, i.e., does not carry out filling up operation;
1.3.1.3) searching loop bianry image, when 4 neighborhood points of the point to be located for being labeled as Wait have the labelling of False
When, this point to be located is labeled as into False, when the point to be located for being labeled as Wait is not further added by, terminate traversal;
1.3.1.4) point to be located for being labeled as Wait is set to into 1, the point to be located for being labeled as the close border of False does not change
Pixel value originally.
1.3.2) opening operation removes tiny burr:The present invention has carried out altogether opening operation operation twice, is respectively adopted 5 × 5 and 9
Used as opening operation unit, 5 × 5 operators are used to remove some tiny noise spots × 9 square operator, and 9 × 9 operators are used to split
There is the connected region of faint connection, be easy to follow-up connected component labeling.
1.3.3) connected component labeling:The step in whole denoising screening process altogether using twice, first time connected region
Field mark after opening operation, second connected component labeling complete all denoisings and screening after as skin color segmentation output,
Its step is:
1.3.3.1) from left to right, the image after opening operation is scanned from top to bottom;
1.3.3.2) if pixel is 1,:
If a. pixel upper point or left side point only one of which labelling, replicate the labelling;
If b. have identical labelling, the labelling is replicated at 2 points;
If c. 2 points have a not isolabeling, replicate the labelling of upper point and will constitute in the two labellings input tables of equal value etc.
Valency label sets;
Distribute a new labelling and this labelling be input into into table of equal value d. otherwise to the pixel;
1.3.3.3) if considering more points, step 1.3.3.2 is returned to);
1.3.3.4) each equal tag in table of equal value is focused to find out minimum labelling;
1.3.3.5 bianry image) is scanned, with the minimum mark of each equal tag collection in table of equal value each labelling is replaced.
Each connected region Jing after connected component labeling is by QiRepresent, wherein i for connected region label, final labelling
Good connected region number is n.
1.3.4 the abnormal connected region of length-width ratio) is removed:Jing connected component labelings obtain connected region QiAfterwards, the company of calculating
Logical region QiMaximum boundary rectangleLong liWith wide wi.Because the normal Aspect Ratio of face is about 4:3, by arranging
Length-width ratio:
To reject the unreasonable region in part.When length-width ratio is unreasonable, can determine whether that the region is non-face, so as to reject the area
Domain.Often link together with face part in view of neck, the present invention is using T > 3 and T < 0.33 as the abnormal area of length-width ratio
Between.
1.3.5) remove the less region of area.Calculate the area S of each connected regioni=sum (Qi), that is, count each
The number of connected region pixel.Subjective to understand, the larger part of connected region should belong to face, and little part should belong to out
The little block noise that computing cannot be rejected, therefore it is less to reject to arrange the thresholding related to the average area of each connected region
Connected region.The average area of connected region is:
The present invention adopts the average area S of 0.3 times of connected regionaveAs the threshold value for rejecting pocket.
1.3.6 the irrational region of area structure) is removed.Calculate the area S of connected regioniWith maximum boundary rectangle areaRatioThe face complexion area of normal configuration should occupy the major part of its boundary rectangle, ratio
riShould be larger, and some non-face area distribution are peculiar, although boundary rectangle is larger, but entire area accounts for the ratio of rectangular area
It is less, therefore the present invention arranges ratio riThreshold value be ri>=0.5, the region of unreasonable structure is rejected, complete screening;
The final connected region to Jing after above-mentioned denoising screening re-starts labelling and obtains Q 'i, total connected region face
Product is:
Effect Jing after above-mentioned denoising and connected component labeling is shown in Fig. 4, is from left to right to obtain Jing after above-mentioned 6 steps in figure
The design sketch for obtaining.
2) input picture feature extraction:Wavelet transformation is carried out to input picture, level frequency in the image after wavelet transformation is taken
The class edge feature of rate component and vertical frequency component two time high-frequency information reconstructed image, in then carrying out to the reconstructed image
Value filtering, finally gives low-dimensional image;
The present invention adopts Haar small echos as the instrument of input picture feature extraction, and the definition of Haar wavelet functions is:
Its scaling function is:
Size is that the two-dimensional discrete wavelet conversion of function f (x, y) of M × N is:
Correspondence contravariant is changed to
As shown in figure 5, the method for described input picture feature extraction is:
Wavelet decomposition is carried out to input picture I with Haar small echos and Wavelet image is obtained, for the ease of showing, by small echo figure
The detail coefficients of picture take absolute value and octuple amplification.The present invention is rejectedWithComponent, merely with horizontal componentWith it is vertical
ComponentWavelet reconstruction is completed, finally giving in the class edge feature information of image, but the image after reconstructing has many apart from phase
Away from nearer cluster point, if directly going matching with these cluster points, the accuracy rate of template matching can be reduced.Therefore in order to by big face
The point of integration cloth is converted into face, improves the matching effect to cluster point, carries out medium filtering to the image after reconstruct here and makes
Image blurringization, finally obtains low-dimensional image and is designated as W.
3) elongated template matching:By step 1) in the connected region that obtains to step 2) in the low-dimensional image that obtains cover
Modular arithmetic, then by statistic procedure 1) in labelling each connected region size, make different big for different connected regions
Little template carrying out elongated template matching to the connected region for obtaining, eventually through judging to have come with the size of template dependency
Into face detection process.
Described elongated template matching is comprised the following steps that:
3.1) mask computing
By step 1) in the connected region Q ' that obtains after skin color segmentation to step 2) in the low-dimensional image W that obtains be masked
Computing, design sketch is shown in Fig. 6.By combining both, the accuracy rate of template matching detection can be improved.
3.2) template matching
3.2.1) template construct
Due to step 2) in input picture feature extracting method be the present invention an innovative point, not similar mould
Plate can be applied mechanically directly, therefore self manufacture template of the present invention, and concrete manufacturing process is shown in Fig. 7.Concrete grammar is:Choose on the net
69 1 cun of bare-headed photos, and according to following rules photo human face region is intercepted as the source of template construct, its rule is:Will
Distance between the canthus of two outsides and is fixed lengthwise location as the width for intercepting part;Intercept the long and wide satisfaction in part
Length-width ratio 4:3, nose lower limb line corresponds to the position of long 0.618, and the position of width is determined with this.Finally will intercept
Partial image size is converted into 40 × 30 pixels.According to above-mentioned rule, 69 big approximate people in little identical, position have been obtained
Face.Subsequently, this 69 photos are carried out into aforesaid wavelet transformation and reconstruct, then the photo after reconstruct is added up, by intermediate value
Image blurringization after will add up is filtered, is subsequently normalized, finally give the template of face matching.As seen from Figure 7,
Template peak is mainly distributed on human eye, nose and face position, and human eye is higher with respect to other positions.
3.2.2) elongated template matching
Elongated template matching method is to step 1) in marked multiple connected regions Q for obtainingiCarry out respectively adaptive
Sliding window is answered to scan.By reference to each connected region Q after labellingiLength and width, select 4 kinds with connected region QiSize correlation
Template is matched, so as to greatly reduce the operand of common templates matching.The present invention one connected region Q of acquiescenceiIn only
There is a face.
As shown in figure 8, its step is:
3.2.2.1) the connected region Q ' of i will be numberedi1 is put, other connected regions for being numbered non-i put -100,;
3.2.2.2) calculate connected region Q 'iLong liWith wide wi, and by connected region QiMiddle upper and lower, left and right border institute
The position at placeRecord;
3.2.2.3) take connected region Q 'iLong liWith wide wiMinima in value:When a length of minima is taken, make a width of
Long 3/4 times;When a width of minima is taken, make a length of wide 4/3 times, make length-width ratio meet fixed 4:3, the length for finally giving
With it is a width ofWith
3.2.2.4) basisAnd Wi *Original template is converted into into 4 kinds of various sizes of matching templates, respectively:
3.2.2.5) from connected region Q 'iOriginal positionWithSliding window scanning is proceeded by, is performed altogether
Four times, every time scanning all converts single pass size, and size and step 3.2.2.4) in template size it is identical.In view of phase
The region similarity of adjacent pixel is higher, and in order to reduce operand, the mode for choosing scanning is interlacing matching, the line number specifically jumped over
Determined by area size.Scan each time swept to region all with conversion after the template of formed objects carry out related operation, than
Compared with both similarities.Finally correlation ρ after four scanningiMaximum position Pi, area sizeWith correlation ρiRecord
Come, step 3.2.2.1 is jumped to again).
The computing formula of correlation ρ values is:
Wherein, μA、σAAnd μB、σBIt is the average and standard deviation of vectorial A and vector B, vectorial A and vector B here are by square
The conversion of formation formula.
After elongated template matching, each connected region Q 'iThere is a correlation ρiMaximum demarcation region, and its
Area isCorrelation is ρi.By each areaCorrelation ρiAll divided by its corresponding subset{ρiIn be worthSelectIt is in threshold intervalInterior region is human face region.
Through test, the method that the present invention is provided more can rapidly and accurately detect face.
Claims (6)
1. a kind of based on skin color segmentation and the method for detecting human face of wavelet transformation, it is characterised in that:Described method is included by suitable
The following steps that sequence is carried out:
1) input picture skin color segmentation:Illumination compensation is carried out to input picture, then by the image after illumination compensation from RGB color
Space is transformed into YCbCr color spaces, area of skin color is split by given threshold interval, then to the region after segmentation
Carry out denoising and connected component labeling;
2) input picture feature extraction:Wavelet transformation is carried out to input picture, horizontal frequency point in the image after wavelet transformation is taken
The class edge feature of amount and vertical frequency component two time high-frequency information reconstructed image, then carries out intermediate value filter to the reconstructed image
Ripple, finally gives low-dimensional image;
3) elongated template matching:By step 1) in the connected region that obtains to step 2) in the low-dimensional image that obtains be masked fortune
Calculate, then by statistic procedure 1) in labelling each connected region size, for different connected regions make it is different size of
Template carrying out elongated template matching to the connected region for obtaining, eventually through judging to complete people with the size of template dependency
Face detection process.
2. according to claim 1 based on skin color segmentation and the method for detecting human face of wavelet transformation, it is characterised in that:In step
1) in, described input picture skin color segmentation is comprised the following steps that:
(1.1) illumination compensation
Choose input image lightness front 5 percent meansigma methodss as luminance compensation reference value, by the use of the value as coefficient with
Input picture is multiplied, and thus carries out illumination compensation to input picture, and its formula is:
Wherein IoriRepresent input picture, sort0.05() represents the luminance components for taking before input picture 5 percent, mean ()
Expression takes average computing, and ref is luminance compensation reference value, and I is the image after illumination compensation;
(1.2) color space conversion and skin color segmentation
Image after above-mentioned illumination compensation is transformed into into YCbCr color spaces, color space conversion formula from RGB color space
For:
The pixel I of every bit in image after illumination compensation(i,j)By I after meridional (2) conversionY (i,j)ICr (i,j)ICb (i,j)Represent,
Wherein i and j represent the row and column that the pixel is located, and then screen and use bianry image by area of skin color by formula (3)
Represent, wherein black is represented " 0 ", white represents " 1 ";
Thus skin color segmentation is completed;
(1.3) denoising and connected component labeling
Described denoising and method for marking connected region are comprised the following steps that:
1.3.1) filling cavity:Little hole-filling in region after above-mentioned segmentation is good;
1.3.2) opening operation removes tiny burr:The present invention has carried out altogether opening operation operation twice, is respectively adopted 5 × 5 and 9 × 9
Square operator as opening operation unit, 5 × 5 operators are used to remove some tiny noise spots, and 9 × 9 operators have for segmentation
The connected region of faint connection, is easy to follow-up connected component labeling;
1.3.3) connected component labeling:The step is used altogether twice in whole denoising screening process, first time connected region mark
After opening operation, second connected component labeling is after all denoisings and screening are completed as the output of skin color segmentation for note;
1.3.4 the abnormal connected region of length-width ratio) is removed:Jing connected component labelings obtain connected region QiAfterwards, connected region is calculated
QiMaximum boundary rectangleLong liWith wide wi;Because the normal Aspect Ratio of face is about 4:3, by arranging length and width
Than:
To reject the unreasonable region in part, when length-width ratio is unreasonable, can determine whether that the region is non-face, so as to reject the region;
Often link together with face part in view of neck, the present invention is using T > 3 and T < 0.33 as the abnormal interval of length-width ratio;
1.3.5 the less region of area) is removed:Calculate the area S of each connected regioni=sum (Qi), that is, count each connection
The number of area pixel point, arranges the thresholding related to the average area of each connected region to reject less connected region;Even
The average area in logical region is:
The present invention adopts the average area S of 0.3 times of connected regionaveAs the threshold value for rejecting pocket;
1.3.6 the irrational region of area structure) is removed:Calculate the area S of connected regioniWith maximum boundary rectangle areaRatioThe present invention arranges ratio riThreshold value be ri>=0.5, the region of unreasonable structure is picked
Remove, complete screening;
The final connected region to Jing after above-mentioned denoising screening re-starts labelling and obtains Q 'i, total connected region area is:
3. according to claim 2 based on skin color segmentation and the method for detecting human face of wavelet transformation, it is characterised in that:In step
1.3.1 in), it is the step of described filling cavity:
1.3.1.1) bianry image is traveled through, by I(i,j)=0 pixel point value is labeled as point to be located, and is labeled as Wait;
1.3.1.2 bianry image) is traveled through, the point to be located that will be close to border is labeled as False, i.e., does not carry out filling up operation;
1.3.1.3) searching loop bianry image, when 4 neighborhood points of the point to be located for being labeled as Wait have the labelling of False, will
This point to be located is labeled as False, when the point to be located for being labeled as Wait is not further added by, terminates traversal;
1.3.1.4) point to be located for being labeled as Wait is set to into 1, the point to be located for being labeled as the close border of False does not change originally
Pixel value.
4. according to claim 2 based on skin color segmentation and the method for detecting human face of wavelet transformation, it is characterised in that:In step
1.3.3 in), it is the step of described connected component labeling:
1.3.3.1) from left to right, the image after opening operation is scanned from top to bottom;
1.3.3.2) if pixel is 1,:
If a. pixel upper point or left side point only one of which labelling, replicate the labelling;
If b. have identical labelling, the labelling is replicated at 2 points;
If c. 2 points have a not isolabeling, replicate the labelling of upper point and the price card such as will constitute in the two labellings input tables of equal value
Note collection;
Distribute a new labelling and this labelling be input into into table of equal value d. otherwise to the pixel;
1.3.3.3) if considering more points, step 1.3.3.2 is returned to);
1.3.3.4) each equal tag in table of equal value is focused to find out minimum labelling;
1.3.3.5 bianry image) is scanned, with the minimum mark of each equal tag collection in table of equal value each labelling is replaced;
Each connected region Jing after connected component labeling is by QiRepresent, wherein i is the label of connected region, final labelling is good
Connected region number is n.
5. according to claim 1 based on skin color segmentation and the method for detecting human face of wavelet transformation, it is characterised in that:In step
2) in, the method for described input picture feature extraction is:
Wavelet decomposition is carried out to input picture I with Haar small echos and Wavelet image is obtained, for the ease of showing, by Wavelet image
Detail coefficients take absolute value and octuple amplification;Merely with horizontal componentAnd vertical componentWavelet reconstruction is completed, it is final to obtain
To the class edge feature information of image, medium filtering is carried out to the image after reconstruct and image blurringization is made, finally obtain low-dimensional
Image is simultaneously designated as W.
6. according to claim 1 based on skin color segmentation and the method for detecting human face of wavelet transformation, it is characterised in that:In step
3) in, described elongated template matching is comprised the following steps that:
3.1) mask computing
By step 1) in the connected region Q ' that obtains after skin color segmentation to step 2) in the low-dimensional image W that obtains be masked fortune
Calculate;
3.2) template matching
3.2.1) template construct
Concrete grammar is:69 1 cun of bare-headed photos are chosen on the net, and photo human face region is intercepted as mould according to following rules
The source that plate makes, its rule is:Using the distance between the canthus of two outsides as the width for intercepting part, and by lengthwise location
It is fixed;Intercept part length and meet length-width ratio 4 with wide:3, nose lower limb line corresponds to the position of long 0.618, and with this width is determined
The position in degree direction;Finally the image size for intercepting part is converted into into 40 × 30 pixels;According to above-mentioned rule, 69 have been obtained
Size is identical, the face that position is approximate;Subsequently, this 69 photos are carried out into aforesaid wavelet transformation and reconstruct, then will reconstruct
Photo afterwards adds up, and image blurringization after will add up by medium filtering is subsequently normalized, and finally gives face matching
Template;
3.2.2) elongated template matching
Elongated template matching method is to step 1) in marked multiple connected regions Q for obtainingiAdaptive sliding window is carried out respectively
Scanning;By reference to each connected region Q after labellingiLength and width, select 4 kinds with connected region QiThe related template of size is entered
Row matching;The present invention one connected region Q of acquiescenceiMiddle only one of which face, its step is:
3.2.2.1) the connected region Q ' of i will be numberedi1 is put, other connected regions for being numbered non-i put -100,;
3.2.2.2) calculate connected region Q 'iLong liWith wide wi, and by connected region QiPosition residing for middle upper and lower, left and right border
PutRecord;
3.2.2.3) take connected region Q 'iLong liWith wide wiMinima in value:When a length of minima is taken, a width of length is made
3/4 times;When a width of minima is taken, make a length of wide 4/3 times, make length-width ratio meet fixed 4:3, the length for finally giving and width
ForWith
3.2.2.4) basisWithOriginal template is converted into into 4 kinds of various sizes of matching templates, respectively:
3.2.2.5) from connected region Q 'iOriginal positionWithSliding window scanning is proceeded by, is performed four times altogether,
Every time scanning all converts single pass size, and size and step 3.2.2.4) in template size it is identical;Institute is scanned each time
The region swept to all with conversion after the template of formed objects carry out related operation, compare both similarities;Finally four times are swept
Retouch rear correlation ρiMaximum position Pi, area sizeWith correlation ρiRecord, step 3.2.2.1 is jumped to again);
The computing formula of correlation ρ values is:
Wherein, μA、σAAnd μB、σBIt is the average and standard deviation of vectorial A and vector B, vectorial A and vector B here are by rectangular
Formula conversion;
After elongated template matching, each connected region Q 'iThere is a correlation ρiMaximum demarcation region, and its area
ForCorrelation is ρi;By each areaCorrelation ρiAll divided by its corresponding subset{ρiIn be worthSelectIt is in threshold intervalInterior region is human face region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610979984.1A CN106682571B (en) | 2016-11-08 | 2016-11-08 | Method for detecting human face based on skin color segmentation and wavelet transformation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610979984.1A CN106682571B (en) | 2016-11-08 | 2016-11-08 | Method for detecting human face based on skin color segmentation and wavelet transformation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106682571A true CN106682571A (en) | 2017-05-17 |
CN106682571B CN106682571B (en) | 2019-09-27 |
Family
ID=58840255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610979984.1A Expired - Fee Related CN106682571B (en) | 2016-11-08 | 2016-11-08 | Method for detecting human face based on skin color segmentation and wavelet transformation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106682571B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107480607A (en) * | 2017-07-28 | 2017-12-15 | 青岛大学 | A kind of method that standing Face datection positions in intelligent recording and broadcasting system |
CN108894655A (en) * | 2018-07-10 | 2018-11-27 | 安庆师范大学 | A kind of interior intelligent anti-suffocation system |
CN109801235A (en) * | 2018-12-28 | 2019-05-24 | 佛山科学技术学院 | A kind of epipremnum aureum blade disease causes detection method and device |
CN110211302A (en) * | 2019-04-18 | 2019-09-06 | 江苏图云智能科技发展有限公司 | The control method and device of self-service storage cabinet |
CN110222555A (en) * | 2019-04-18 | 2019-09-10 | 江苏图云智能科技发展有限公司 | The detection method and device of area of skin color |
CN112348031A (en) * | 2020-11-17 | 2021-02-09 | 安徽理工大学 | Improved wavelet threshold denoising method for removing fingerprint image mixed noise |
CN113128435A (en) * | 2021-04-27 | 2021-07-16 | 南昌虚拟现实研究院股份有限公司 | Hand region segmentation method, device, medium and computer equipment in image |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103632132A (en) * | 2012-12-11 | 2014-03-12 | 广西工学院 | Face detection and recognition method based on skin color segmentation and template matching |
CN105488475A (en) * | 2015-11-30 | 2016-04-13 | 西安闻泰电子科技有限公司 | Method for detecting human face in mobile phone |
CN105809089A (en) * | 2014-12-29 | 2016-07-27 | 中国科学院深圳先进技术研究院 | Multi-face detection method and device under complex background |
-
2016
- 2016-11-08 CN CN201610979984.1A patent/CN106682571B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103632132A (en) * | 2012-12-11 | 2014-03-12 | 广西工学院 | Face detection and recognition method based on skin color segmentation and template matching |
CN105809089A (en) * | 2014-12-29 | 2016-07-27 | 中国科学院深圳先进技术研究院 | Multi-face detection method and device under complex background |
CN105488475A (en) * | 2015-11-30 | 2016-04-13 | 西安闻泰电子科技有限公司 | Method for detecting human face in mobile phone |
Non-Patent Citations (5)
Title |
---|
CHRISTOPHE GARCIA 等: "Face Detection Using Quantized Skin Color Regions Merging and Wavelet Packet Analysis", 《IEEE TRANSACTIONS ON MULTIMEDIA》 * |
CHUAN WAN 等: "Rapid Face Detection Algorithm of Color Images under Complex Background", 《ADVANCES IN NEURAL NETWORKS-ISNN2011》 * |
万川: "基于动态序列图像的人脸表情识别***理论与方法研究", 《中国博士学位论文全文数据库信息科技辑》 * |
卢绪军 等: "一种基于肤色和模板匹配的人脸检测方法", 《计算机应用技术》 * |
徐诗惠 等: "连通域在复杂背景肤色检测中的应用", 《计算机应用与软件》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107480607A (en) * | 2017-07-28 | 2017-12-15 | 青岛大学 | A kind of method that standing Face datection positions in intelligent recording and broadcasting system |
CN107480607B (en) * | 2017-07-28 | 2020-04-07 | 青岛大学 | Method for detecting and positioning standing face in intelligent recording and broadcasting system |
CN108894655A (en) * | 2018-07-10 | 2018-11-27 | 安庆师范大学 | A kind of interior intelligent anti-suffocation system |
CN108894655B (en) * | 2018-07-10 | 2020-02-11 | 安庆师范大学 | Intelligent anti-suffocation system in vehicle |
CN109801235A (en) * | 2018-12-28 | 2019-05-24 | 佛山科学技术学院 | A kind of epipremnum aureum blade disease causes detection method and device |
CN110211302A (en) * | 2019-04-18 | 2019-09-06 | 江苏图云智能科技发展有限公司 | The control method and device of self-service storage cabinet |
CN110222555A (en) * | 2019-04-18 | 2019-09-10 | 江苏图云智能科技发展有限公司 | The detection method and device of area of skin color |
CN110211302B (en) * | 2019-04-18 | 2022-08-30 | 湖南悟空教育科技有限公司 | Control method and device of self-service locker |
CN110222555B (en) * | 2019-04-18 | 2022-12-20 | 灏图科技(上海)有限公司 | Method and device for detecting skin color area |
CN112348031A (en) * | 2020-11-17 | 2021-02-09 | 安徽理工大学 | Improved wavelet threshold denoising method for removing fingerprint image mixed noise |
CN113128435A (en) * | 2021-04-27 | 2021-07-16 | 南昌虚拟现实研究院股份有限公司 | Hand region segmentation method, device, medium and computer equipment in image |
Also Published As
Publication number | Publication date |
---|---|
CN106682571B (en) | 2019-09-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106682571B (en) | Method for detecting human face based on skin color segmentation and wavelet transformation | |
CN107833220B (en) | Fabric defect detection method based on deep convolutional neural network and visual saliency | |
Jia et al. | Collaborative representation-based multiscale superpixel fusion for hyperspectral image classification | |
CN109154978B (en) | System and method for detecting plant diseases | |
Jahanifar et al. | Supervised saliency map driven segmentation of lesions in dermoscopic images | |
CN103824059B (en) | Facial expression recognition method based on video image sequence | |
Preetha et al. | Image segmentation using seeded region growing | |
CN103632132B (en) | Face detection and recognition method based on skin color segmentation and template matching | |
CN104751142B (en) | A kind of natural scene Method for text detection based on stroke feature | |
EP1271403B1 (en) | Method and device for character location in images from digital camera | |
Wang et al. | Background-driven salient object detection | |
Luengo-Oroz et al. | Robust iris segmentation on uncalibrated noisy images using mathematical morphology | |
CN103714181B (en) | A kind of hierarchical particular persons search method | |
Shih et al. | Automatic reference color selection for adaptive mathematical morphology and application in image segmentation | |
Valliammal et al. | Automatic recognition system using preferential image segmentation for leaf and flower images | |
Liang et al. | Salient object detection using content-sensitive hypergraph representation and partitioning | |
CN106682679A (en) | Significance detection method based on level-set super pixel and Bayesian framework | |
CN107992864A (en) | A kind of vivo identification method and device based on image texture | |
Liu et al. | A novel color-texture descriptor based on local histograms for image segmentation | |
CN107103266A (en) | The training of two-dimension human face fraud detection grader and face fraud detection method | |
Paul et al. | PCA based geometric modeling for automatic face detection | |
Ma et al. | Multiscale 2-D singular spectrum analysis and principal component analysis for spatial–spectral noise-robust feature extraction and classification of hyperspectral images | |
CN115082776A (en) | Electric energy meter automatic detection system and method based on image recognition | |
CN106446920B (en) | A kind of stroke width transform method based on gradient amplitude constraint | |
Youlian et al. | Face detection method using template feature and skin color feature in rgb color space |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190927 Termination date: 20201108 |
|
CF01 | Termination of patent right due to non-payment of annual fee |