A kind of human pilot smoking behavioral value method be applicable under multi-pose
Technical field
The present invention relates to dangerous driving detection method, belong to Vehicle security system field, be specifically related to one and be applicable to multi-pose human face positioning feature point, detect in conjunction with head 3 d pose and carry out the demarcation of facial contour ellipse, and then according to the analysis of cigarette end highlight regions in facial contour ellipse, to judge whether human pilot exists the method for smoking behavior accurately and efficiently.
Background technology
At present, all there is smoking behavior in many human pilots in steering vehicle process, and during smoking, human pilot beats bearing circle often on the other hand, one hand-held cigarette, makes health skew back in spite of oneself, causes centre-of gravity shift, firmly uneven, very easily cause the irregular or distortion of driver behavior; And smoking easily causes, and be clamminess in oral cavity, throat is itched, or cause cough, even can bow and bend over time serious, thus in driving procedure, smoking, by unavoidably affecting the accuracy of human pilot operation, jeopardizes traffic safety.
Meanwhile, in driving procedure, smoking can disperse the notice of human pilot.Physiologic Studies shows, under normal circumstances, after people sucks first cigarette 7.5 seconds, the nicotine in smog just can arrive brain, and this is 2 times of intravenous injection speed; Connect after taking a few mouthfuls of it, the heartbeat of smoker, pulse will be accelerated, and blood pressure will raise, and makes that body is weak, energy is impaired.After about 20 ~ 30 minutes, the effect of nicotine weakens gradually, and the excitability of central nervous system will be suppressed, and the tingle of short time disappears, and sense of fatigue produces thereupon.
In addition, people is when smoking, and the carbon monoxide in cigarette is combined with the haemoglobin of human body, have impact on the combination of haemoglobin and oxygen, thus causes anoxic and the dystrophia of each histoorgan.Experiment proves: if the blood oxygen saturation in human body is lower than 80%, a series of hypoxic conditions will be caused, such as distraction, thinking judgement weaken, memory reduces, slight exercise not harmony, have sense of fatigue etc., and these all can threaten to traffic safety because of rope.
Finally, smoking can affect a conduit made of long bamboo power of driver.Modern medicine study proves, smoking will injure optic nerve, causes visual impairment.The physician of Australia once carried out further investigation with regard to driver's smoking, result shows: inhale 3 cigarettes before driver drives and eyesight will be made to reduce about 20%, thinking reaction velocity is made to reduce by 25%, and vision and light that driver differentiates red, green color can be destroyed, medically this phenomenon is referred to as " stub toxic amblyopia ".Even without the degree reaching slow poisoning, smoking during driving, cause in pilothouse full of smoke, also the eyes of driver can be stimulated, affect its sight line, reduce photosensitive property and the adaptive faculty of its eyes, this will affect driving adaptability (referring to continue the essential physiology of safe driving, psychological characteristic), jeopardize traffic safety.
But temporary without a kind of method of carrying out effective detection and indentification for the smoking behavior of human pilot in driving procedure at present, fleet manager can not promptly and accurately be known the smoking behavior of human pilot and prevent.Therefore, be necessary that in driving procedure, whether there is smoking behavior with regard to human pilot provides a kind of effective detection and determination methods.
Summary of the invention
For solving above-mentioned prior art problem, the object of the present invention is to provide a kind of human pilot smoking behavioral value method be applicable under multi-pose, to realize reducing the effect causing traffic hazard in driving procedure because human pilot is smoked.
For realizing above-mentioned technical purpose, the technical solution used in the present invention is as follows:
Be applicable to the human pilot smoking behavioral value method under multi-pose, it is characterized in that, comprise the following steps:
Step 1: image acquisition, gathers driver's human face image information;
Step 2: image recognition, carries out real-time face detection to the image collected;
Step 3: face feature point is demarcated, and comprising: the face detected is carried out to the positioning feature point such as eyebrow, eyes, nose and face;
Step 4: head 3 d pose detects, and comprising: utilize geometric properties to detect head 3 d pose, judge head pose;
Step 5: facial contour ellipse is demarcated, and comprising: utilize eyebrow, eyes, nose and face marker characteristic point and human pilot head 3 d pose, by linear regression, carries out facial contour ellipse to human pilot and demarcates;
Step 6: carry out the judgement of smoking behavioral value outside the facial contour ellipse demarcated, comprising: the cigarette end highlight regions obtaining candidate, and to region shape analysis to carry out confidence decision-making, thus whether smoking behavior is existed to human pilot and judge.
Further, preferably, in step 2, comprising: adopt the method for statistical study and machine learning to summarize face sample and non-face sample haar statistical nature separately, build the haar sorter distinguishing respective feature again, realize Face detection with haar sorter and detect.
Further, preferably, in step 2, AdaBoost algorithm is used to detect face location.
Further, preferably, in step 3, adopt supervision gradient descent method to carry out face feature point demarcation, supervision gradient descent method is mainly divided into training and detects two links;
Training part was carried out operating and is calculated before system cloud gray model, mainly for obtaining the regression iterative parameter of facial modeling part, algorithm operationally can be positioned accurately to unique points such as eyebrow, eyes, nose, faces in face;
First, to unique points such as the facial image manual markings eyes face noses in all training storehouses, and an average face is obtained;
Secondly, obtain the excitation parameter of average face, i.e. the average of zooming and panning and standard deviation.Do Gaussian distribution sampling for every piece image with this average and standard deviation, obtain the training initial value x of eigenwert point
0, and calculate the sift feature φ of all initial values point
0;
Again, Gradient Descent direction and the deviation factors thereof of eigenwert point can be obtained by formula (1):
Wherein, { d
itraining storehouse in face image set,
it is the unique point true value that facial image concentrates all manual markings.
training characteristics value point x
iwith true value point
between matrix of differences, φ
ibe the sift feature of eigenwert point, R is Gradient Descent direction, and b is deviation factors, and k represents iterations;
Again, by formula (2), the unique point x in each width facial image is upgraded, and recalculates the sift feature upgrading rear unique point:
x
k=x
k-1+R
k-1φ
k-1+b
k-1(2)
Finally, iterative is carried out to formula (1) and formula (2), eigenwert point x
kconverge on true value point x
*, now train end, the Gradient Descent direction in the middle of each iterative process of finally trying to achieve and deviation factors b
knamely required regression iterative parameter is detected.
Further, preferably, in step 3, at detection-phase, specifically comprise:
First, average for the standard obtained in training process face sample is navigated to camera and detect initial coordinate as unique point in the middle of the facial image that obtains;
Secondly, calculate the sift feature of all initial coordinate point, be designated as φ
0;
Finally, carry out regression iterative by formula (3) and calculate final facial characteristics point coordinate,
x
k=x
k-1+R
k-1φ
k-1+b
k-1(3)
Wherein, R
kand b
kthe regression iterative parameter obtained the training stage, φ
kfor the sift feature of each iterative characteristic point.
Further, preferably, in step 5, specifically comprise: detect driver and whether be in the deflection of head and upper and lower pitch attitude, wherein, deflection calculates by following methods:
When face is in front, subnasal point is equal with the angle of eyespot outside left and right;
When face deflection, after namely the side degree of depth rotates, outside subnasal point and left and right, the angle difference of eyespot is β
eye_out, subnasal point β poor with the angle of eyespot in left and right can be calculated to obtain simultaneously
eye_in, the angle difference β of subnasal point and left and right corners of the mouth point
mouth, in order to reduce error, the side degree of depth anglec of rotation of desirable face is the average of these three angles, that is:
Elevation angle can calculate by the following method, comprising:
The outboard profile of face is seen as an ellipse, y-axis is oval middle separated time, and x-axis is the perpendicular bisector of eyes and mouth line, does not so have upper and lower pitching, has α when namely vertical depth rotates
1=α
2.After vertical depth rotates, x-axis is no longer the perpendicular bisector of eyes and mouth line, and according to the character of isosceles triangle, the computing formula of the side degree of depth anglec of rotation is:
α
0, β
0for approximate Attitude estimation value, utilize α
0, β
0as initial value, use quasi-Newton method to human face posture Exact Solution, can in the hope of the accurate deflection angle of human face posture.
Further, preferably, in step 6, in the facial contour ellipse demarcated, carry out the identification of smoking behavioral value, specifically comprise:
First, Gauss curved matching and the segmentation of gray scale self-adaption binaryzation is utilized to obtain the cigarette end highlight regions of candidate;
Secondly, utilize marginal analysis, area size analysis and region shape analysis, respectively confidence decision-making is carried out to candidate's cigarette end highlight regions;
Finally, if marginal analysis in previous step, area size analysis and region shape analysis result all meet cigarette end highlight regions, then assert that driver is just in smoking.
Further, preferably, utilize Gauss curved matching and the segmentation of gray scale self-adaption binaryzation to obtain the cigarette end highlight regions of candidate, its concrete grammar is as follows:
(1) Gauss curved matching is utilized, try to achieve the spot center existed in the middle of picture, if the data point participating in matching has N number of, then this N number of data point is write as the form of matrix: A=BC, in hot spot, the column vector of N number of data point error is: E=A-BC, with least square fitting, make the mean square deviation of N number of data point minimum, that is:
(2) when image real time transfer, data volume is larger, and for reducing calculated amount, matrix B is carried out QR decomposition, that is: B=QR, after decomposing, Q is the orthogonal matrix of a N*N, and R is the upper triangular matrix of a N*5, derives as follows to E=A-BC:
S=R
1C
C=R
1 -1S
Because Q is orthogonal matrix, can obtain:
Order:
Wherein, S is 5 dimensional vectors; T is a N-5 dimensional vector; R1 is the upper triangle square formation of a 5*5, then
In above formula, work as S=R
1obtain minimum value during C, therefore only need solve C=R
1 -1s can solve the parameter of Gaussian function:
X
0, y
0be the central point of hot spot;
(3) with the spot center obtained in previous step point x
0, y
0, adopt self-adaption binaryzation segmentation, obtain the cigarette end highlight regions of candidate.
Further, preferably, utilize marginal analysis, area size analysis and region shape analysis, respectively confidence decision-making is carried out to candidate's cigarette end highlight regions, specific as follows:
Marginal analysis is configured to: cigarette end only may appear at mouth be the center of circle circular scope within;
Area size analysis is configured to: the size of cigarette end highlight regions must meet the objective law of cigarette end size, can not exceed threshold size;
Region shape analysis is configured to: the approximate circle that it is the center of circle that cigarette end highlight regions should be with spot center point in theory.
After this invention takes such scheme, its beneficial effect is as follows:
1, by detection to driver head's 3 d pose, achieve flexible detection, the intellectual analysis of human pilot smoking behavior under multi-angle, multi-pose and accurately judge;
2, have employed supervision gradient descent method to carry out facial modeling, and judge in conjunction with the demarcation of facial contour ellipse, it is made to be more applicable for actual Driving Scene, there is very strong real-time, practicality and reliability, round-the-clock, contactlessly can carry out human pilot smoking behavioral value, for safe driving provides effective safety guarantee.
Embodiment
The technological means realized to make the present invention, creation characteristic, reach object and effect is easy to understand, embodiments of the present invention are described in detail below by embodiment, to the present invention, how application technology means solve technical matters whereby, and the implementation procedure reaching technique effect can fully understand and implement according to this.
Be applicable to the human pilot smoking behavioral value method under multi-pose, include following steps:
Step 1: image acquisition, realizes human pilot face capture function mainly through mark/high-definition camera, from the acquisition human pilot facial image video flowing that camera is real-time, and data stream is delivered to CPU carries out follow-up process;
Step 2: image recognition, real-time face detection is carried out to the image collected, comprise: adopt the method for statistical study and machine learning to summarize face sample and non-face sample haar statistical nature separately, build the haar sorter distinguishing respective feature again, realize Face detection with haar sorter to detect, and use AdaBoost algorithm to detect face location;
Step 3: adopt supervision gradient descent method to carry out face feature point demarcation, comprising: the face detected is carried out to the positioning feature point such as eyebrow, eyes, nose and face, be mainly divided into training and detect two links, wherein:
Training part was carried out operating and is calculated before system cloud gray model, mainly for obtaining the regression iterative parameter of facial modeling part, algorithm operationally can be positioned accurately to unique points such as eyebrow, eyes, nose, faces in face;
First, to unique points such as the facial image manual markings eyes face noses in all training storehouses, and an average face is obtained;
Secondly, obtain the excitation parameter of average face, i.e. the average of zooming and panning and standard deviation.Do Gaussian distribution sampling for every piece image with this average and standard deviation, obtain the training initial value x of eigenwert point
0, and calculate the sift feature φ of all initial values point
0;
Again, Gradient Descent direction and the deviation factors thereof of eigenwert point can be obtained by formula (1):
Wherein, { d
itraining storehouse in face image set,
it is the unique point true value that facial image concentrates all manual markings.
training characteristics value point x
iwith true value point
between matrix of differences, φ
ibe the sift feature of eigenwert point, R is Gradient Descent direction, and b is deviation factors, and k represents iterations;
Again, by formula (2), the unique point x in each width facial image is upgraded, and recalculates the sift feature upgrading rear unique point:
x
k=x
k-1+R
k-1φ
k-1+b
k-1(2)
Finally, iterative is carried out to formula (1) and formula (2), eigenwert point x
kconverge on true value point x
*, now train end, the Gradient Descent direction in the middle of each iterative process of finally trying to achieve and deviation factors b
knamely required regression iterative parameter is detected.
At detection-phase, specifically comprise:
First, average for the standard obtained in training process face sample is navigated to camera and detect initial coordinate as unique point in the middle of the facial image that obtains;
Secondly, calculate the sift feature of all initial coordinate point, be designated as φ
0;
Finally, carry out regression iterative by formula (3) and calculate final facial characteristics point coordinate,
x
k=x
k-1+R
k-1φ
k-1+b
k-1(3)
Wherein, R
kand b
kthe regression iterative parameter obtained the training stage, φ
kfor the sift feature of each iterative characteristic point.
Step 4: head 3 d pose detects, and comprising: utilize geometric properties to detect head 3 d pose, judges head deflection and upper and lower pitch attitude;
Wherein, deflection calculates by following methods:
When face is in front, subnasal point is equal with the angle of eyespot outside left and right;
When face deflection, after namely the side degree of depth rotates, outside subnasal point and left and right, the angle difference of eyespot is β
eye_out, subnasal point β poor with the angle of eyespot in left and right can be calculated to obtain simultaneously
eye_in, the angle difference β of subnasal point and left and right corners of the mouth point
mouth, in order to reduce error, the side degree of depth anglec of rotation of desirable face is the average of these three angles, that is:
Elevation angle can calculate by the following method, comprising:
The outboard profile of face can be regarded as an ellipse, and y-axis is oval middle separated time, and x-axis is the perpendicular bisector of eyes and mouth line, does not so have upper and lower pitching, has α when namely vertical depth rotates
1=α
2.After vertical depth rotates, x-axis is no longer the perpendicular bisector of eyes and mouth line, and according to the character of isosceles triangle, the computing formula of the side degree of depth anglec of rotation is:
α
0, β
0for approximate Attitude estimation value, utilize α
0, β
0as initial value, use quasi-Newton method to human face posture Exact Solution, can in the hope of the accurate deflection angle of human face posture.
Step 5: facial contour ellipse is demarcated, and comprising: utilize eyebrow, eyes, nose and face marker characteristic point and human pilot head 3 d pose, by linear regression, carries out facial contour ellipse to human pilot and demarcates;
Step 6: carry out the judgement of smoking behavioral value outside the facial contour ellipse demarcated, specifically comprise:
First, utilize Gauss curved matching and the segmentation of gray scale self-adaption binaryzation to obtain the cigarette end highlight regions of candidate, concrete grammar is as follows;
(1) Gauss curved matching is utilized, try to achieve the spot center existed in the middle of picture, if the data point participating in matching has N number of, then this N number of data point is write as the form of matrix: A=BC, in hot spot, the column vector of N number of data point error is: E=A-BC, with least square fitting, make the mean square deviation of N number of data point minimum, that is:
(2) when image real time transfer, data volume is larger, and for reducing calculated amount, matrix B is carried out QR decomposition, that is: B=QR, after decomposing, Q is the orthogonal matrix of a N*N, and R is the upper triangular matrix of a N*5, derives as follows to E=A-BC:
S=R
1C
C=R
1 -1S
Because Q is orthogonal matrix, can obtain:
Order:
Wherein, S is 5 dimensional vectors; T is a N-5 dimensional vector; R1 is the upper triangle square formation of a 5*5, then
In above formula, work as S=R
1obtain minimum value during C, therefore only need solve C=R
1 -1s can solve the parameter of Gaussian function:
X
0, y
0be the central point of hot spot;
(3) with the spot center obtained in previous step point x
0, y
0, adopt self-adaption binaryzation segmentation, obtain the cigarette end highlight regions of candidate.
Secondly, utilize marginal analysis, area size analysis and region shape analysis, respectively confidence decision-making is carried out to candidate's cigarette end highlight regions, wherein:
Marginal analysis is configured to: cigarette end only may appear at mouth be the center of circle circular scope within;
Area size analysis is configured to: the size of cigarette end highlight regions must meet the objective law of cigarette end size, can not exceed threshold size;
Region shape analysis is configured to: the approximate circle that it is the center of circle that cigarette end highlight regions should be with spot center point in theory.
Finally, if marginal analysis in previous step, area size analysis and region shape analysis result all meet cigarette end highlight regions, then assert that driver is just in smoking.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, those skilled in the art can modify to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., all should be included within protection scope of the present invention, protection scope of the present invention is as the criterion with the content described in claims.