| With the advancement of the social economy,automobiles have been widely promoted as a very important tool in transportation.The number of car ownership and the number of drivers in China has soared,and road safety is also facing unprecedented pressure.Statistics from the traffic management department show that fatigue driving is the main murderer of traffic accidents.Therefore,designing an accurate and highly real-time fatigue state detection system to reduce the frequency of traffic accidents is an area worthy of further study.The related work of the algorithm is as follows:Firstly,different fatigue detection algorithms are studied.Then the advantages and disadvantages of various fatigue detection algorithms are analyzed,and then the related algorithms are optimized.The related work contents are as follows:(1)Aiming at the problem of low real-time in face detection.In this paper,a simple threshold is used to segment the skin color region,which can reduce the face feature detection range and improve the real-time detection.(2)Optimized Adaboost detection algorithm to improve real-time and accuracy.By optimizing the rate of change of weights to improve the accuracy,the floating point numbers in the Adaboost algorithm are fixed to improve the real-time performance.(3)Using the simple and real-time Phash(Perceptual hash)algorithm to track the face and reduce the number of face detection,the real-time performance of face detection can be improved again.(4)The face area is quickly detected by the previous algorithm and then the human eye detection is performed.The human eye feature extraction was performed using the Adaboost human eye detection algorithm,and then the blinking and blinking judgments were made.Finally,the PERCLOS(Percentage of eyelid Closure over the Pupil over time)algorithm was used to realize the fatigue judgment.The system implementation is as follows:(1)By comparing and analyzing the advantages and disadvantages of fatigue detection under various platforms,the ZYNQ-7000 platform required by this paper was selected.The key modules in the ZYNQ-7000 platform are described in detail.(2)This article uses Vivado HLS high-level synthesis tool to customize the hardware IP core of image processing,including: skin color identification IP core,Otsu binar IP core,etc.Then we configured the hardware structure,storage device and external device of ZYNQ-7000,and realized image acquisition and image display by VGA interface using OV7670 camera.(3)Transplant the image processing code into the ZYNQ development board,and transplant and configure the ZYNQ development board running environment,including U-boot,Opencv image library,Qt function library,Linaro operating system.Finally,the entire system was built for fatigue testing.This paper simulates the actual fatigue detection in the laboratory environment through reasonable software and hardware collaborative division.It has high real-time and convenience,and can reduce the use of hardware logic resources and save development cost. |