WO2019218571A1 - Fatigued driving early warning system based on opencv technology - Google Patents

Fatigued driving early warning system based on opencv technology Download PDF

Info

Publication number
WO2019218571A1
WO2019218571A1 PCT/CN2018/107976 CN2018107976W WO2019218571A1 WO 2019218571 A1 WO2019218571 A1 WO 2019218571A1 CN 2018107976 W CN2018107976 W CN 2018107976W WO 2019218571 A1 WO2019218571 A1 WO 2019218571A1
Authority
WO
WIPO (PCT)
Prior art keywords
sensing device
driver
classifier
infrared sensor
early warning
Prior art date
Application number
PCT/CN2018/107976
Other languages
French (fr)
Chinese (zh)
Inventor
彭力
陶康
关晨晨
李超
张昌伟
吕鹏飞
Original Assignee
江南大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 江南大学 filed Critical 江南大学
Publication of WO2019218571A1 publication Critical patent/WO2019218571A1/en

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/16Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
    • A61B5/18Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state for vehicle drivers or machine operators
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Detecting, measuring or recording devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/11Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb
    • A61B5/1126Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb using a particular sensing technique
    • A61B5/1128Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb using a particular sensing technique using image analysis
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/68Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient
    • A61B5/6887Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient mounted on external non-worn devices, e.g. non-medical devices
    • A61B5/6893Cars
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/74Details of notification to user or communication with user or patient ; user input means
    • A61B5/746Alarms related to a physiological condition, e.g. details of setting alarm thresholds or avoiding false alarms
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/02Alarms for ensuring the safety of persons
    • G08B21/06Alarms for ensuring the safety of persons indicating a condition of sleep, e.g. anti-dozing alarms

Definitions

  • the invention relates to the field of driving safety, in particular to a fatigue driving early warning system based on opencv technology.
  • image recognition Today's research presents a number of techniques for image recognition, that is, computer processing, analysis, and understanding of images to identify targets and objects in various modes.
  • image recognition In general industrial use, industrial cameras are used to take pictures, and then the software is used to further identify and process according to the grayscale difference of the pictures.
  • the mathematical nature of image recognition belongs to the mapping problem from pattern space to category space.
  • image recognition there are mainly three methods of identification: statistical pattern recognition, structural pattern recognition, and fuzzy pattern recognition.
  • Image segmentation is a key technology in image processing, including threshold segmentation method, edge detection method, region extraction method, and segmentation method combined with specific theory tools.
  • driver fatigue monitoring technology In the field of in-vehicle driver fatigue monitoring technology, it is essentially a technique of capturing and analyzing a driver's biological behavior information during driving, such as eyes, face, heart, brain electrical activity, and the like.
  • heartbeat activity and EEG monitoring are not currently applied in batches due to contact restrictions.
  • the most frequently used fatigue detection method is the driver's driving behavior analysis, that is, by recording and analyzing the behavior characteristics of the driver turning the steering wheel and braking, to determine whether the driver is fatigued.
  • This method is greatly affected by the driver's driving habits.
  • Another major category of detection methods is the fatigue assessment of the driver's face and eye features by means of image analysis. This method is gradually being accepted and adopted by OEMs.
  • the existing image detection method has a large false alarm rate and cannot be used well.
  • the technical problem to be solved by the present invention is to provide a fatigue driving early warning system based on opencv technology, which greatly improves the accuracy of the driver's fatigue driving reminder.
  • the present invention provides a fatigue driving warning system based on the opencv technology, comprising an infrared sensor and a camera, wherein the infrared sensor and the camera are connected to the processor through a communication module;
  • the infrared sensor tracks a certain point of the driver's head and collects the physiological signal of the driver. When the driver experiences fatigue and then lowers the physiological signal of the head, the infrared sensor feeds back the distance signal to the processor, and the processor The inspection is based on the distance of the head, and if the specified head distance threshold is exceeded, an early warning is given;
  • the camera performs real-time tracking on the driver's face and transmits the captured image as input data to the processor in a framing manner, and the processor discriminates the collected image and establishes a coordinate system to drive the driver's two
  • the eye is projected to obtain the coordinates of the two eyes, the coordinates of the upper and lower eyelids of the two eyes are quantized by coordinates, and then the difference between the upper and lower eyelids is compared with the set upper and lower eyelid distance thresholds, and the distance between the upper and lower eyelids exceeds the upper and lower eyelid distances. After the threshold, it is determined that the driver is in a state of fatigue at this time, and an early warning is given;
  • the integral image algorithm is used to extract the image feature value, then the weak classifier is strengthened by the feature of the adaboost classifier, and the most useful feature is retained. Finally, the adaboost classifier is modified to obtain the level. Associated with the adaboost classifier, using a cascaded adaboost classifier to discriminate the image;
  • the cascaded adaboost classifier includes the following preparation steps:
  • Step 1) Initially initializing the training data
  • D 1 represents the weight of each sample of the first iteration
  • w 11 represents the weight of the first sample at the first iteration
  • N is the total number of samples
  • Step 2) performing multiple iterations
  • the equation represents that the weak classifier at the mth iteration classifies the sample x into -1 or 1; criterion: the error function of the weak classifier is the smallest, that is, the sum of the weights corresponding to the sample of the fault is the smallest;
  • the speech right a m represents the importance of G m(x) in the final classifier, where a m is equal to e m ; the formula is a classifier that increases as e m decreases, ie, the error rate is small, in the final classifier Of great importance;
  • the weight of the sample that is misclassified will increase, and the weight of the correctly divided will decrease;
  • D m+1 is the weight of the sample used for the next iteration
  • w m+1 is the weight of the i-th sample at the next iteration
  • y i represents that the category corresponding to the i-th sample is 1 or -1
  • G m (x i ) represents the classification of the sample x i by the weak classifier. If the pair is paired, the value of y i *G m (x i ) Is 1, and vice versa -1;
  • Z m is a normalization factor such that the sum of the weights corresponding to all samples is 1, and the formula for calculating Z m is as follows:
  • Step 3 After the iteration is completed, combine the weak classifiers; the combination formula is as follows:
  • a cascaded adaboost classifier is obtained using a combination formula.
  • the communication module adopts a Lora module.
  • the warning reminder and the alarm alarm use a buzzer, and the sound volume and the warning sound are generated by the volume of the buzzer and the interval of the buzzer.
  • the warning reminder uses a warning light to emit a reminder light
  • the alarm alarm indicates that a buzzer is used to sound a warning sound.
  • the information judgment result of the camera and the infrared sensor is information fusion
  • the reliability of the single sensing device itself needs to be judged.
  • the reliability of the single sensing device itself is represented by the measured mean and variance of the sensing device.
  • the measured mean and variance are calculated by the following formula:
  • x(t) is the final judgment result at time t
  • x i (t) is the judgment result of the i-th sensing device at time t.
  • the time series fluctuation is represented by [p i (1), p i (2), ..., p i (t)] T.
  • the sensing device performance is stable, that is, the sensing device The reliability is high, and the weight ratio in all sensing devices is increased; when the time series fluctuates greatly, the sensing device performance is unstable, that is, the reliability of the sensing device is low, and the weights in all sensing devices are The proportion is lower.
  • the invention can detect the facial features generated by the driver during the driving process and the generated series of physiological signals to prevent the driver from generating an unexpected situation during the driving process; the eyes are erratic when the driver is in a fatigue state.
  • a feature performs tracking detection on the human eye, and determines a state of the driver at this time by setting a threshold and comparing the state of the eye at different times with the set threshold;
  • each driver's eye size, whether wearing glasses and lighting, etc. will affect the monitoring. Based on this situation, a reasonable threshold is set for different people's different lighting conditions to judge the state of the driver at this time. The invention can effectively avoid such false alarm problems.
  • the invention proposes a set of face detection method based on Viola-Jones method, firstly uses the integral image algorithm to extract image feature values, and the operation method is fast, and then uses the characteristics of the adaboost classifier to strengthen the weak classifier and retain the most useful features. Therefore, the computational complexity of the detection is reduced, and finally the adaboost classifier is transformed into a cascaded adaboost classifier, which improves the accuracy of face detection.
  • Infrared sensing is used to detect other physiological phenomena such as bowing when the driver is fatigued, so that the infrared sensor detects the shadow and judges the driver's physiological characteristics and then alarms.
  • An embodiment of the fatigue driving early warning system based on the opencv technology of the present invention includes an infrared sensor and a camera, wherein the infrared sensor and the camera are connected to the processor through a communication module;
  • the infrared sensor tracks a certain point of the driver's head and collects the physiological signals of the driver. When the driver experiences fatigue and then lowers the physiological signal of the head, the infrared sensor feeds back the distance signal to the processor, and the processor is based on the head. The distance is checked, and if the specified head distance threshold is exceeded, an early warning is given;
  • the camera tracks the driver's face in real time and transmits the captured image as input data to the processor in a framing manner.
  • the processor discriminates the collected image and establishes a coordinate system to perform the driver's eyes. Projection to obtain the coordinates of the two eyes, coordinate the difference between the upper and lower eyelids of the two eyes by coordinates, the difference between the upper and lower eyelids is calculated by the Euclidean distance formula, and then the upper and lower eyelid difference distances are compared with the set upper and lower eyelid distance thresholds. After the distance between the upper and lower eyelids exceeds the upper and lower eyelid distance threshold, it is determined that the driver is in a state of fatigue at this time, and an early warning is given;
  • the above-mentioned infrared sensor and camera can be used alone or in combination.
  • the infrared sensor detects that the specified head distance threshold is exceeded and the camera detects the upper and lower eyelid distance thresholds, an alarm warning is issued, and an alarm warning is performed. In order to fully determine the existence of dangerous driving conditions, it needs to be corrected immediately;
  • the integral image algorithm is used to extract the image feature value, then the weak classifier is strengthened by the feature of the adaboost classifier, and the most useful feature is retained. Finally, the adaboost classifier is modified to obtain the level. Associated with the adaboost classifier, using a cascaded adaboost classifier to discriminate the image;
  • the cascaded adaboost classifier includes the following preparation steps:
  • Step 1) Initially initializing the training data
  • D 1 represents the weight of each sample of the first iteration
  • w 11 represents the weight of the first sample at the first iteration
  • N is the total number of samples
  • Step 2) performing multiple iterations
  • the equation represents that the weak classifier at the mth iteration classifies the sample x into -1 or 1; criterion: the error function of the weak classifier is the smallest, that is, the sum of the weights corresponding to the sample of the fault is the smallest;
  • the speech right a m represents the importance of G m(x) in the final classifier, where a m is equal to e m ; the formula is a classifier that increases as e m decreases, ie, the error rate is small, in the final classifier Of great importance;
  • the weight of the sample that is misclassified will increase, and the weight of the correctly divided will decrease;
  • D m+1 is the weight of the sample used for the next iteration
  • w m+1 is the weight of the i-th sample at the next iteration
  • y i represents that the category corresponding to the i-th sample is 1 or -1
  • G m (x i ) represents the classification of the sample x i by the weak classifier. If the pair is paired, the value of y i *G m (x i ) Is 1, and vice versa -1;
  • Z m is a normalization factor such that the sum of the weights corresponding to all samples is 1, and the formula for calculating Z m is as follows:
  • Step 3 After the iteration is completed, combine the weak classifiers; the combination formula is as follows:
  • the cascading adaboost classifier is obtained by the combination formula.
  • the cascaded adaboost classifier can find the appropriate threshold value to carry out the recognition and judgment, and is not affected by the driver's eye size, wearing glasses and lighting, etc., and greatly improves the accuracy of the judgment.
  • the communication module adopts the Lora module.
  • the Lora module has ultra-long-distance communication, ultra-low power consumption, remarkable anti-interference characteristics, reliable data transmission, high receiving sensitivity and low cost.
  • the main function in the present invention is to transmit the data collected by the infrared sensor and the camera to the processor.
  • the buzzer is used for both the early warning reminder and the warning alarm, and the alarm sound and the warning sound are generated by the volume of the buzzer and the sounding interval of the buzzer, and the interval may be used when the reminder sound is needed.
  • Longer and lighter sounds so as to avoid excessive damage to the driving environment, when the warning is required, the surface driver has been trapped and affected the driving safety, so the sound with shorter interval, rush and louder volume can be used. To achieve a good early warning effect.
  • the warning reminder uses a warning light to emit a reminder light. Due to a single detection, a false alarm may occur. For example, if the eye has blinking disease or is uncomfortable, it may be detected, and the reminder light is not excessive. Destroy the driving atmosphere, and when the driver appears to bow and blink frequently or close the eyes, the police alarm shows the use of a buzzer to sound a warning sound, achieving a good early warning effect.
  • both the camera and the infrared sensor are used as the sensing device, and the sensing device is first determined.
  • the consistency measure p i (t) of a certain observation time that is, the similarity between the observation value of the i-th sensing device and the observation value of the remaining sensing devices; although the value of p i (t) is relatively large at a certain time,
  • the reliability of the single sensing device itself is represented by the measured mean and variance of the sensing device, and the mean value is measured. And the variance is calculated using the following formula:
  • the ratio of measured mean and variance does not contain parameter adjustment, which avoids the influence of subjective factors, and more truly reflects the characteristics of the sensor itself, that is, more realistically describes the importance of the sensing device in the measurement information.
  • x(t) is the final judgment result at time t
  • x i (t) is the judgment result of the i-th sensing device at time t
  • the time series fluctuation is represented by [p i (1), p i (2), ..., p i (t)] T.
  • the sensing device performance is stable, that is, the sensing device The reliability is high, and the weight ratio in all sensing devices is increased; when the time series fluctuates greatly, the sensing device performance is unstable, that is, the reliability of the sensing device is low, and the weights in all sensing devices are The proportion is reduced to achieve more accurate sensor judgment.
  • the weight is very small, it can be considered that the sensing device is damaged and the stability of use is improved.
  • the invention is a relatively complete detection system. Not only the characteristics produced by the driver's face can be detected, but also the physiological signals generated by the driver can be detected.
  • the technology involved is relatively wide, and the error is small. It mainly comes from the delay of signal transmission and the inevitable noise.
  • the recognition time is short and the sensitivity is relatively high.

Abstract

A fatigued driving early warning system based on opencv technology, comprising an infrared sensor and a camera, wherein the infrared sensor and the camera are both connected to a processor through a communication module; the infrared sensor keeps track of a certain point of a head of a driver and acquires a physiological signal of the driver for determination, so as to perform early warning and reminding; the camera is used for performing real-time tracking of the face of the driver and transmitting the collected image as input data to a processor by using a sub-frame mode, and the processor judges the collected image and determines whether the driver is in a fatigued state at the time, so as to perform early warning and reminding; and alarm warning is performed when the infrared sensor detects that a specified lower-head distance threshold is exceeded and the camera detects that an upper-and-lower eyelid distance threshold is exceeded. The accuracy of reminding about the driver's fatigued driving is greatly improved.

Description

基于opencv技术的疲劳驾驶预警系统Fatigue driving warning system based on opencv technology 技术领域Technical field
本发明涉及行车安全领域,具体涉及一种基于opencv技术的疲劳驾驶预警系统。The invention relates to the field of driving safety, in particular to a fatigue driving early warning system based on opencv technology.
背景技术Background technique
当今研究提出了许多关于图像识别,即计算机对图像进行处理、分析和理解,以识别各种不同模式的目标和对象的技术。一般工业使用中,采用工业相机拍摄图片,然后再利用软件根据图片灰阶差作进一步识别处理。图像识别的数学本质属于模式空间到类别空间的映射问题。目前,在图像识别的发展中,主要有三种识别方法:统计模式识别、结构模式识别、模糊模式识别。图像分割是图像处理中的一项关键技术,包括有阈值分割方法,边缘检测方法,区域提取方法,结合特定理论的工具的分割方法。Today's research presents a number of techniques for image recognition, that is, computer processing, analysis, and understanding of images to identify targets and objects in various modes. In general industrial use, industrial cameras are used to take pictures, and then the software is used to further identify and process according to the grayscale difference of the pictures. The mathematical nature of image recognition belongs to the mapping problem from pattern space to category space. At present, in the development of image recognition, there are mainly three methods of identification: statistical pattern recognition, structural pattern recognition, and fuzzy pattern recognition. Image segmentation is a key technology in image processing, including threshold segmentation method, edge detection method, region extraction method, and segmentation method combined with specific theory tools.
在车内驾驶员疲劳监测技术领域中,本质上是在行驶过程中捕捉并分析驾驶员的生物行为信息,比如眼睛、脸部、心脏、脑电活动,等等的技术等等。然而心跳活动和脑电监测由于受接触的限制,目前没有在车内批量应用。当前最多被采用的疲劳检测手段是驾驶员驾车行为分析,即通过记录和解析驾驶员转动方向盘、踩刹车等行为特征,判别驾驶员是否疲劳。但是这种方式受驾驶员驾驶习惯影响极大。另一大类别的检测方法是:通过图像分析手段对驾驶员脸部与眼睛特征进行疲劳评估。这一方法正渐渐被整车厂商接受并采用。In the field of in-vehicle driver fatigue monitoring technology, it is essentially a technique of capturing and analyzing a driver's biological behavior information during driving, such as eyes, face, heart, brain electrical activity, and the like. However, heartbeat activity and EEG monitoring are not currently applied in batches due to contact restrictions. The most frequently used fatigue detection method is the driver's driving behavior analysis, that is, by recording and analyzing the behavior characteristics of the driver turning the steering wheel and braking, to determine whether the driver is fatigued. However, this method is greatly affected by the driver's driving habits. Another major category of detection methods is the fatigue assessment of the driver's face and eye features by means of image analysis. This method is gradually being accepted and adopted by OEMs.
但是现有的图像检测方式存在较大的误报率,无法很好的达到使用效果。However, the existing image detection method has a large false alarm rate and cannot be used well.
发明内容Summary of the invention
本发明要解决的技术问题是提供一种基于opencv技术的疲劳驾驶预警系统,大大提高驾驶员疲劳驾驶提醒的准确性。The technical problem to be solved by the present invention is to provide a fatigue driving early warning system based on opencv technology, which greatly improves the accuracy of the driver's fatigue driving reminder.
为了解决上述技术问题,本发明提供了一种基于opencv技术的疲劳驾驶预警系统,包括红外传感器和摄像仪,所述红外传感器和摄像仪均通过通信模块 与处理器连接;In order to solve the above technical problem, the present invention provides a fatigue driving warning system based on the opencv technology, comprising an infrared sensor and a camera, wherein the infrared sensor and the camera are connected to the processor through a communication module;
所述红外传感器对驾驶人头部的某个点进行跟踪并采集驾驶人的生理信号,当驾驶人出现疲劳进而将头低下的生理信号时,红外传感器反馈低头的距离信号给处理器,处理器基于低头的距离进行检验,若超过所规定的低头距离阈值时,进行预警提醒;The infrared sensor tracks a certain point of the driver's head and collects the physiological signal of the driver. When the driver experiences fatigue and then lowers the physiological signal of the head, the infrared sensor feeds back the distance signal to the processor, and the processor The inspection is based on the distance of the head, and if the specified head distance threshold is exceeded, an early warning is given;
所述摄像仪对驾驶人的面部进行实时跟踪并采取分帧的方式将所采集的图像作为输入数据传送给处理器,处理器对采集的图像进行判别,并建立坐标系,将驾驶员的两眼进行投影从而得到两眼的坐标,通过坐标量化两只眼睛的上下眼皮相差距离,而后将上下眼皮相差距离与所设置的上下眼皮距离阈值进行比较,当得到的上下眼皮相差距离超出上下眼皮距离阈值后,判定此时驾驶员处于疲劳状态,进行预警提醒;The camera performs real-time tracking on the driver's face and transmits the captured image as input data to the processor in a framing manner, and the processor discriminates the collected image and establishes a coordinate system to drive the driver's two The eye is projected to obtain the coordinates of the two eyes, the coordinates of the upper and lower eyelids of the two eyes are quantized by coordinates, and then the difference between the upper and lower eyelids is compared with the set upper and lower eyelid distance thresholds, and the distance between the upper and lower eyelids exceeds the upper and lower eyelid distances. After the threshold, it is determined that the driver is in a state of fatigue at this time, and an early warning is given;
当红外传感器检测超过所规定的低头距离阈值且摄像仪检测超出上下眼皮距离阈值时,进行报警警示;When the infrared sensor detects that the specified low head distance threshold is exceeded and the camera detects that the upper and lower eyelid distance thresholds are exceeded, an alarm warning is performed;
其中,在对采集的图像进行判别时,先利用积分图像算法来提取图像特征值,接着利用adaboost分类器的特征强化弱分类器,保留最有用特征,最后将adaboost分类器进行改造,制得级联adaboost分类器,采用级联adaboost分类器对图像进行判别;In the process of discriminating the acquired image, the integral image algorithm is used to extract the image feature value, then the weak classifier is strengthened by the feature of the adaboost classifier, and the most useful feature is retained. Finally, the adaboost classifier is modified to obtain the level. Associated with the adaboost classifier, using a cascaded adaboost classifier to discriminate the image;
所述级联adaboost分类器包括以下制备步骤:The cascaded adaboost classifier includes the following preparation steps:
步骤1)首先初始化训练数据;Step 1) Initially initializing the training data;
Figure PCTCN2018107976-appb-000001
Figure PCTCN2018107976-appb-000001
D 1表示第一次迭代的每个样本的权值,w 11表示第1次迭代时的第一个样本的权值,N为样本总数; D 1 represents the weight of each sample of the first iteration, w 11 represents the weight of the first sample at the first iteration, and N is the total number of samples;
步骤2)进行多次迭代;Step 2) performing multiple iterations;
C、使用具有权值分布D m(m=1,2,3…N)的训练样本集进行学习,得到弱 分类器; C. Learning using a training sample set having a weight distribution D m (m=1, 2, 3...N) to obtain a weak classifier;
G m(x):x→{-1,+1} G m(x) : x→{-1, +1}
该式子表示,第m次迭代时的弱分类器,将样本x分类成-1或1;准则:该弱分类器的误差函数最小,也就是分错的样本对应的权值之和最小;The equation represents that the weak classifier at the mth iteration classifies the sample x into -1 or 1; criterion: the error function of the weak classifier is the smallest, that is, the sum of the weights corresponding to the sample of the fault is the smallest;
Figure PCTCN2018107976-appb-000002
是一个常量;
Figure PCTCN2018107976-appb-000002
Is a constant;
其中e m为误差函数值; Where e m is the error function value;
D、计算弱分类器G m(x)的话语权,采用如下公式: D. Calculate the discourse weight of the weak classifier G m(x) , using the following formula:
Figure PCTCN2018107976-appb-000003
Figure PCTCN2018107976-appb-000003
话语权a m表示G m(x)在最终分类器中的重要程度,其中a m等于e m;该公式是随e m减小而增大,即误差率小的分类器,在最终分类器的重要程度大; The speech right a m represents the importance of G m(x) in the final classifier, where a m is equal to e m ; the formula is a classifier that increases as e m decreases, ie, the error rate is small, in the final classifier Of great importance;
C、更新训练样本集的权值分布,用于下一轮迭代;C. Update the weight distribution of the training sample set for the next iteration;
其中,被误分的样本的权值会增大,被正确分的权值减小;Among them, the weight of the sample that is misclassified will increase, and the weight of the correctly divided will decrease;
D m+1=(w m+1,1,w m+1,2,...w m+1,i,...w m+1,N), D m+1 =(w m+1,1 ,w m+1,2 ,...w m+1,i ,...w m+1,N ),
Figure PCTCN2018107976-appb-000004
Figure PCTCN2018107976-appb-000004
上式中D m+1是用于下次迭代时样本的权值,w m+1,i是下一次迭代时,第i个样本的权值; In the above formula, D m+1 is the weight of the sample used for the next iteration, w m+1, i is the weight of the i-th sample at the next iteration;
y i代表第i个样本对应的类别为1或-1,G m(x i)表示弱分类器对样本x i的分类,若果分对,则y i*G m(x i)的值为1,反之为-1; y i represents that the category corresponding to the i-th sample is 1 or -1, and G m (x i ) represents the classification of the sample x i by the weak classifier. If the pair is paired, the value of y i *G m (x i ) Is 1, and vice versa -1;
Z m是归一化因子,使得所有样本对应的权值之和为1,并且Z m的计算公式如下: Z m is a normalization factor such that the sum of the weights corresponding to all samples is 1, and the formula for calculating Z m is as follows:
Figure PCTCN2018107976-appb-000005
Figure PCTCN2018107976-appb-000005
步骤3)迭代完成后,组合弱分类器;组合公式如下:Step 3) After the iteration is completed, combine the weak classifiers; the combination formula is as follows:
Figure PCTCN2018107976-appb-000006
Figure PCTCN2018107976-appb-000006
采用组合公式得到级联adaboost分类器。A cascaded adaboost classifier is obtained using a combination formula.
进一步的,所述上下眼皮相差距离采用欧氏距离公式计算。Further, the difference between the upper and lower eyelids is calculated by the Euclidean distance formula.
进一步的,所述通信模块采用Lora模块。Further, the communication module adopts a Lora module.
进一步的,预警提醒和警报警示采用蜂鸣器,通过蜂鸣器的音量高低以及蜂鸣器的发音间隔达配合发出提醒声和警示声。Further, the warning reminder and the alarm alarm use a buzzer, and the sound volume and the warning sound are generated by the volume of the buzzer and the interval of the buzzer.
进一步的,所述预警提醒采用警示灯发出提醒灯光,所述警报警示采用蜂鸣器发出警示声音。Further, the warning reminder uses a warning light to emit a reminder light, and the alarm alarm indicates that a buzzer is used to sound a warning sound.
进一步的,将摄像仪和红外传感器的信息判断结果进行信息融合;Further, the information judgment result of the camera and the infrared sensor is information fusion;
将摄像仪和红外传感器均作为传感装置,先判断传感装置在某一个观测时刻的一致性测度p i(t),即第i个传感装置的观测值与其余传感装置的观测值的相似度; Taking both the camera and the infrared sensor as sensing devices, first determine the consistency measure p i (t) of the sensing device at a certain observation time, that is, the observation value of the i-th sensing device and the observation values of the remaining sensing devices. Similarity
其中,需要对单个传感装置自身的可靠性进行判断,单个传感装置自身的可靠性通过传感装置的测量均值和方差来表示,测量均值和方差采用如下公式计算:Among them, the reliability of the single sensing device itself needs to be judged. The reliability of the single sensing device itself is represented by the measured mean and variance of the sensing device. The measured mean and variance are calculated by the following formula:
Figure PCTCN2018107976-appb-000007
Figure PCTCN2018107976-appb-000007
Figure PCTCN2018107976-appb-000008
Figure PCTCN2018107976-appb-000008
通过r i(t)和
Figure PCTCN2018107976-appb-000009
进行对单个传感装置判断,单个传感装置一致可靠性测度为:
Figure PCTCN2018107976-appb-000010
By r i (t) and
Figure PCTCN2018107976-appb-000009
Judging the individual sensing devices, the uniform reliability measure of a single sensing device is:
Figure PCTCN2018107976-appb-000010
对上述公式进行归一化:
Figure PCTCN2018107976-appb-000011
Normalize the above formula:
Figure PCTCN2018107976-appb-000011
其中,q i(t)和q j(t)分别表示为两个不同的单个传感装置一致可靠性测度; Where q i (t) and q j (t) are respectively represented as two different uniform sensing measures of a single sensing device;
将测量均值和方差做比值不含有参数调整,将t时刻n个数据按照如下公式进行融合:The ratio of the measured mean and the variance is not included in the parameter adjustment, and the n data at time t is merged according to the following formula:
Figure PCTCN2018107976-appb-000012
Figure PCTCN2018107976-appb-000012
其中,x(t)为t时刻的最终判断结果,x i(t)为t时刻的第i个传感装置的判断结果。 Where x(t) is the final judgment result at time t, and x i (t) is the judgment result of the i-th sensing device at time t.
进一步的,对单个传感装置自身的可靠性进行判断时,需要通过时间序列波动因素分析,对单个传感装置在全部传感装置中的权重进行调整;Further, when judging the reliability of the single sensing device itself, it is necessary to adjust the weight of the single sensing device in all the sensing devices by analyzing the time series fluctuation factors;
时间序列波动由[p i(1),p i(2),...,p i(t)] T表示,当时间序列波动小,则该传感装置性能稳定,即该传感装置的可靠性高,在全部传感装置中的权重占比提高;当时间序列波动大时,则该传感装置性能不稳定,即该传感装置的可靠性低,在全部传感装置中的权重占比降低。 The time series fluctuation is represented by [p i (1), p i (2), ..., p i (t)] T. When the time series fluctuation is small, the sensing device performance is stable, that is, the sensing device The reliability is high, and the weight ratio in all sensing devices is increased; when the time series fluctuates greatly, the sensing device performance is unstable, that is, the reliability of the sensing device is low, and the weights in all sensing devices are The proportion is lower.
本发明的有益效果:The beneficial effects of the invention:
本发明能够针对驾驶人在驾驶过程中出现疲劳产生的面部特征和产生的一系列生理信号进行检测从而避免驾驶人在驾驶过程中产生意外状况;基于驾驶人在出现疲劳状态时眼睛出现飘忽不定这一特征对人眼进行跟踪检测,通过设定一个阈值并将不同时刻眼睛的状态与设定的阈值进行比较,从而判定驾驶人此时的状态;The invention can detect the facial features generated by the driver during the driving process and the generated series of physiological signals to prevent the driver from generating an unexpected situation during the driving process; the eyes are erratic when the driver is in a fatigue state. A feature performs tracking detection on the human eye, and determines a state of the driver at this time by setting a threshold and comparing the state of the eye at different times with the set threshold;
通过设置比较合理地阈值,每个驾驶人眼睛大小,是否戴眼镜以及灯光等因素都会影响监测,基于这种情况对不同人不同灯光条件设置比较合理地阈值从而来判断此时驾驶人的状态,本发明能够有效避免此类误报问题。By setting a reasonable threshold, each driver's eye size, whether wearing glasses and lighting, etc. will affect the monitoring. Based on this situation, a reasonable threshold is set for different people's different lighting conditions to judge the state of the driver at this time. The invention can effectively avoid such false alarm problems.
本发明是提出一套基于Viola-Jones方法的人脸检测方法,先利用积分图像算法来提取图像特征值,运算方法较快,接着利用adaboost分类器的特征强化弱分类器,保留最有用特征,因此减少了检测时的运算复杂度,最后将adaboost分类器进行改造,变成级联adaboost分类器,提高了人脸检测的准确率。The invention proposes a set of face detection method based on Viola-Jones method, firstly uses the integral image algorithm to extract image feature values, and the operation method is fast, and then uses the characteristics of the adaboost classifier to strengthen the weak classifier and retain the most useful features. Therefore, the computational complexity of the detection is reduced, and finally the adaboost classifier is transformed into a cascaded adaboost classifier, which improves the accuracy of face detection.
而红外传感则用于检测驾驶人是否疲劳时的其他生理现象比如低头,这样红外传感器就会检测到阴影从而判断驾驶人出现上述生理特征进而报警。Infrared sensing is used to detect other physiological phenomena such as bowing when the driver is fatigued, so that the infrared sensor detects the shadow and judges the driver's physiological characteristics and then alarms.
具体实施方式Detailed ways
下面结合具体实施例对本发明作进一步说明,以使本领域的技术人员可以更好地理解本发明并能予以实施,但所举实施例不作为对本发明的限定。The present invention will be further described in conjunction with the specific embodiments, which are to be understood by those skilled in the art.
本发明的基于opencv技术的疲劳驾驶预警系统的一实施例,包括红外传感器和摄像仪,所述红外传感器和摄像仪均通过通信模块与处理器连接;An embodiment of the fatigue driving early warning system based on the opencv technology of the present invention includes an infrared sensor and a camera, wherein the infrared sensor and the camera are connected to the processor through a communication module;
红外传感器对驾驶人头部的某个点进行跟踪并采集驾驶人的生理信号,当驾驶人出现疲劳进而将头低下的生理信号时,红外传感器反馈低头的距离信号给处理器,处理器基于低头的距离进行检验,若超过所规定的低头距离阈值时,进行预警提醒;The infrared sensor tracks a certain point of the driver's head and collects the physiological signals of the driver. When the driver experiences fatigue and then lowers the physiological signal of the head, the infrared sensor feeds back the distance signal to the processor, and the processor is based on the head. The distance is checked, and if the specified head distance threshold is exceeded, an early warning is given;
摄像仪对驾驶人的面部进行实时跟踪并采取分帧的方式将所采集的图像作为输入数据传送给处理器,处理器对采集的图像进行判别,并建立坐标系,将驾驶员的两眼进行投影从而得到两眼的坐标,通过坐标量化两只眼睛的上下眼皮相差距离,上下眼皮相差距离采用欧氏距离公式计算,而后将上下眼皮相差距离与所设置的上下眼皮距离阈值进行比较,当得到的上下眼皮相差距离超出上下眼皮距离阈值后,判定此时驾驶员处于疲劳状态,进行预警提醒;The camera tracks the driver's face in real time and transmits the captured image as input data to the processor in a framing manner. The processor discriminates the collected image and establishes a coordinate system to perform the driver's eyes. Projection to obtain the coordinates of the two eyes, coordinate the difference between the upper and lower eyelids of the two eyes by coordinates, the difference between the upper and lower eyelids is calculated by the Euclidean distance formula, and then the upper and lower eyelid difference distances are compared with the set upper and lower eyelid distance thresholds. After the distance between the upper and lower eyelids exceeds the upper and lower eyelid distance threshold, it is determined that the driver is in a state of fatigue at this time, and an early warning is given;
上述的红外传感器和摄像仪可以单独使用,也可以组合使用,当组合使用时,当红外传感器检测超过所规定的低头距离阈值且摄像仪检测超出上下眼皮距离阈值时,进行报警警示,报警警示即为完全判定存在危险驾驶状态,需要立即纠正;The above-mentioned infrared sensor and camera can be used alone or in combination. When combined, when the infrared sensor detects that the specified head distance threshold is exceeded and the camera detects the upper and lower eyelid distance thresholds, an alarm warning is issued, and an alarm warning is performed. In order to fully determine the existence of dangerous driving conditions, it needs to be corrected immediately;
其中,在对采集的图像进行判别时,先利用积分图像算法来提取图像特征值,接着利用adaboost分类器的特征强化弱分类器,保留最有用特征,最后将adaboost分类器进行改造,制得级联adaboost分类器,采用级联adaboost分类器对图像进行判别;In the process of discriminating the acquired image, the integral image algorithm is used to extract the image feature value, then the weak classifier is strengthened by the feature of the adaboost classifier, and the most useful feature is retained. Finally, the adaboost classifier is modified to obtain the level. Associated with the adaboost classifier, using a cascaded adaboost classifier to discriminate the image;
级联adaboost分类器包括以下制备步骤:The cascaded adaboost classifier includes the following preparation steps:
步骤1)首先初始化训练数据;Step 1) Initially initializing the training data;
Figure PCTCN2018107976-appb-000013
Figure PCTCN2018107976-appb-000013
D 1表示第一次迭代的每个样本的权值,w 11表示第1次迭代时的第一个样本的权值,N为样本总数; D 1 represents the weight of each sample of the first iteration, w 11 represents the weight of the first sample at the first iteration, and N is the total number of samples;
步骤2)进行多次迭代;Step 2) performing multiple iterations;
E、使用具有权值分布D m(m=1,2,3…N)的训练样本集进行学习,得到弱分类器; E. learning using a training sample set having a weight distribution D m (m=1, 2, 3...N) to obtain a weak classifier;
G m(x):x→{-1,+1} G m(x) : x→{-1, +1}
该式子表示,第m次迭代时的弱分类器,将样本x分类成-1或1;准则:该弱分类器的误差函数最小,也就是分错的样本对应的权值之和最小;The equation represents that the weak classifier at the mth iteration classifies the sample x into -1 or 1; criterion: the error function of the weak classifier is the smallest, that is, the sum of the weights corresponding to the sample of the fault is the smallest;
Figure PCTCN2018107976-appb-000014
是一个常量;
Figure PCTCN2018107976-appb-000014
Is a constant;
其中e m为误差函数值; Where e m is the error function value;
F、计算弱分类器G m(x)的话语权,采用如下公式: F. Calculate the discourse weight of the weak classifier G m(x) , using the following formula:
Figure PCTCN2018107976-appb-000015
Figure PCTCN2018107976-appb-000015
话语权a m表示G m(x)在最终分类器中的重要程度,其中a m等于e m;该公式是随e m减小而增大,即误差率小的分类器,在最终分类器的重要程度大; The speech right a m represents the importance of G m(x) in the final classifier, where a m is equal to e m ; the formula is a classifier that increases as e m decreases, ie, the error rate is small, in the final classifier Of great importance;
C、更新训练样本集的权值分布,用于下一轮迭代;C. Update the weight distribution of the training sample set for the next iteration;
其中,被误分的样本的权值会增大,被正确分的权值减小;Among them, the weight of the sample that is misclassified will increase, and the weight of the correctly divided will decrease;
D m+1=(w m+1,1,w m+1,2,...w m+1,i,...w m+1,N), D m+1 =(w m+1,1 ,w m+1,2 ,...w m+1,i ,...w m+1,N ),
Figure PCTCN2018107976-appb-000016
Figure PCTCN2018107976-appb-000016
上式中D m+1是用于下次迭代时样本的权值,w m+1,i是下一次迭代时,第i个样本的权值; In the above formula, D m+1 is the weight of the sample used for the next iteration, w m+1, i is the weight of the i-th sample at the next iteration;
y i代表第i个样本对应的类别为1或-1,G m(x i)表示弱分类器对样本x i的分类,若果分对,则y i*G m(x i)的值为1,反之为-1; y i represents that the category corresponding to the i-th sample is 1 or -1, and G m (x i ) represents the classification of the sample x i by the weak classifier. If the pair is paired, the value of y i *G m (x i ) Is 1, and vice versa -1;
Z m是归一化因子,使得所有样本对应的权值之和为1,并且Z m的计算公式如下: Z m is a normalization factor such that the sum of the weights corresponding to all samples is 1, and the formula for calculating Z m is as follows:
Figure PCTCN2018107976-appb-000017
Figure PCTCN2018107976-appb-000017
步骤3)迭代完成后,组合弱分类器;组合公式如下:Step 3) After the iteration is completed, combine the weak classifiers; the combination formula is as follows:
Figure PCTCN2018107976-appb-000018
Figure PCTCN2018107976-appb-000018
采用组合公式得到级联adaboost分类器,级联adaboost分类器可以找到合适的阈值进而进行识别判断,不会受到驾驶人眼睛大小,是否戴眼镜以及灯光等因素的影响,大大提高判断的准确率。The cascading adaboost classifier is obtained by the combination formula. The cascaded adaboost classifier can find the appropriate threshold value to carry out the recognition and judgment, and is not affected by the driver's eye size, wearing glasses and lighting, etc., and greatly improves the accuracy of the judgment.
通信模块采用Lora模块,Lora模块具有超长距离通信,超低功耗,抗干扰特性显著,数据传输可靠,超高的接收灵敏度,低成本等特点。在本发明中主要作用是将红外传感和摄像仪采集到的数据传送给处理器。The communication module adopts the Lora module. The Lora module has ultra-long-distance communication, ultra-low power consumption, remarkable anti-interference characteristics, reliable data transmission, high receiving sensitivity and low cost. The main function in the present invention is to transmit the data collected by the infrared sensor and the camera to the processor.
在一实施例中,预警提醒和警报警示均采用蜂鸣器,通过蜂鸣器的音量高低以及蜂鸣器的发音间隔达配合发出提醒声和警示声,当需要发出提醒声时,可以采用间隔较长和音量较轻的声音,从而避免过多的破坏行车环境,而当需要发出警报警示时,表面驾驶人员已经犯困,影响行车安全,因此可以采用间隔较短、急促和音量较大的声音,从而达到良好的预警效果。In an embodiment, the buzzer is used for both the early warning reminder and the warning alarm, and the alarm sound and the warning sound are generated by the volume of the buzzer and the sounding interval of the buzzer, and the interval may be used when the reminder sound is needed. Longer and lighter sounds, so as to avoid excessive damage to the driving environment, when the warning is required, the surface driver has been trapped and affected the driving safety, so the sound with shorter interval, rush and louder volume can be used. To achieve a good early warning effect.
在一实施例中,预警提醒采用警示灯发出提醒灯光,由于单项检测时,可能出现误报现象,例如眼睛存在眨眼疾病或者不舒服时,可能会被检测到,而提醒灯光不会过多的破坏行车氛围,而当驾驶人员出现低头和眨眼频繁或者闭眼时,警报警示采用蜂鸣器发出警示声音,达到良好的预警效果。In an embodiment, the warning reminder uses a warning light to emit a reminder light. Due to a single detection, a false alarm may occur. For example, if the eye has blinking disease or is uncomfortable, it may be detected, and the reminder light is not excessive. Destroy the driving atmosphere, and when the driver appears to bow and blink frequently or close the eyes, the police alarm shows the use of a buzzer to sound a warning sound, achieving a good early warning effect.
上述在对摄像仪和红外传感器的信息判断结果进行融合判断时,需要对摄像仪和红外传感器进行信息数据可靠信判断,首先将摄像仪和红外传感器均作为传感装置,先判断传感装置在某一个观测时刻的一致性测度p i(t),即第i个 传感装置的观测值与其余传感装置的观测值的相似度;虽然在某一个时刻p i(t)值比较大,但不能说明在整个观测区间上传感器的可靠性高,还需要对单个传感装置自身的可靠性进行判断,单个传感装置自身的可靠性通过传感装置的测量均值和方差来表示,测量均值和方差采用如下公式计算: In the above-mentioned fusion judgment of the information judgment result of the camera and the infrared sensor, it is necessary to perform reliable information judgment on the information data of the camera and the infrared sensor. First, both the camera and the infrared sensor are used as the sensing device, and the sensing device is first determined. The consistency measure p i (t) of a certain observation time, that is, the similarity between the observation value of the i-th sensing device and the observation value of the remaining sensing devices; although the value of p i (t) is relatively large at a certain time, However, it cannot be said that the reliability of the sensor is high throughout the observation interval, and the reliability of the single sensing device itself needs to be judged. The reliability of the single sensing device itself is represented by the measured mean and variance of the sensing device, and the mean value is measured. And the variance is calculated using the following formula:
Figure PCTCN2018107976-appb-000019
Figure PCTCN2018107976-appb-000019
Figure PCTCN2018107976-appb-000020
Figure PCTCN2018107976-appb-000020
上述公式中的k为t时刻转换为计算机周期的表达;k in the above formula is converted to the expression of the computer cycle at time t;
由于r i(t)和
Figure PCTCN2018107976-appb-000021
均是传感装置自身的重要参数,因此单个传感装置一致可靠性测度为:
Figure PCTCN2018107976-appb-000022
Due to r i (t) and
Figure PCTCN2018107976-appb-000021
Both are important parameters of the sensing device itself, so the uniform reliability measure of a single sensing device is:
Figure PCTCN2018107976-appb-000022
对上述公式进行归一化:
Figure PCTCN2018107976-appb-000023
Normalize the above formula:
Figure PCTCN2018107976-appb-000023
其中,q i(t)和q j(t)分别表示为两个不同的单个传感装置一致可靠性测度; Where q i (t) and q j (t) are respectively represented as two different uniform sensing measures of a single sensing device;
将测量均值和方差做比值不含有参数调整,避免了由主观因素影响,更加真实的反映了传感器自身的特性,即更加真实的刻画了了传感装置在测量信息中的重要程度,将t时刻n个数据按照如下公式进行融合:The ratio of measured mean and variance does not contain parameter adjustment, which avoids the influence of subjective factors, and more truly reflects the characteristics of the sensor itself, that is, more realistically describes the importance of the sensing device in the measurement information. The n data are merged according to the following formula:
Figure PCTCN2018107976-appb-000024
Figure PCTCN2018107976-appb-000024
其中,x(t)为t时刻的最终判断结果,x i(t)为t时刻的第i个传感装置的判断结果,最终能够得到更加合理的判断结果。 Where x(t) is the final judgment result at time t, and x i (t) is the judgment result of the i-th sensing device at time t, and finally a more reasonable judgment result can be obtained.
在对单个传感装置自身的可靠性进行判断时,需要通过时间序列波动因素分析,对单个传感装置在全部传感装置中的权重进行调整;When judging the reliability of a single sensing device itself, it is necessary to adjust the weight of a single sensing device in all sensing devices by analyzing time series fluctuation factors;
时间序列波动由[p i(1),p i(2),...,p i(t)] T表示,当时间序列波动小,则该 传感装置性能稳定,即该传感装置的可靠性高,在全部传感装置中的权重占比提高;当时间序列波动大时,则该传感装置性能不稳定,即该传感装置的可靠性低,在全部传感装置中的权重占比降低,从而达到更为精准的传感器判断,当权重极小时,可以认为是传感装置损坏,提高使用稳定性。 The time series fluctuation is represented by [p i (1), p i (2), ..., p i (t)] T. When the time series fluctuation is small, the sensing device performance is stable, that is, the sensing device The reliability is high, and the weight ratio in all sensing devices is increased; when the time series fluctuates greatly, the sensing device performance is unstable, that is, the reliability of the sensing device is low, and the weights in all sensing devices are The proportion is reduced to achieve more accurate sensor judgment. When the weight is very small, it can be considered that the sensing device is damaged and the stability of use is improved.
本发明是一个相对比较完整的检测体系。不仅可以对驾驶人面部产生的特征进行检测,也可以对于驾驶人产生的生理信号进行检测。涉及的技术也相对比较广泛,误差较小,主要来源于信号传输的延迟和不可避免的噪声,识别时间很短,灵敏度比较高。The invention is a relatively complete detection system. Not only the characteristics produced by the driver's face can be detected, but also the physiological signals generated by the driver can be detected. The technology involved is relatively wide, and the error is small. It mainly comes from the delay of signal transmission and the inevitable noise. The recognition time is short and the sensitivity is relatively high.
以上实施例仅是为充分说明本发明而所举的较佳的实施例,本发明的保护范围不限于此。本技术领域的技术人员在本发明基础上所作的等同替代或变换,均在本发明的保护范围之内。本发明的保护范围以权利要求书为准。The above embodiments are merely preferred embodiments for the purpose of fully illustrating the present invention, and the scope of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are within the scope of the present invention. The scope of the invention is defined by the claims.

Claims (7)

  1. 一种基于opencv技术的疲劳驾驶预警系统,其特征在于,包括红外传感器和摄像仪,所述红外传感器和摄像仪均通过通信模块与处理器连接;A fatigue driving early warning system based on opencv technology, comprising: an infrared sensor and a camera, wherein the infrared sensor and the camera are connected to the processor through a communication module;
    所述红外传感器对驾驶人头部的某个点进行跟踪并采集驾驶人的生理信号,当驾驶人出现疲劳进而将头低下的生理信号时,红外传感器反馈低头的距离信号给处理器,处理器基于低头的距离进行检验,若超过所规定的低头距离阈值时,进行预警提醒;The infrared sensor tracks a certain point of the driver's head and collects the physiological signal of the driver. When the driver experiences fatigue and then lowers the physiological signal of the head, the infrared sensor feeds back the distance signal to the processor, and the processor The inspection is based on the distance of the head, and if the specified head distance threshold is exceeded, an early warning is given;
    所述摄像仪对驾驶人的面部进行实时跟踪并采取分帧的方式将所采集的图像作为输入数据传送给处理器,处理器对采集的图像进行判别,并建立坐标系,将驾驶员的两眼进行投影从而得到两眼的坐标,通过坐标量化两只眼睛的上下眼皮相差距离,而后将上下眼皮相差距离与所设置的上下眼皮距离阈值进行比较,当得到的上下眼皮相差距离超出上下眼皮距离阈值后,判定此时驾驶员处于疲劳状态,进行预警提醒;The camera performs real-time tracking on the driver's face and transmits the captured image as input data to the processor in a framing manner, and the processor discriminates the collected image and establishes a coordinate system to drive the driver's two The eye is projected to obtain the coordinates of the two eyes, the coordinates of the upper and lower eyelids of the two eyes are quantized by coordinates, and then the difference between the upper and lower eyelids is compared with the set upper and lower eyelid distance thresholds, and the distance between the upper and lower eyelids exceeds the upper and lower eyelid distances. After the threshold, it is determined that the driver is in a state of fatigue at this time, and an early warning is given;
    当红外传感器检测超过所规定的低头距离阈值且摄像仪检测超出上下眼皮距离阈值时,进行报警警示;When the infrared sensor detects that the specified low head distance threshold is exceeded and the camera detects that the upper and lower eyelid distance thresholds are exceeded, an alarm warning is performed;
    其中,在对采集的图像进行判别时,先利用积分图像算法来提取图像特征值,接着利用adaboost分类器的特征强化弱分类器,保留最有用特征,最后将adaboost分类器进行改造,制得级联adaboost分类器,采用级联adaboost分类器对图像进行判别;In the process of discriminating the acquired image, the integral image algorithm is used to extract the image feature value, then the weak classifier is strengthened by the feature of the adaboost classifier, and the most useful feature is retained. Finally, the adaboost classifier is modified to obtain the level. Associated with the adaboost classifier, using a cascaded adaboost classifier to discriminate the image;
    所述级联adaboost分类器包括以下制备步骤:The cascaded adaboost classifier includes the following preparation steps:
    步骤1)首先初始化训练数据;Step 1) Initially initializing the training data;
    Figure PCTCN2018107976-appb-100001
    Figure PCTCN2018107976-appb-100001
    D 1表示第一次迭代的每个样本的权值,w 11表示第1次迭代时的第一个样本的权值,N为样本总数; D 1 represents the weight of each sample of the first iteration, w 11 represents the weight of the first sample at the first iteration, and N is the total number of samples;
    步骤2)进行多次迭代;Step 2) performing multiple iterations;
    A、使用具有权值分布Dm(m=1,2,3…N)的训练样本集进行学习,得到弱分类器;A. Learning using a training sample set having a weight distribution Dm (m=1, 2, 3...N) to obtain a weak classifier;
    G m(x):x→{-1,+1} G m(x) : x→{-1, +1}
    该式子表示,第m次迭代时的弱分类器,将样本x分类成-1或1;The equation represents that the weak classifier at the mth iteration classifies the sample x into -1 or 1;
    准则:该弱分类器的误差函数最小,也就是分错的样本对应的权值之和最小;Criterion: The error function of the weak classifier is the smallest, that is, the sum of the weights corresponding to the sample of the fault is the smallest;
    Figure PCTCN2018107976-appb-100002
    是一个常量;
    Figure PCTCN2018107976-appb-100002
    Is a constant;
    其中e m为误差函数值; Where e m is the error function value;
    B、计算弱分类器G m(x)的话语权,采用如下公式: B. Calculate the discourse weight of the weak classifier G m(x) , using the following formula:
    Figure PCTCN2018107976-appb-100003
    Figure PCTCN2018107976-appb-100003
    话语权a m表示G m(x)在最终分类器中的重要程度,其中a m等于e m;该公式是随e m减小而增大,即误差率小的分类器,在最终分类器的重要程度大; The speech right a m represents the importance of G m(x) in the final classifier, where a m is equal to e m ; the formula is a classifier that increases as e m decreases, ie, the error rate is small, in the final classifier Of great importance;
    C、更新训练样本集的权值分布,用于下一轮迭代;C. Update the weight distribution of the training sample set for the next iteration;
    其中,被误分的样本的权值会增大,被正确分的权值减小;Among them, the weight of the sample that is misclassified will increase, and the weight of the correctly divided will decrease;
    D m+1=(w m+1,1,w m+1,2,...w m+1,i,...w m+1,N), D m+1 =(w m+1,1 ,w m+1,2 ,...w m+1,i ,...w m+1,N ),
    Figure PCTCN2018107976-appb-100004
    Figure PCTCN2018107976-appb-100004
    上式中D m+1是用于下次迭代时样本的权值,w m+1,i是下一次迭代时,第i个样本的权值; In the above formula, D m+1 is the weight of the sample used for the next iteration, w m+1, i is the weight of the i-th sample at the next iteration;
    y i代表第i个样本对应的类别为1或-1,G m(x i)表示弱分类器对样本x i的分类,若果分对,则y i*G m(x i)的值为1,反之为-1; y i represents that the category corresponding to the i-th sample is 1 or -1, and G m (x i ) represents the classification of the sample x i by the weak classifier. If the pair is paired, the value of y i *G m (x i ) Is 1, and vice versa -1;
    Z m是归一化因子,使得所有样本对应的权值之和为1,并且Z m的计算公式 如下: Z m is a normalization factor such that the sum of the weights corresponding to all samples is 1, and the formula for calculating Z m is as follows:
    Figure PCTCN2018107976-appb-100005
    Figure PCTCN2018107976-appb-100005
    步骤3)迭代完成后,组合弱分类器;组合公式如下:Step 3) After the iteration is completed, combine the weak classifiers; the combination formula is as follows:
    Figure PCTCN2018107976-appb-100006
    Figure PCTCN2018107976-appb-100006
    采用组合公式得到级联adaboost分类器。A cascaded adaboost classifier is obtained using a combination formula.
  2. 如权利要求1所述的基于opencv技术的疲劳驾驶预警系统,其特征在于,所述上下眼皮相差距离采用欧氏距离公式计算。The fatigue driving early warning system based on the opencv technology according to claim 1, wherein the upper and lower eyelids are separated by an Euclidean distance formula.
  3. 如权利要求1所述的基于opencv技术的疲劳驾驶预警系统,其特征在于,所述通信模块采用Lora模块。The fatigue driving early warning system based on opencv technology according to claim 1, wherein the communication module adopts a Lora module.
  4. 如权利要求1所述的基于opencv技术的疲劳驾驶预警系统,其特征在于,预警提醒和警报警示采用蜂鸣器,通过蜂鸣器的音量高低以及蜂鸣器的发音间隔达配合发出提醒声和警示声。The fatigue driving warning system based on opencv technology according to claim 1, wherein the warning reminder and the warning alarm are displayed by using a buzzer, and the sound volume of the buzzer and the sounding interval of the buzzer are combined to sound a reminder sound. Warning sound.
  5. 如权利要求1所述的基于opencv技术的疲劳驾驶预警系统,其特征在于,所述预警提醒采用警示灯发出提醒灯光,所述警报警示采用蜂鸣器发出警示声音。The fatigue driving early warning system based on the opencv technology according to claim 1, wherein the warning reminder uses a warning light to emit a reminder light, and the warning alarm indicates that a buzzer is used to issue a warning sound.
  6. 如权利要求1所述的基于opencv技术的疲劳驾驶预警系统,其特征在于,将摄像仪和红外传感器的信息判断结果进行信息融合;The fatigue driving early warning system based on the opencv technology according to claim 1, wherein the information judgment result of the camera and the infrared sensor is information fusion;
    将摄像仪和红外传感器均作为传感装置,先判断传感装置在某一个观测时刻的一致性测度p i(t),即第i个传感装置的观测值与其余传感装置的观测值的相似度; Taking both the camera and the infrared sensor as sensing devices, first determine the consistency measure p i (t) of the sensing device at a certain observation time, that is, the observation value of the i-th sensing device and the observation values of the remaining sensing devices. Similarity
    其中,需要对单个传感装置自身的可靠性进行判断,单个传感装置自身的可靠性通过传感装置的测量均值和方差来表示,测量均值和方差采用如下公式计算:Among them, the reliability of the single sensing device itself needs to be judged. The reliability of the single sensing device itself is represented by the measured mean and variance of the sensing device. The measured mean and variance are calculated by the following formula:
    Figure PCTCN2018107976-appb-100007
    Figure PCTCN2018107976-appb-100007
    Figure PCTCN2018107976-appb-100008
    Figure PCTCN2018107976-appb-100008
    通过r i(t)和
    Figure PCTCN2018107976-appb-100009
    进行对单个传感装置判断,单个传感装置一致可靠性测度为:
    Figure PCTCN2018107976-appb-100010
    By r i (t) and
    Figure PCTCN2018107976-appb-100009
    Judging the individual sensing devices, the uniform reliability measure of a single sensing device is:
    Figure PCTCN2018107976-appb-100010
    对上述公式进行归一化:
    Figure PCTCN2018107976-appb-100011
    Normalize the above formula:
    Figure PCTCN2018107976-appb-100011
    其中,q i(t)和q j(t)分别表示为两个不同的单个传感装置一致可靠性测度; Where q i (t) and q j (t) are respectively represented as two different uniform sensing measures of a single sensing device;
    将测量均值和方差做比值不含有参数调整,将t时刻n个数据按照如下公式进行融合:The ratio of the measured mean and the variance is not included in the parameter adjustment, and the n data at time t is merged according to the following formula:
    Figure PCTCN2018107976-appb-100012
    Figure PCTCN2018107976-appb-100012
    其中,x(t)为t时刻的最终判断结果,x i(t)为t时刻的第i个传感装置的判断结果。 Where x(t) is the final judgment result at time t, and x i (t) is the judgment result of the i-th sensing device at time t.
  7. 如权利要求6所述的基于opencv技术的疲劳驾驶预警系统,其特征在于,对单个传感装置自身的可靠性进行判断时,需要通过时间序列波动因素分析,对单个传感装置在全部传感装置中的权重进行调整;The fatigue driving early warning system based on opencv technology according to claim 6, wherein when the reliability of the single sensing device itself is judged, it is necessary to analyze all the sensing devices by time series fluctuation factors. The weights in the device are adjusted;
    时间序列波动由[p i(1),p i(2),...,p i(t)] T表示,当时间序列波动小,则该传感装置性能稳定,即该传感装置的可靠性高,在全部传感装置中的权重占比提高;当时间序列波动大时,则该传感装置性能不稳定,即该传感装置的可靠性低,在全部传感装置中的权重占比降低。 The time series fluctuation is represented by [p i (1), p i (2), ..., p i (t)] T. When the time series fluctuation is small, the sensing device performance is stable, that is, the sensing device The reliability is high, and the weight ratio in all sensing devices is increased; when the time series fluctuates greatly, the sensing device performance is unstable, that is, the reliability of the sensing device is low, and the weights in all sensing devices are The proportion is lower.
PCT/CN2018/107976 2018-05-15 2018-09-27 Fatigued driving early warning system based on opencv technology WO2019218571A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810463181.X 2018-05-15
CN201810463181.XA CN108618789A (en) 2018-05-15 2018-05-15 Driver fatigue monitor system based on opencv technologies

Publications (1)

Publication Number Publication Date
WO2019218571A1 true WO2019218571A1 (en) 2019-11-21

Family

ID=63693450

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/107976 WO2019218571A1 (en) 2018-05-15 2018-09-27 Fatigued driving early warning system based on opencv technology

Country Status (2)

Country Link
CN (1) CN108618789A (en)
WO (1) WO2019218571A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111123406A (en) * 2019-12-25 2020-05-08 哈尔滨工大雷信科技有限公司 Handheld meteorological instrument temperature data fitting method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010029537A (en) * 2008-07-30 2010-02-12 Toyota Motor Corp Wakefulness level determining apparatus
CN103400471A (en) * 2013-08-12 2013-11-20 电子科技大学 Detecting system and detecting method for fatigue driving of driver
CN106530622A (en) * 2016-12-20 2017-03-22 北京新能源汽车股份有限公司 Method of preventing fatigue driving and apparatus thereof
CN107862832A (en) * 2017-11-05 2018-03-30 佛山鑫进科技有限公司 A kind of Study in Driver Fatigue State Surveillance System

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010029537A (en) * 2008-07-30 2010-02-12 Toyota Motor Corp Wakefulness level determining apparatus
CN103400471A (en) * 2013-08-12 2013-11-20 电子科技大学 Detecting system and detecting method for fatigue driving of driver
CN106530622A (en) * 2016-12-20 2017-03-22 北京新能源汽车股份有限公司 Method of preventing fatigue driving and apparatus thereof
CN107862832A (en) * 2017-11-05 2018-03-30 佛山鑫进科技有限公司 A kind of Study in Driver Fatigue State Surveillance System

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DONG YANG: "Research of driver fatigue monitoring method base on facial features", CHINA MASTER'S THESES FULL-TEXT DATABASE, 31 March 2015 (2015-03-31) *
HUANG: "A Study of Fatigue Detection Methods Based on Video Analysis", CHINA MASTER'S THESES FULL-TEXT DATABASE, 31 May 2013 (2013-05-31) *

Also Published As

Publication number Publication date
CN108618789A (en) 2018-10-09

Similar Documents

Publication Publication Date Title
US11783601B2 (en) Driver fatigue detection method and system based on combining a pseudo-3D convolutional neural network and an attention mechanism
US10521014B2 (en) Systems, methods, apparatuses and devices for detecting facial expression and for tracking movement and location in at least one of a virtual and augmented reality system
CN108053615B (en) Method for detecting fatigue driving state of driver based on micro-expression
Kong et al. A system of driving fatigue detection based on machine vision and its application on smart device
EP2363067B1 (en) Arousal state classification model generating device, arousal state classifying device, and warning device
CN100592322C (en) An automatic computer authentication method for photographic faces and living faces
US9105172B2 (en) Drowsiness-estimating device and drowsiness-estimating method
CN110811649A (en) Fatigue driving detection method based on bioelectricity and behavior characteristic fusion
CN108596087B (en) Driving fatigue degree detection regression model based on double-network result
CN110859609B (en) Multi-feature fusion fatigue driving detection method based on voice analysis
CN112801000B (en) Household old man falling detection method and system based on multi-feature fusion
CN111753674A (en) Fatigue driving detection and identification method based on deep learning
CN109740477A (en) Study in Driver Fatigue State Surveillance System and its fatigue detection method
CN107563346A (en) One kind realizes that driver fatigue sentences method for distinguishing based on eye image processing
CN108108651B (en) Method and system for detecting driver non-attentive driving based on video face analysis
CN113989788A (en) Fatigue detection method based on deep learning and multi-index fusion
CN109567832A (en) A kind of method and system of the angry driving condition of detection based on Intelligent bracelet
Taghvaei et al. Image-based fall detection and classification of a user with a walking support system
Walizad et al. Driver drowsiness detection system using convolutional neural network
Flores-Monroy et al. Visual-based real time driver drowsiness detection system using CNN
CN107315997B (en) Sight orientation judgment method and system based on rapid feature point positioning
WO2019218571A1 (en) Fatigued driving early warning system based on opencv technology
Xu et al. Efficient eye states detection in real-time for drowsy driving monitoring system
Xiang et al. Comparison of the Deep Learning Methods Applied on Human Eye Detection
CN113901866A (en) Fatigue driving early warning method based on machine vision

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18918723

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18918723

Country of ref document: EP

Kind code of ref document: A1