CN103218600B - Real-time face detection algorithm - Google Patents

Real-time face detection algorithm Download PDF

Info

Publication number
CN103218600B
CN103218600B CN201310105220.6A CN201310105220A CN103218600B CN 103218600 B CN103218600 B CN 103218600B CN 201310105220 A CN201310105220 A CN 201310105220A CN 103218600 B CN103218600 B CN 103218600B
Authority
CN
China
Prior art keywords
image
face
rectangle
frame
section
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.)
Active
Application number
CN201310105220.6A
Other languages
Chinese (zh)
Other versions
CN103218600A (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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201310105220.6A priority Critical patent/CN103218600B/en
Publication of CN103218600A publication Critical patent/CN103218600A/en
Application granted granted Critical
Publication of CN103218600B publication Critical patent/CN103218600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention discloses a real-time face detection algorithm, relates to a human-computer natural interaction technology and aims to provide a face detection method which occupies a small system resource and is rapid to use. The real-time face detection algorithm has the technical key points that the real-time face detection algorithm comprises the following steps of a step of detecting a whole frame, i.e. carrying out whole-frame face detection on an input image and if face information is not detected, carrying out whole-frame face detection on a next frame of image until the face information is detected; a step of recording a face region obtained by whole-frame detection, i.e. recording positon information of a face in the frame of image and a rectangle size of the face to obtain the face region; a step of sequentially carrying out detection of a forecast position on a first frame of image, a second frame of image, a third frame of image and a fourth frame of image with face information images, which are obtained by whole-frame detection; and repeating the steps to process subsequent images.

Description

A kind of Real Time Face Detection Algorithm Based
Technical field
The present invention relates to human face detection tech in natural human-machine interaction technology, more particularly to computer vision technique and its Real-time implementation.
Background technology
The application of natural human-computer interaction technology and biological identification technology is more and more wider, and human face detection and tracing can be greatly Lift Consumer's Experience.At present, effect stability and it is mainly based upon the AdaBoost people of Haar using more Face datection algorithm Face detection algorithm.The algorithm mainly includes two parts:Training and identification.Training typically adopts offline mode, chooses a large amount of people Face sample, while choosing a large amount of inhuman face images as negative sample, is trained as positive sample, and training is typically time-consuming longer, Training result includes a large amount of Haar features and weights.
The existing practice is:During Face datection, input picture is traveled through by the rectangle of a fixed size, for the rectangle Each position being in, chooses and calculates the Haar features of the image of the position according to training result, and judges the position Whether image is face.Then certain proportion is scaled to input picture, repeats above detection process, until original image is zoomed to Till the bound of the face size of Face datection setting.
It can be seen that, the method needs the multiscale space in image to be traveled through, and the data amount information of process is larger, with place The increase of reason picture size, amount of calculation will be substantially improved, and process the needs per two field picture and be calculated in a large number, will take a large amount of CPU Resource.On a general-purpose computer, the algorithm also is difficult to reach in real time, moreover takes a large amount of system resources.
The content of the invention
The technical problem to be solved is:For above-mentioned problem, there is provided one kind takes less system money Source and quick method for detecting human face.
The technical solution used in the present invention is as follows:Comprise the following steps:
Whole frame detecting step:Whole frame Face datection is carried out to input picture, if being not detected by face information, to next frame Image carries out whole frame Face datection, until detecting face information;
Record the human face region step that whole frame is detected:Record face is located at the positional information and face rectangle of the two field picture Size, obtains human face region;
The whole frame is detected with the 1st two field picture after face information image, the 2nd two field picture, the 3rd two field picture and 4th two field picture is predicted successively position detecting step, and the predicted position detecting step is:The predicted position of image is carried out Face datection, and preserve the human face region position and human face region area for detecting;The predicted position corresponds to former frame figure The position of the human face region being detected as in, the scope of the predicted position is the face area being detected in previous frame image Each side lengthens respectively 20% on the basis of the area of domain, and less than whole image size;
Repeat above steps and process follow-up image.
Preferably, the whole frame detecting step is further included:
Step 101:Skin cluster is carried out to view data, the binary map of broca scale picture is obtained;
Step 102:Successively enter ranks projection and row projection to colour of skin bianry image, and merge adjacent row and column, obtain Area of skin color block;
Step 103:Face datection is carried out respectively to each area of skin color block.
Preferably, the whole frame detecting step 101 includes:
Step 1011:RGB image to being input into carries out color space conversion, obtains yuv space image;
Step 1012:Create a width and the wide contour single channel mask image of input picture, the initialization of all pixels value For 0;
Step 1013:Each pixel of the yuv space image is traveled through, if V the and U components value difference position of certain pixel In the range of [80 ~ 120] and [133 ~ 173], then the value of respective pixel in the single channel mask image is put into 1;So as to obtain The mask image of binaryzation.
Preferably, the step 102 includes:
Step 1021:The mask image of the binaryzation is sued for peace by row to the pixel value of each column, a row vector is obtained;
Step 1022:The row vector is from left to right scanned, is that separator divides the row vector with continuous 5 values less than 30 For several sections, and give up section of the length less than 20;
Step 1023:One sub- mask image list is obtained to remaining each section of construction rectangle;To each section construction square Shape obtains the practice of sub- mask image:The x coordinate of rectangle left upper apex be this section starting point be located at row vector in position, square The y-coordinate of shape left upper apex is 0, and the width of rectangle is the length of this section, and the height of rectangle is the height of input picture;
Proceeding as follows per individual sub- mask image in the sub- mask image list in step 1023:
Step 1024:By the often row summation of row antithetical phrase mask image, a column vector is obtained;
Step 1025:The column vector is scanned from top to bottom, with continuous 5 values less than 10 as separator, the column vector It is divided into several sections, and gives up section of the height less than 10;
Step 1026:One area of skin color block list is obtained to remaining each section of construction rectangle;To each section construction square Shape obtains the practice of area of skin color block:The x coordinate of rectangle left upper apex is that the x of its corresponding sub- mask image left upper apex sits Mark, the y-coordinate of rectangle left upper apex is position of the starting point of this section in column vector, and the width of rectangle is covered for its corresponding son The width of code image, the height of rectangle is the length of this section.
Preferably, Face datection is carried out to each described area of skin color block, human face region is obtained.
Preferably, the method for the Face datection is based on the AdaBoost Face datection algorithms of Haar.
In sum, as a result of above-mentioned technical proposal, the invention has the beneficial effects as follows:
The present invention carries out Face datection to each frame using different methods, and generally, for the 1st, 6,11 ... frame is waited (every 4 frames) are processed by the way of the detection of whole frame, and frame is waited for the 2nd, 3,4,5,7,8,9,10 ..., i.e., whole frame detection Follow-up 4 frame of frame, is processed by the way of predicted position detection.Predicted position is the test position of previous frame, and scope is big It is little respectively to expand 20% up and down for the human face region that detects, but without departing from whole image size.Only look for most in the region Big human face region, quickly, and occupying system resources are less for speed.
Description of the drawings
Examples of the present invention will be described by way of reference to the accompanying drawings, wherein:
Fig. 1 is transformation process schematic diagram of the original input picture to single channel mask image.
Fig. 2 is transformation process schematic diagram of the single channel mask image to sub- mask image list.
Fig. 3 is transformation process schematic diagram of the sub- mask image list to area of skin color block list.
Fig. 4 is the area of skin color block list schematic diagram obtained by one embodiment of the invention.
Fig. 5 is predicted position detecting step schematic diagram of the present invention.
Specific embodiment
All features disclosed in this specification, or disclosed all methods or during the step of, except mutually exclusive Feature and/or step beyond, can combine by any way.
This specification(Including any accessory claim, summary and accompanying drawing)Disclosed in any feature, except non-specifically is chatted State, can alternative features equivalent by other or with similar purpose replaced.I.e., unless specifically stated otherwise, each feature It is an example in a series of equivalent or similar characteristics.
The algorithm improvement point that the present invention is adopted is to carry out Face datection using different methods to each frame, and specific practice is It is such, including:
Whole frame detecting step:Whole frame Face datection is carried out to input picture, if being not detected by face information, to next frame Image carries out whole frame Face datection, until detecting face information;
Record the human face region step that whole frame is detected:The human face region signal includes that face is located at the position of the two field picture Confidence ceases and face rectangle size.
From the beginning of the image with face information is detected by whole frame, successively 4 two field pictures follow-up to its are predicted Position detecting step.
The predicted position detecting step is:Face datection is carried out to the predicted position of image, and preserves the people for detecting Face regional location and human face region area;The predicted position corresponds to the position of the face being detected in previous frame image, The scope of the predicted position is that each side lengthens respectively on the basis of the face rectangular area being detected in previous frame image 20%, and less than whole image size.Such as Fig. 5, in an embodiment of the invention, it is assumed that the face square that former frame is detected The shape upper left corner pinpoints coordinate(x1,y), width is w1, is highly h;Then present frame detection range is that rectangle upper left corner fixed point is sat It is designated as(x1-w1×0.2, y-h×0.2), rectangle width be w1 ×(1+0.2), rectangular elevation be h ×(1+0.2).If people Face rectangle has exceeded image range after expanding 20% outward on one side, then estimation range is limited with the corresponding image boundary in the side.
Repeat the follow-up image of above three step process.
The whole frame detecting step is further included:
Step 101:Skin cluster is carried out to view data, the binary map of broca scale picture is obtained;
Step 102:Successively enter ranks projection and row projection to colour of skin bianry image, and merge adjacent row and column, obtain Area of skin color block;
Step 103:Face datection is carried out respectively to each area of skin color block.
Such as Fig. 1, by taking the image of 640 × 480 sizes as an example, the whole frame detecting step 101 includes:
Step 1011:The RGB image of 640 × 480 sizes to being input into carries out color space conversion, obtains yuv space figure Picture;
Step 1012:The single channel mask image of a width and 640 × 480 sizes is created, all pixels value is initialized as 0;
Step 1013:Each pixel of the yuv space image is traveled through, if V the and U components value difference position of certain pixel In the range of [80 ~ 120] and [133 ~ 173], then the value of respective pixel in the single channel mask image is put into 1;So as to obtain The mask image of the binaryzation of 640 × 480 sizes.
Such as Fig. 2, the step 102 includes:
Step 1021:The mask image of the binaryzation is sued for peace by row to the pixel value of each column, one is obtained and is had 640 The row vector of individual element;
Step 1022:The row vector is from left to right scanned, is separator the row vector with continuous 5 elements less than 30 It is divided into several sections, and gives up section of the length less than 20(For example, certain section has 18 elements);
Step 1023:One sub- mask image list is obtained to remaining each section of construction rectangle;To each section construction square Shape obtains the practice of sub- mask image:The x coordinate of rectangle left upper apex is the position that the starting point element of this section is located in row vector Sequence number in other words is put, the y-coordinate of rectangle left upper apex is 0, and the width of rectangle is the length of this section(For example, the section has 50 Element, then the length of this section is 50), the height of rectangle for input picture height, i.e., 480 pixels;
Such as Fig. 3, to the sub- mask image list in step 1023 in proceed as follows per individual sub- mask image:
Step 1024:By the often row summation of row antithetical phrase mask image, a column vector with 480 elements is obtained;
Step 1025:Scan the column vector from top to bottom, with continuous 5 less than 10 elements as separator, the row to Amount is divided into several sections, and gives up section of the height less than 10;
Step 1026:One area of skin color block list is obtained to remaining each section of construction rectangle;To each section construction square Shape obtains the practice of area of skin color block:The x coordinate of rectangle left upper apex is that the x of its corresponding sub- mask image left upper apex sits Mark, the y-coordinate of rectangle left upper apex is the position that is located in column vector of the starting point element of this section sequence number in other words, the width of rectangle For the width of its corresponding sub- mask image, the height of rectangle is the length of this section.
Carry out Face datection to each described area of skin color block again, obtain human face region information.
The method of Face datection described in predicted position detecting step and step 103 can be normal for this area in the present invention Based on the AdaBoost Face datection algorithms of Haar, due to the classic algorithm that the algorithm is detection face, here is no longer detailed State its principle.
The invention is not limited in aforesaid specific embodiment.The present invention is expanded to and any in this manual disclosed New feature or any new combination, and the arbitrary new method that discloses or the step of process or any new combination.

Claims (6)

1. a kind of Real Time Face Detection Algorithm Based, it is characterised in that comprise the following steps:
Whole frame detecting step:Whole frame Face datection is carried out to input picture, if being not detected by face information, to next two field picture Whole frame Face datection is carried out, until detecting face information;
Record the human face region step that whole frame is detected:The positional information and face rectangle that record face is located at the two field picture is big It is little, obtain human face region;
The whole frame is detected with the 1st two field picture after face information image, the 2nd two field picture, the 3rd two field picture and the 4th frame Image is predicted successively position detecting step, and the predicted position detecting step is:Face is carried out to the predicted position of image Detection, and preserve the human face region position and human face region area for detecting;The predicted position is corresponding in previous frame image The position of the human face region being detected, the scope of the predicted position is the face rectangular surfaces being detected in previous frame image Each side lengthens respectively 20% on the basis of product, and less than whole image size;
It is repeated in These steps and processes follow-up image.
2. algorithm according to claim 1, it is characterised in that the whole frame detecting step is further included:
Step 101:Skin cluster is carried out to view data, the binary map of broca scale picture is obtained;
Step 102:Successively enter ranks projection and row projection to colour of skin bianry image, and merge adjacent row and column, obtain the colour of skin Region unit;
Step 103:Face datection is carried out respectively to each area of skin color block.
3. algorithm according to claim 2, it is characterised in that the whole frame detecting step 101 includes:
Step 1011:RGB image to being input into carries out color space conversion, obtains yuv space image;
Step 1012:A width and the wide contour single channel mask image of input picture are created, all pixels value is initialized as 0;
Step 1013:Each pixel of the yuv space image is traveled through, if V the and U component values of certain pixel are located at respectively In the range of [80 ~ 120] and [133 ~ 173], then the value of respective pixel in the single channel mask image is put into 1;So as to obtain two The mask image of value.
4. algorithm according to claim 3, it is characterised in that the step 102 includes:
Step 1021:The mask image of the binaryzation is sued for peace by row to the pixel value of each column, a row vector is obtained;
Step 1022:The row vector is from left to right scanned, the row vector is divided into number as separator with continuous 5 values less than 30 Section, and give up section of the length less than 20;
Step 1023:One sub- mask image list is obtained to remaining each section of construction rectangle;Each section of construction rectangle is obtained The practice to sub- mask image is:The x coordinate of rectangle left upper apex is the position that the starting point of this section is located in row vector, and rectangle is left The y-coordinate on upper summit is 0, and the width of rectangle is the length of this section, and the height of rectangle is the height of input picture;
Proceeding as follows per individual sub- mask image in the sub- mask image list in step 1023:
Step 1024:By the often row summation of row antithetical phrase mask image, a column vector is obtained;
Step 1025:The column vector is scanned from top to bottom, with continuous 5 values less than 10 as separator, the column vector is divided into Several sections, and give up section of the height less than 10;
Step 1026:One area of skin color block list is obtained to remaining each section of construction rectangle;Each section of construction rectangle is obtained The practice to area of skin color block is:The x coordinate of rectangle left upper apex is the x coordinate of its corresponding sub- mask image left upper apex, The y-coordinate of rectangle left upper apex is the position that the starting point of this section is located in column vector, and the width of rectangle is its corresponding sub- mask The width of image, the height of rectangle is the length of this section.
5. algorithm according to claim 4, it is characterised in that Face datection is carried out to each described area of skin color block, Obtain human face region.
6. the algorithm according to any one in claim 2 ~ 5, it is characterised in that the predicted position detecting step and step The method of the Face datection in rapid 103 is based on the AdaBoost Face datection algorithms of Haar.
CN201310105220.6A 2013-03-29 2013-03-29 Real-time face detection algorithm Active CN103218600B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310105220.6A CN103218600B (en) 2013-03-29 2013-03-29 Real-time face detection algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310105220.6A CN103218600B (en) 2013-03-29 2013-03-29 Real-time face detection algorithm

Publications (2)

Publication Number Publication Date
CN103218600A CN103218600A (en) 2013-07-24
CN103218600B true CN103218600B (en) 2017-05-03

Family

ID=48816369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310105220.6A Active CN103218600B (en) 2013-03-29 2013-03-29 Real-time face detection algorithm

Country Status (1)

Country Link
CN (1) CN103218600B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375892B (en) * 2014-11-14 2018-05-25 广东欧珀移动通信有限公司 A kind of intelligence quickly starts the method, device and mobile terminal for realizing recognition of face
CN106920218B (en) * 2015-12-25 2019-09-10 展讯通信(上海)有限公司 A kind of method and device of image procossing
CN107194817B (en) * 2017-03-29 2023-06-23 腾讯科技(深圳)有限公司 User social information display method and device and computer equipment
CN107273810A (en) * 2017-05-22 2017-10-20 武汉神目信息技术有限公司 A kind of method that Face datection interest region delimited in automatic study
CN109033924A (en) * 2017-06-08 2018-12-18 北京君正集成电路股份有限公司 The method and device of humanoid detection in a kind of video
CN111179276B (en) * 2018-11-12 2024-02-06 北京京东尚科信息技术有限公司 Image processing method and device
CN113221841A (en) * 2021-06-02 2021-08-06 云知声(上海)智能科技有限公司 Face detection and tracking method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1492379A (en) * 2002-10-22 2004-04-28 中国科学院计算技术研究所 Method for covering face of news interviewee using quick face detection
CN102622584A (en) * 2012-03-02 2012-08-01 成都三泰电子实业股份有限公司 Method for detecting mask faces in video monitor
CN102722698A (en) * 2012-05-17 2012-10-10 上海中原电子技术工程有限公司 Method and system for detecting and tracking multi-pose face
CN102750527A (en) * 2012-06-26 2012-10-24 浙江捷尚视觉科技有限公司 Long-time stable human face detection and tracking method in bank scene and long-time stable human face detection and tracking device in bank scene

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1492379A (en) * 2002-10-22 2004-04-28 中国科学院计算技术研究所 Method for covering face of news interviewee using quick face detection
CN102622584A (en) * 2012-03-02 2012-08-01 成都三泰电子实业股份有限公司 Method for detecting mask faces in video monitor
CN102722698A (en) * 2012-05-17 2012-10-10 上海中原电子技术工程有限公司 Method and system for detecting and tracking multi-pose face
CN102750527A (en) * 2012-06-26 2012-10-24 浙江捷尚视觉科技有限公司 Long-time stable human face detection and tracking method in bank scene and long-time stable human face detection and tracking device in bank scene

Also Published As

Publication number Publication date
CN103218600A (en) 2013-07-24

Similar Documents

Publication Publication Date Title
CN103218600B (en) Real-time face detection algorithm
CN110084161B (en) Method and system for rapidly detecting key points of human skeleton
CN106874894B (en) Human body target detection method based on regional full convolution neural network
WO2019232836A1 (en) Multi-scale sensing pedestrian detection method based on improved full convolutional network
EP3306562B1 (en) Image processing method and device
CN103927016B (en) Real-time three-dimensional double-hand gesture recognition method and system based on binocular vision
CN104952083B (en) A kind of saliency detection method based on the modeling of conspicuousness target background
US9639950B2 (en) Site estimation device, site estimation method, and site estimation program
CN105447529A (en) Costume detection and attribute value identification method and system
CN105046206B (en) Based on the pedestrian detection method and device for moving prior information in video
CN102521579B (en) Method for identifying pushing action based on two-dimensional planar camera and system
CN103020993A (en) Visual saliency detection method by fusing dual-channel color contrasts
CN110032932B (en) Human body posture identification method based on video processing and decision tree set threshold
WO2017067287A1 (en) Fingerprint recognition method, apparatus, and terminal
CN111062331B (en) Image mosaic detection method and device, electronic equipment and storage medium
CN104966285A (en) Method for detecting saliency regions
CN102542286A (en) Learning device, learning method, identification device, identification method, and program
CN107944437A (en) A kind of Face detection method based on neutral net and integral image
CN109583341B (en) Method and device for detecting multi-person skeleton key points of image containing portrait
WO2012172706A1 (en) Motion image region identification device and method thereof
CN106846399A (en) A kind of method and device of the vision center of gravity for obtaining image
WO2024139298A1 (en) Image labeling method and apparatus, and electronic device and storage medium
JP5201184B2 (en) Image processing apparatus and program
CN103020631B (en) Human movement identification method based on star model
CN102163277B (en) Area-based complexion dividing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant