Fatigue driving prevention signal lamp and atmosphere lamp control method and vehicle

By combining image processing and data analysis with multi-source feature fusion and dynamic vehicle speed threshold adjustment, the state determination logic of fatigue monitoring technology has been optimized, solving the problems of frequent state switching and poor warning effect in existing technologies, and improving the stability of monitoring and the safety of high-speed driving.

CN121963155APending Publication Date: 2026-05-01CHINA FAW CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA FAW CO LTD
Filing Date
2025-12-12
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing fatigue monitoring technologies are susceptible to signal fluctuations and frequent switching in their state determination logic. Threshold settings lack speed adaptability, and warning interaction methods are limited and subject to projection distortion, resulting in unstable monitoring results and poor warning effects.

Method used

Image processing and data analysis are employed to convert images to grayscale using a weighted average method, perform histogram equalization and Gaussian filtering, combine face region detection and facial key point localization, calculate the fatigue index of multi-source feature fusion, and introduce hysteresis comparison logic and vehicle speed dynamic threshold adjustment to control indoor and outdoor lighting components to provide multi-dimensional warnings.

Benefits of technology

The stability of the state determination logic has been optimized, improving the monitoring safety in high-speed driving scenarios. The linkage warning of the vehicle's internal and external lights has been realized, ensuring the effectiveness of the driver's visual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963155A_ABST
    Figure CN121963155A_ABST
Patent Text Reader

Abstract

The invention discloses an anti-fatigue driving signal lamp and atmosphere lamp control method and a vehicle, and relates to the technical field of vehicle intelligent auxiliary driving and active safety, and the method comprises the steps: collecting a cab video stream, and positioning face key points after image preprocessing; calculating an eye PERCLOS index and a mouth yawning frequency, and dynamically adjusting a weight based on a face angle so as to fuse and calculate a comprehensive fatigue index; carrying out grading judgment on the index by utilizing a hysteresis interval containing a starting threshold value and a reset threshold value, and reducing a judgment threshold value in real time by utilizing a linear model according to the vehicle speed; and driving an indoor atmosphere lamp to execute a breathing or stroboscopic mode according to the judged sober, mild or severe fatigue grade, controlling an outdoor signal lamp and a road surface projection assembly to execute corresponding warning actions, and performing reverse pre-distortion processing on a projected image. According to the invention, through multi-source feature fusion, hysteresis threshold determination and vehicle speed correction mechanisms, the stability of fatigue monitoring and the accuracy of warning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

A method for controlling anti-fatigue driving signal lights and ambient lights, and a vehicle. Technical Field

[0001] This application relates to the field of intelligent assisted driving and active safety technology for vehicles, and in particular to a method for controlling anti-fatigue driving signal lights and ambient lights, as well as a vehicle. Background Technology

[0002] Fatigue driving is one of the leading causes of traffic accidents. With the development of computer vision technology, driver status monitoring systems based on in-vehicle cameras have gradually become mainstream vehicle safety features. These systems collect facial images of the driver, identify the degree of eye closure or mouth opening and closing movements, calculate fatigue parameters, and compare them with preset thresholds to determine whether the driver is fatigued. However, existing fatigue monitoring technologies still have several technical shortcomings in practical applications. Regarding the status determination logic, conventional solutions often use a single fixed threshold for comparison. When the calculated fatigue index fluctuates slightly around the threshold, the system tends to frequently switch between alert and fatigued states, causing the alarm device to repeatedly trigger and stop. This signal instability not only reduces the reliability of the monitoring results but also causes unnecessary interference to the driver.

[0003] Furthermore, existing judgment criteria are often static and lack adaptability to vehicle driving conditions. For example, the risk factor of a vehicle driving on a highway is much higher than that of driving at low speeds. If the same set of judgment thresholds is always used, it cannot reflect the higher requirements for safety redundancy under high-speed conditions, resulting in a lag in early warning response in high-risk scenarios. At the same time, in the feature extraction stage, algorithms that rely solely on eye or mouth features are not robust enough, especially when the driver turns their face to the side or turns their head at a large angle, the confidence of the detected features will decrease, and existing technologies lack a mechanism to dynamically adjust the weights of each feature according to posture.

[0004] In terms of warning interactions, current solutions mainly rely on buzzer-based audible alarms or dashboard icon prompts. Single audible alarms can easily irritate drivers or be masked by background noise, while ordinary dashboard prompts are unlikely to provide a strong stimulus when the driver's visual attention is distracted. Summary of the Invention

[0005] The purpose of this invention is to provide a method and vehicle for controlling anti-fatigue driving signal lights and ambient lights, and to solve at least one of the technical problems in existing fatigue monitoring technologies, namely, the frequent switching of state determination due to signal fluctuation interference, the lack of speed adaptability in threshold setting, and the single warning interaction method with projection distortion.

[0006] The first aspect of this invention provides a method for controlling anti-fatigue driving signal lights and ambient lights, applied to a vehicle system. This method uses image processing and data analysis to monitor and provide tiered warnings regarding driver fatigue.

[0007] The image acquisition module captures real-time video streams from inside the driver's cab and transmits them to the central processing module. The central processing module performs preprocessing on the video stream images: a weighted average method is used to convert the color image to a grayscale image, with weighting coefficients of 0.587 for green, 0.299 for red, and 0.114 for blue; histogram equalization is applied to the grayscale image, mapping the grayscale distribution to a uniform distribution; and a Gaussian filter with a 5x5 convolution kernel is used to smooth the image and remove noise interference.

[0008] After image preprocessing, the system performs face region detection and facial key point localization. This process calculates the image's oriented gradient histogram features, uses a linear support vector machine classifier to identify face regions, and employs a cascaded regression tree algorithm to locate 68 key facial feature points. Based on the feature point coordinates, the system calculates eye closure parameters and mouth opening / closing parameters: within a sliding window of 60 to 180 seconds, the percentage of frames with closed eyes is counted to obtain the PERCLOS index; when the mouth aspect ratio is greater than 0.5 and lasts for more than 2 seconds, it is recorded as a yawning action and its frequency is counted.

[0009] In the fatigue index calculation stage, this invention employs a multi-source feature fusion strategy. A linear weighted summation model is used to combine the normalized eye fatigue score with the mouth fatigue score. This calculation process includes dynamic weight adjustment logic: when the detected rotation angle within the face plane exceeds 30 degrees, causing the eye feature detection confidence level to fall below 0.6, the system adjusts the eye feature weight to 0 and the mouth feature weight to 1 to adapt to the monitoring needs under non-frontal postures.

[0010] To determine fatigue state, this invention constructs a dual-threshold comparison logic with hysteresis characteristics. The system sets a set of judgment thresholds to distinguish between three levels: alertness, mild fatigue, and severe fatigue. The dividing threshold between each state is configured as a hysteresis comparison interval consisting of an activation threshold and a reset threshold. The judgment logic stipulates that the fatigue level is upgraded only when the overall fatigue index rises above the higher activation threshold; and the fatigue level is restored only when the index falls below the lower reset threshold. This logic can suppress frequent state switching caused by fluctuations in values ​​near critical points.

[0011] Furthermore, the judgment logic includes a dynamic threshold adjustment mechanism based on vehicle speed. When the vehicle's real-time speed exceeds 80 kilometers per hour, the system uses a linear correction model to lower all the aforementioned thresholds. The correction magnitude is linearly related to the difference between the current vehicle speed and the set value, thus adapting to high-speed driving conditions by tightening the judgment criteria.

[0012] During the control output phase, the central processing module drives the indoor and outdoor lighting components based on the determined fatigue level. For mild fatigue, the indoor ambient lights operate in a cool-toned breathing mode, with brightness varying at frequencies from 0.2 Hz to 0.25 Hz according to a cosine law; the outdoor taillights display a yellow icon and project a widening light strip. For severe fatigue, the indoor ambient lights operate in a red strobe mode, with brightness alternating at frequencies from 3 Hz to 5 Hz according to a rectangular wave pattern; the outdoor taillights display a red icon and project a grid prohibition pattern, accompanied by synchronous flashing. In road projection control, the system uses a homography transformation matrix to perform inverse pre-distortion processing on the source image to cancel out trapezoidal distortion caused by the projection angle.

[0013] A second aspect of the present invention provides a vehicle for controlling anti-fatigue driving signal lights and ambient lights, including an image acquisition module, a central processing module, a light driving module, an indoor ambient light assembly, and an outdoor signal light assembly.

[0014] An image acquisition module is installed inside the driver's cab to acquire facial image data of the driver. The interior ambient lighting assembly and the exterior signal light assembly constitute a warning actuator, wherein the exterior signal light assembly includes an interactive matrix taillight and a rear-projection road surface assembly. A light drive module is electrically connected to each light assembly and outputs drive current. A central processing module is communicatively connected to both the image acquisition module and the light drive module. This module stores a computer program, which, when running, executes the fatigue-prevention driving signal light and ambient lighting control method described in the first aspect.

[0015] The above solution achieves the following beneficial technical effects:

[0016] This application optimizes the state determination logic by setting a hysteresis comparison range consisting of an activation threshold and a reset threshold. During fatigue level switching, state reset is only allowed when the overall fatigue index drops below the lower reset threshold. This design eliminates frequent control state jumps caused by small fluctuations in data near the critical point in single threshold determination, ensuring the continuity and stability of the execution actions of the interior ambient lights and exterior signal lights.

[0017] This application introduces a dynamic threshold correction mechanism related to vehicle speed, improving monitoring safety in high-speed driving scenarios. When excessive vehicle speed is detected, the system automatically lowers the judgment threshold using a linear correction model. This mechanism enables the system to intervene in fatigue judgment with stricter standards under high-risk high-speed driving conditions, thereby shortening the warning response time and adapting to the safety tolerance requirements at different driving speeds.

[0018] This application implements an indoor-outdoor linked warning function based on geometric correction. By calculating the homography transformation matrix, the light driving module performs reverse pre-distortion processing on the road projection image to cancel out the trapezoidal distortion caused by the projection angle. Combined with the brightness modulation of indoor lights at different frequencies and the synchronous flashing of outdoor taillights, this scheme ensures that clear and regular warning patterns are projected onto vehicles behind, while effectively interfering with the driver's visual perception through multi-dimensional light changes. Attached Figure Description

[0019] Figure 1 is a system overall hardware architecture framework diagram provided by an embodiment of the present invention.

[0020] Figure 2 is a flowchart of an anti-fatigue control method provided by one or more embodiments of the present invention. Detailed Implementation

[0021] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Referring to Figure 1, this embodiment of the invention provides a method and vehicle for controlling anti-fatigue driving signal lights and ambient lights. The system mainly includes: an image acquisition module, a central processing module, a light driving module, an indoor ambient light assembly, and an outdoor signal light assembly.

[0023] The image acquisition module and the central processing module are connected via a high-speed data bus or video transmission interface. The signal output terminal of the central processing module is electrically connected to the control input terminal of the lighting driver module. The power output terminal of the lighting driver module is connected to the indoor ambient lighting components and the outdoor signal light components, respectively.

[0024] The image acquisition module is configured to acquire real-time image data of the vehicle's interior. It is mounted in a position that covers the driver's face, specifically above the dashboard, above the steering column cover, or inside the A-pillar. The module includes an optical lens and an image sensor to convert light signals into digital video streams. An infrared illumination unit is integrated to ensure clear grayscale images are acquired in low-light conditions such as at night or in tunnels.

[0025] The central processing module (CPU) is the core computing unit of the system, receiving video stream data from the image acquisition module. Internally, the CPU integrates a storage unit and a processing unit. The storage unit contains computer programs for performing image preprocessing, feature point localization, fatigue feature calculation, and state fusion determination. The CPU is configured to analyze the input image data frame by frame, calculate the driver's eye closure and mouth opening / closing parameters, and determine the current fatigue level based on a preset fusion algorithm. Based on the determined fatigue level, the CPU sends corresponding control command signals to the lighting drive module.

[0026] The lighting driver module executes control commands issued by the central processing module. Internally, it includes signal modulation and power drive circuitry. The lighting driver module converts the low-level logic signals output from the central processing module into the voltage or current signals required to drive the indoor ambient lighting components and outdoor signal light components. By adjusting the duty cycle of the output signal using pulse width modulation (PWM) technology, the lighting driver module controls the brightness and color changes of the lights.

[0027] Interior ambient lighting components are located within the vehicle's driver's cabin, specifically on the edge of the center console, door trim panels, or footwell. These components include multi-color LED strips or RGB light sources, capable of changing color and brightness in response to drive signals from the lighting module, providing visual stimulation to the driver within the vehicle's interior environment.

[0028] Outdoor signal light assemblies are located on the exterior of the vehicle, including in the taillight area or rear windshield area. These assemblies may include LED matrix displays or programmable signal light units. They are configured to display preset geometric patterns, icons, or text information based on drive signals to convey warning information to following vehicles or pedestrians.

[0029] After the system is powered on, the image acquisition module starts and continuously acquires images of the driver's face, transmitting the image data stream to the central processing module.

[0030] The central processing module first performs grayscale conversion and histogram equalization preprocessing on the received raw image, and then locates key facial feature points in the image. Based on the coordinates of the key feature points, the central processing module calculates the aspect ratio of the eyes and mouth, and statistically analyzes blink and yawn features per unit time.

[0031] The central processing module determines the driver's current fatigue level based on calculated characteristic parameters. When the determination indicates the driver is alert, the central processing module instructs the lighting drive module to maintain basic lighting. When the determination indicates the driver is fatigued, the central processing module generates corresponding warning control commands based on the degree of fatigue.

[0032] Upon receiving the warning control command, the lighting driver module controls the interior ambient lighting components to perform brightness breathing or flashing actions, and simultaneously controls the outdoor signal light components to display corresponding avoidance warning patterns. The system periodically executes the above data acquisition, processing, and control steps until the vehicle is turned off or the system is shut down.

[0033] Referring to Figure 2, in this embodiment, the anti-fatigue lighting control method mainly includes an image data acquisition step, an image preprocessing step, a face region detection step, and a facial key point localization step.

[0034] S1. The image acquisition module performs image data acquisition. The image acquisition module captures a real-time video stream from inside the driver's cab at a preset sampling frequency. The sampling frequency is set to 25 to 60 frames per second to ensure that the driver's rapid blinking is captured. The raw video frames output by the image acquisition module are RGB format color images. To reduce the computational load of subsequent data processing, the central processing module performs grayscale processing upon receiving the raw video frames, converting the three-channel RGB image into a single-channel grayscale image. This grayscale processing uses a weighted average method. Specifically, for each pixel in the image, the luminance components of its red, green, and blue channels are extracted. The red channel component value is multiplied by a weighting coefficient of 0.299, the green channel component value by a weighting coefficient of 0.587, and the blue channel component value by a weighting coefficient of 0.114. Then, the three products are added together, and the sum is the grayscale value corresponding to that pixel in the grayscale image.

[0035] S2. The central processing module performs image preprocessing operations on the grayscale image. Due to the complex changes in lighting conditions in the vehicle's driving environment, the image may be underexposed or overexposed, affecting subsequent feature recognition. Step S2 specifically includes histogram equalization processing. The central processing module calculates the grayscale histogram of the grayscale image, calculates the cumulative distribution function, and maps the grayscale distribution of the original image to a uniform distribution, thereby enhancing the global contrast of the image. For images with high-frequency noise, step S2 also includes smoothing the image using a Gaussian filter to remove noise interference from the image.

[0036] S3. The central processing module performs face region detection in the preprocessed image. This step uses a combination of histogram of oriented gradients (HOR) features and a linear support vector machine (SVM) classifier. The central processing module first calculates the gradient magnitude and direction of each pixel in the image, divides the image into several cells, and calculates the histogram of gradient directions within each cell to form an HOR feature descriptor. Then, a pre-trained SVM classifier is used to perform a sliding window scan of the image to identify rectangular regions containing faces. If no face region is detected in the current frame, the system automatically discards the frame and proceeds to the next frame.

[0037] S4. The central processing module performs facial key point localization within the detected face region. This step aims to convert the face region in the image into computable geometric feature data. This embodiment employs a cascaded regression tree algorithm or a deep learning-based face alignment algorithm, utilizing a shape regression method. Starting from the average shape of the face region, the shape position is gradually updated through cascaded regressors to minimize the difference between the predicted shape and the true shape. Step S4 ultimately outputs a set of 68 key feature points, which clearly defines the geometric distribution of facial organs: feature points indexed 1 to 17 mark the jawline, indexes 18 to 27 mark the left and right eyebrows, indexes 28 to 36 mark the bridge and tip of the nose, indexes 37 to 48 mark the left and right eye regions, and indexes 49 to 68 mark the mouth region. The central processing module temporarily stores the extracted feature point coordinate set in memory as the basis for subsequent calculations of eye closure and mouth opening.

[0038] S5. The central processing module performs data processing and fatigue state mapping operations. In this step, the data stream is transformed from a high-dimensional image space to a low-dimensional feature space, and then to a discrete state space. The central processing module reads the cached facial key point coordinate data and executes serial processing logic: First, the discrete coordinate data is accumulated on the time axis and converted into a continuous time series signal to capture the changing patterns of features over continuous time; second, within a set detection period (which is less than the human eye's visual persistence time), a weighted value based on the PERCLOS (percentage of eye closure per unit time) index and the frequency of yawning is calculated; finally, by comparing the time series signal with a preset benchmark model, a unique comprehensive fatigue index value for the current moment is output, which quantifies the driver's current physiological functional state.

[0039] S6. The central processing module executes the fatigue level determination logic. The system compares the comprehensive fatigue index calculated in step S5 with multiple preset thresholds to determine the direction of the system's control strategy. The logic judgment module has two key comparison nodes: the first node determines whether the comprehensive fatigue index exceeds the mild fatigue threshold; the second node determines whether the comprehensive fatigue index exceeds the severe fatigue threshold. Based on the comparison results, the system classifies the driver's state into three levels: if the index does not reach the mild threshold, the driver is considered conscious; if the index exceeds the mild threshold but does not reach the severe threshold, the driver is considered mildly fatigued; if the index exceeds the severe threshold, the driver is considered severely fatigued. The determination result is then passed as input parameters to the next control stage.

[0040] S7. The system executes alarm command generation and closed-loop lighting drive operation. Based on the determined fatigue level, the central processing module generates a digital control command containing the target brightness value, flashing frequency, and pattern code through state machine logic, and sends it to the lighting drive module via a serial communication interface. The lighting drive module performs digital-to-analog conversion and executes differentiated control according to different states:

[0041] When the system is awake, it performs a reset operation, outputs a constant DC signal or a zero-level signal, keeps the indoor ambient lighting in low-brightness background mode or turns it off, and turns off the outdoor signal lights;

[0042] In response to mild fatigue, the system issues a Level 1 warning, retrieves the Level 1 control parameter table, generates a low-frequency breathing control signal (PWM sine wave), drives the indoor ambient lights to slowly adjust their brightness, and drives the outdoor LED matrix to display a standard yellow warning pattern.

[0043] In response to severe fatigue, the system issues a level two warning, retrieves the level two control parameter table, generates a high-frequency pulse control signal, drives the indoor ambient lights to flash rapidly at high brightness to stimulate the visual nerves, and drives the outdoor LED matrix to display emergency avoidance patterns at high contrast.

[0044] The system follows negative feedback control logic, continuously monitoring changes in the driver's condition while implementing lighting intervention. If the condition improves (e.g., fatigue index decreases), the system will automatically remove the warning in the next logic cycle; if the condition deteriorates, the warning level will be maintained or upgraded, thus achieving adaptive closed-loop control of monitoring, judgment, intervention, and re-monitoring.

[0045] Step S1 is configured as the initial data acquisition phase, which specifically includes the following steps.

[0046] S101. Execute real-time video stream capture and buffering. The image acquisition module is configured to read digital image data converted from photoelectric signals from the camera's photosensitive element via interrupt triggering or polling. Considering that driver fatigue characteristics (such as blinking) typically occur on the millisecond level, the system sets the sampling frequency to 25 to 60 frames per second to avoid missing rapid eyelid closure movements. This sampling rate ensures temporal resolution while also taking into account the bus transmission bandwidth limitations of the in-vehicle embedded system. Each acquired raw image frame is in RGB color format, consisting of a two-dimensional matrix array composed of red, green, and blue component channels.

[0047] The image preprocessing step S2 further includes the following steps.

[0048] S201. Perform grayscale conversion on the image. Since fatigue feature extraction mainly relies on the geometric shape and texture changes of facial organs rather than color information, merging the three-channel data into a single-channel data can effectively reduce the computational dimensionality. This step uses a weighted average method, assigning weights based on the differences in human eye sensitivity to different color light waves. The specific calculation logic is as follows: For any pixel in the image, extract its red channel component, green channel component, and blue channel component respectively; multiply the red channel component by a first preset weight (e.g., 0.299), multiply the green channel component by a second preset weight (e.g., 0.587), and multiply the blue channel component by a third preset weight (e.g., 0.114); finally, add the above three products together, and the resulting sum is the grayscale value of the pixel after conversion. Through this linear transformation, the original image is converted into an 8-bit grayscale image.

[0049] S202. Perform histogram equalization to address facial feature blurring caused by uneven lighting inside the vehicle. This step corrects the image's grayscale histogram using a non-linear transformation function, making the grayscale probability density function of the transformed image more uniformly distributed. The specific implementation includes: First, counting the frequency of each grayscale level in the original grayscale image across the entire image and calculating the probability of each grayscale level; second, constructing a cumulative distribution function, whereby for any grayscale level, its cumulative probability is calculated as the sum of the probabilities of all grayscale levels from the minimum grayscale level to the current grayscale level; finally, according to the mapping transformation relationship, replacing the original grayscale value of each pixel with a new grayscale value, which is equal to the product of the image's maximum grayscale value (usually 255) and the cumulative probability corresponding to the original grayscale level of that pixel. After this processing, the dynamic range of the image is expanded, and both dark and highlight details are enhanced.

[0050] S203. Perform Gaussian filtering to suppress thermal noise generated by the image sensor and high-frequency interference during transmission. This step employs spatial domain convolution, using a Gaussian convolution kernel of a preset size to perform convolution operations with the image. The weights within the Gaussian convolution kernel are generated based on a two-dimensional Gaussian normal distribution function, exhibiting a bell-shaped curve distribution with the largest weight at the center and decreasing weights further away from the center. During processing, the central processing module slides the Gaussian convolution kernel across the image, calculating the weighted average of each pixel within the kernel's coverage area and its neighboring pixels, replacing the original grayscale value of the center pixel with this result. This operation effectively filters out isolated noise points in the image while preserving the gradient features of facial edges, preventing blurring of key features due to excessive denoising. For the boundary processing (such as zero-padding or edge duplication) involved in the convolution operations in the above steps, those skilled in the art can implement it using conventional digital image processing techniques.

[0051] Step S3 specifically includes the following steps.

[0052] S301. Perform image gradient calculation. The central processing module calculates the horizontal and vertical gradients for each pixel in the input image. Specifically, the horizontal gradient is equal to the gray value of the pixel to the right minus the gray value of the pixel to the left; the vertical gradient is equal to the gray value of the pixel below minus the gray value of the pixel above. Based on the gradient values ​​in these two directions, the system further calculates the gradient magnitude and gradient direction for that pixel. The gradient magnitude reflects the degree of brightness change at the pixel and is used to capture contour information; the gradient direction indicates the angle of brightness change and is used to capture shape information.

[0053] S302. Perform cell unit partitioning and histogram construction. The central processing module divides the image into several non-overlapping cell units, for example, each cell unit consists of 8×8 pixels. Within each cell unit, the system divides the gradient direction range (0 degrees to 180 degrees or 0 degrees to 360 degrees) into several directional intervals, for example, into 9 intervals. The system calculates the gradient magnitude of all pixels within the cell unit and projects it as weights onto the corresponding directional intervals, thereby forming the gradient direction histogram of the cell unit. To eliminate the influence of uneven local illumination and shadows, the system combines multiple adjacent cell units into a block and normalizes the feature vectors within the block, making the feature descriptors more invariant to changes in illumination.

[0054] S303. Perform sliding window scanning and classification. The system constructs a fixed-size detection window and uses image pyramid technology to scale the original image at multiple scales to adapt to changes in face size at different distances. The detection window slides across the image at each scale with a set step size. For each window position, the system extracts its corresponding histogram of oriented gradients (HARGs) feature vector and inputs it into a pre-trained linear support vector machine (SVM) classifier. The SVM classifier calculates the dot product of the feature vector and the weight vector, and adds a bias term. If the result is greater than a preset decision threshold, the area covered by the current window is determined to be a face candidate region.

[0055] S304. Perform non-maximum suppression. Since the sliding window mechanism can cause the same face to be repeatedly detected by multiple overlapping windows, redundant candidate boxes need to be removed. The system sorts the candidate boxes according to their classification scores, selects the candidate box with the highest score as the baseline, and calculates the intersection-union ratio (IU) of the remaining candidate boxes with the baseline box. The IU is defined as the ratio of the overlapping area of ​​two rectangles to their joint area. If the IU of a candidate box with the baseline box is greater than a set overlap threshold (e.g., 0.5), it is considered a duplicate detection and is removed, ultimately retaining the best face bounding box coordinates.

[0056] In another embodiment of the present invention, step S3 can also employ a deep learning-based convolutional neural network detector, such as a single-frame detector or the YOLO series algorithms. In this embodiment, the central processing module inputs the image into a preset deep neural network model, extracts high-dimensional semantic features through multiple convolutional layers, and directly regresses the bounding box coordinates and confidence scores of the face at the output layer. The principles of histogram of oriented gradients feature extraction, support vector machine classifier training methods, and the specific structure of the convolutional neural network mentioned above are well-known technologies in the field of computer vision and will not be elaborated here. The final output coordinates of the facial region of interest will be passed to the next level of processing for fine localization of facial key points.

[0057] The facial landmark localization step S4 is configured to perform refined geometric modeling of the detected face region, outputting a set of coordinate vectors that characterize the morphology of facial organs. This embodiment employs a face alignment algorithm based on cascaded regression trees. This algorithm establishes a mapping relationship between image pixel grayscale value differences and shape update vectors, enabling rapid regression of feature point coordinates.

[0058] Specifically, it includes the following steps.

[0059] S401. Perform shape initialization. The central processing module projects a preset average face shape model onto the face region of the current image based on the position and size of the face bounding boxes detected in the previous steps. The average face shape model is a standard geometric structure obtained by statistically averaging the labeled shapes in a large face database. This initial shape serves as the starting point for the regression process.

[0060] S402. Perform cascaded regression iterations. This process is executed sequentially by several cascaded regressors. Each regressor is responsible for predicting the residual between the current shape and the true shape and updating the shape. Specifically, each level of shape update follows the mathematical model below: the shape vector after the current iteration is equal to the sum of the shape vector output by the previous iteration and the shape increment vector calculated by the current regressor. Here, the shape increment vector is the position correction amount derived by the regressor based on the current input image and the shape of the previous level.

[0061] Within each regressor, a gradient boosting decision tree model is employed. The system selects a pair of pixels around each feature point of the current shape and calculates the gray-level difference between these two pixels as local features. This gray-level difference is used to make splitting decisions at the nodes of the decision tree until a leaf node is reached. Each leaf node stores a local shape increment vector. Finally, the output of the current level regressor is the sum of the shape increment vectors output by all decision trees. Through multi-level cascaded iterations, the shape vector gradually converges to the true facial feature location. In this embodiment, the number of cascaded levels is typically set to 10 to 15 to achieve a balance between computational speed and positioning accuracy. The specific training process of the regression tree and the selection of the node splitting threshold are well-known techniques in the field of machine learning and will not be elaborated here.

[0062] S403. Output the final set of feature point coordinates. This embodiment uses a common 68-point marking protocol, and the output shape vector contains 68 two-dimensional coordinate points. The feature point set defines the various facial features as follows:

[0063] Points in index 1 to 17 are defined as jaw contour feature points, used to help determine facial orientation; points in index 18 to 22 are defined as left eyebrow feature points; and points in index 23 to 27 are defined as right eyebrow feature points.

[0064] Points indices 37 to 42 are defined as feature points in the left eye region, with point 37 being the outer corner of the left eye, point 40 the inner corner, points 38 and 39 the upper eyelid margins, and points 41 and 42 the lower eyelid margins. Points indices 43 to 48 are defined as feature points in the right eye region, with point 43 the inner corner, point 46 the outer corner, points 44 and 45 the upper eyelid margins, and points 47 and 48 the lower eyelid margins. These eye feature points are the basic data for calculating the degree of eye closure.

[0065] Points indices 49 to 68 are defined as feature points of the mouth region. Points 49 to 60 constitute the outer contour of the lips, while points 61 to 68 constitute the inner contour. Specifically, point 52 is located at the center of the outer edge of the upper lip, point 58 at the center of the outer edge of the lower lip, and points 49 and 55 at the left and right corners of the mouth, respectively. These mouth feature points are the basic data for calculating the degree of mouth opening and yawning movements. The central processing module stores these 68 coordinate points in a temporary register for subsequent use by the fatigue parameter calculation module.

[0066] In step S5, to assess the driver's cumulative fatigue level over a period of time, this embodiment of the invention employs a statistical analysis method based on a time-sliding window to calculate the PERCLOS index. The physical meaning of this index is the proportion of frames in which the eyes are closed within a unit of time out of the total number of frames.

[0067] The central processing module allocates a fixed-length first-in-first-out (FIFO) queue in memory as a time sliding window. The length of this queue is determined by the preset monitoring time window length and the sampling frequency of the image acquisition module. The two satisfy the following product relationship: the queue length equals the product of the time window length and the sampling frequency. For example, when the monitoring period is set to 60 seconds and the camera sampling rate is 30 frames per second, this queue is configured to store 1800 status bit data points.

[0068] S501. In the initial stage of system operation, as video frames are input one by one, the eye state determination results are sequentially filled into this queue.

[0069] Before storing the eye state in the queue, the system calculates the aspect ratio of the eye based on the eye feature points output in step S4. The calculation formula is: If the calculated result is If the value is less than the preset eye-closing threshold (e.g., 0.2), the current frame's eye state is determined to be 1 (closed); otherwise, it is determined to be 0 (open).

[0070] When the queue is not full, the system is in the initialization and accumulation phase; once the queue is full, it enters the sliding window update phase. In this phase, whenever new eye state data is generated, the central processing module performs an update operation: removing the oldest state data from the head of the queue and adding the latest eye state data of the current frame to the tail of the queue. This mechanism ensures that the queue always retains historical eye state data from the most recent second, enabling real-time dynamic tracking of fatigue characteristics.

[0071] The PERCLOS metric is not calculated by simply summing all data within the window. To reduce the algorithm's time complexity, the system maintains a global counter for closed-eye frames. While the sliding window updates, the system checks the old data being moved out and the new data being moved in: if the old data being moved out is 1 (closed eye), the counter is decremented by 1; if the new data being moved in is 1, the counter is incremented by 1. Through this incremental update method, the system can obtain the total number of closed-eye frames in the current window in real time with the current time complexity.

[0072] Let the total number of frames with eyes closed in the current window be... The total window capacity is Then the PERCLOS value The calculation formula is as follows:

[0073] ;

[0074] The PERCLOS value calculated by this formula It is a percentage between 0 and 100. This value reflects the driver's eye closure density over a past period of time. For example, if A value of 15% means that the driver's eyes were closed for 15% of the time during the past monitoring period. This calculation process is continuous; the system updates the PERCLOS value after processing each frame of image. This continuously changing PERCLOS value is transmitted to the next-level decision module as the core quantitative basis for determining whether the driver is fatigued. The specific programming implementation of the aforementioned first-in-first-out queue and circular buffer is a conventional technique in the field of data structures, and those skilled in the art can optimize the configuration based on the storage characteristics of the hardware platform.

[0075] S502. While performing eye fatigue monitoring, the central processing module performs mouth state analysis in parallel. This process aims to accurately identify the driver's yawning behavior by quantifying the degree of mouth opening and the duration of yawning, thereby distinguishing normal speaking and eating activities from fatigue characteristics.

[0076] The system uses the aspect ratio of the mouth as an objective physical indicator to measure the degree of mouth opening. Similar to the aspect ratio of the eyes, The parameters are constructed using the geometric distance relationship between key points of the mouth contour, and have rotational and scale invariance, enabling them to adapt to changes in the driver's head posture.

[0077] The calculation logic first retrieves the index numbers of key points of the mouth contour output in step S4 from memory. In this embodiment, feature points of the outer contour of the lips are selected for calculation, specifically including: the left corner of the mouth. Right corner of the mouth and three points located on the edge of the upper lip. , , and three points corresponding to the edge of the lower lip , , .in, and The center point of the upper and lower lips, and For the corresponding point on the left, and The corresponding point on the right.

[0078] The value is calculated as the ratio of the average vertical opening of the mouth to its horizontal width. Considering that the mouth shape becomes an irregular ellipse when open, using the average of three sets of vertical distances provides a more accurate description of the opening state. The specific calculation formula is as follows:

[0079] ;

[0080] The definitions of the symbols in the formula are as follows:

[0081] The aspect ratio of the mouth;

[0082] The distance between the left and right corners of the mouth is the Euclidean distance, representing the horizontal width of the mouth;

[0083] , , These represent the vertical Euclidean distances between the upper and lower lips at the left, middle, and right positions, respectively.

[0084] The coefficient 3 in the denominator is used to calculate the arithmetic mean of the three sets of vertical distances to normalize the vertical opening.

[0085] In obtaining real time After the value is received, the system executes the yawn detection logic. This logic includes two dimensions of judgment conditions: mouth opening amplitude and duration. Actions that only meet the mouth opening amplitude condition but have a short duration are usually judged as talking or singing, while only actions that simultaneously meet the large mouth opening amplitude and a certain duration are confirmed as yawning.

[0086] The central processing module has a preset opening threshold. and a time threshold Normally, Set between 0.5 and 0.7. This value indicates that when the vertical opening of the mouth reaches more than 50% of the horizontal width, it is considered an effective mouth opening. Set to 2 to 3 seconds, corresponding to the frame rate threshold. It equals the product of the time threshold and the video sampling rate.

[0087] The detection process maintains a state counter. For each input frame, the system calculates the resulting MAR value and the mouth opening threshold. Comparison:

[0088] If the current frame Greater than This indicates that the mouth is in a wide-open state, and the status counter automatically increments by 1.

[0089] If the current frame Less than or equal to This indicates that the mouth is closed or slightly open, and the system detects the value of the status counter at this time. If the counter value exceeds the preset frame count threshold... If the yawning action that just ended is considered a complete yawn event, the system will increment the accumulated yawn count by 1 and reset the counter to zero; if the counter value has not reached the frame count threshold... If it is considered a distracting action such as talking, the counter will be reset to zero and will not be counted in the number of yawns.

[0090] Through this dual verification mechanism of threshold and time window, the system can effectively filter out false alarms generated when the driver is talking to passengers or humming a song, ensuring that fatigue warning counting is triggered only when the driver exhibits a distinctive, deep yawn. The total number of yawns within the statistical period will be used as another key indicator, input together with the eye PERCLOS indicator into the final fatigue level assessment module.

[0091] S503. After the central processing module obtains two independent feature parameters—the PERCLOS index of the eyes and the frequency of yawning—the system executes multi-source feature fusion logic. This logic aims to address the problem that a single feature may fail in specific scenarios, such as when a driver wearing sunglasses leads to a decrease in the confidence of eye features, or when the driver is simply resting with their eyes closed without yawning. Through a weighted fusion algorithm, the system can generate a more robust comprehensive fatigue index.

[0092] The feature fusion process first requires normalizing the input data from different dimensions to bring them to the same scale. The PERCLOS index itself is a percentage score from 0 to 100 and can be directly used as an eye fatigue score. Mouth features, on the other hand, are represented by the number of yawns (integer values) within a statistical period and need to be converted into a mouth fatigue score from 0 to 100 using a mapping function.

[0093] The system has a preset yawn saturation threshold. This threshold is typically set to 3 to 5 times. Within a set monitoring time window, if the driver's yawning frequency reaches this value, it is considered that they have reached the highest level of fatigue in the mouth feature dimension. Mouth Fatigue Score The calculation logic is as follows: if the number of yawns in the current period Greater than or equal to the yawn saturation threshold ,but The value is 100; if Less than ,but Equal to the current number of times With yawn saturation threshold The ratio is multiplied by 100. This linear mapping process ensures that the contribution of yawning behavior to the overall fatigue assessment is quantified and controllable.

[0094] After data normalization, the central processing module uses a linear weighted summation model to calculate the comprehensive fatigue index. The weight allocation strategy is based on the directness and timeliness of each feature's representation of fatigue status. The degree of eye closure directly reflects the driver's visual attention maintenance and is the primary factor in determining whether sleep has occurred, therefore it is given a high base weight. Yawning is a physiological response accompanying fatigue, and although it has early warning significance, it may be absent in certain situations of yawn suppression or fatigue without yawning (such as microsleep), therefore it is given a low auxiliary weight.

[0095] Comprehensive fatigue index The calculation formula is as follows:

[0096] ;

[0097] in: The final output is the comprehensive fatigue index, with a value ranging from 0 to 100. PERCLOS value (0-100); Normalized mouth fatigue score (0-100); The weighting coefficient for eye features ranges from 0.6 to 0.8 in this embodiment. The value of the mouth feature weight coefficient ranges from 0.2 to 0.4 in this embodiment, and it satisfies the following constraints: .

[0098] In a preferred embodiment, to further improve the system's environmental adaptability, the eye feature weighting coefficient... and These are not fixed constants, but dynamic variables related to ambient light intensity or detection confidence. When the system detects that the driver is wearing sunglasses or that there is glare in the eye area causing the eye feature detection confidence to fall below a preset threshold, the system will automatically adjust the weight allocation logic and appropriately reduce the threshold. Value and increase This value allows the system to rely more on large mouth movements for judgment, thus maintaining detection stability under low light conditions.

[0099] Calculated comprehensive fatigue index This will be used as the final decision variable and compared with the system's preset tiered alarm thresholds. If... If the value exceeds the first-level warning threshold (e.g., 50), the system triggers a mild fatigue alert (such as a voice reminder); if If the value exceeds the secondary warning threshold (e.g., 80), the system triggers a severe fatigue alarm (such as a high-frequency buzzer, seat vibration, or automatic window opening). This weighted fusion-based calculation mechanism effectively avoids false alarms caused by fluctuations in a single feature, achieving comprehensive and accurate quantification of the driver's mental state.

[0100] S504. After determining the weight coefficients of each feature component through multi-source feature fusion logic, the central processing module executes specific index calculation and state classification operations. This process is configured to map multi-dimensional physiological feature data into a single scalar value that can be used for decision-making, and generate corresponding control commands accordingly.

[0101] Since the PERCLOS feature for the eyes is a continuous variable based on a sliding time window, while the yawning feature for the mouth is a statistical variable based on discrete events, there is a difference in their data update frequency. Therefore, the system performs a data alignment operation before performing the weighted summation calculation. The central processing module maintains a calculation cycle (e.g., every 500 milliseconds). At the trigger time of each calculation cycle, it samples the latest PERCLOS cache value and the mouth fatigue score, respectively. If no yawning event update occurs in the current cycle, the mouth score retains the value from the previous cycle, but this retained value will decrease linearly over time according to a preset decay coefficient to reflect the time-dependent decay of yawning behavior on fatigue characterization.

[0102] The system utilizes the aforementioned determined eye feature weighting coefficients. Weighting coefficients of mouth features The instantaneous fatigue index is calculated by weighting and fusing the aligned feature data. To eliminate exponential jumps caused by sensor noise or instantaneous actions (such as rubbing eyes or sneezing), this embodiment introduces a first-stage smoothing filter after the instantaneous fatigue index. Specifically, a moving average filter is used, maintaining a length of... (For example, 5) The historical index queue, the arithmetic mean of all values ​​in the queue is taken as the final comprehensive fatigue index. .

[0103] The calculation formula is described as follows:

[0104] ;

[0105] in, and Each of the past times The feature values ​​of the eyes and mouth at each sampling time.

[0106] get Then, the system enters the classification and determination stage. To avoid frequent alarm signal activation and deactivation due to fluctuations in the fatigue index around the threshold, this embodiment uses Schmitt trigger logic with hysteresis characteristics for state determination, rather than a single comparison logic.

[0107] The system has two preset judgment criteria: mild fatigue and severe fatigue.

[0108] For mild fatigue, set an activation threshold (e.g., 50) and a reset threshold (e.g., 45).

[0109] For severe fatigue, set an activation threshold (e.g., 80) and a reset threshold (e.g., 75).

[0110] The reset threshold is strictly less than the corresponding enable threshold, and the difference between the two constitutes the hysteresis interval.

[0111] The specific execution of the decision logic is as follows:

[0112] When the comprehensive fatigue index When the fatigue level rises and exceeds the threshold for initiating a mild fatigue state, the system state machine transitions to a mild fatigue state and remains in that state until... The state machine only returns to a conscious state when the temperature drops below the reset threshold for a mildly fatigued state.

[0113] Similarly, when If the fatigue level continues to rise beyond the threshold for initiating a severe fatigue state, the system state machine transitions to a severe fatigue state and locks that level, only when... Only when the fatigue level falls below the reset threshold of severe fatigue will the fatigue level be downgraded back to mild fatigue.

[0114] The specification clearly describes the specific implementation of the anti-interference determination in the claims, thus ensuring the stability of the alarm system.

[0115] Based on the determination result, the central processing module outputs the corresponding control signal through the I / O interface.

[0116] For mild fatigue, the module outputs a 1Hz pulse width modulation signal to drive the yellow warning light on the dashboard to flash, and plays a pre-stored warning sound through the vehicle's speakers.

[0117] In cases of severe fatigue, the central processing module sends the highest priority alarm message to the vehicle controller via the controller area network, triggering the seat vibration motor to operate and controlling the window actuator to lower the driver's side window to a preset height to introduce fresh air and help the driver stay awake.

[0118] If the system determines that the user is awake, it outputs a low logic level, resetting all alarm actuators. All calculated fatigue index data and status change records are written to the non-volatile memory of the vehicle's black box for subsequent driving behavior analysis and accident tracing.

[0119] In step S6, the central processing module, based on the comprehensive fatigue index calculated in the previous steps, divides the driver's mental state into three discrete level intervals: a sober state interval, a mild fatigue state interval, and a severe fatigue state interval. The threshold values ​​for these three intervals are not fixed constants based solely on experience, but rather incorporate the dynamic variable of vehicle speed to meet the differentiated requirements for safety redundancy under different operating conditions.

[0120] The system first sets two key threshold values ​​under baseline conditions: a primary warning threshold and a secondary warning threshold. Under standard urban road conditions (i.e., vehicle speed below a preset low-speed threshold, such as 60 km / h), the primary warning threshold is typically set between 40 and 50, with 45 being preferred in this embodiment. When the overall fatigue index is within the closed interval of 0 to the primary warning threshold, the system determines that the driver is alert. This value range corresponds to a low PERCLOS value (e.g., less than 0.15) and no yawning or only occasional yawning during the monitoring period, indicating that the driver is focused and no intervention is required.

[0121] The secondary warning threshold is set between 70 and 80 under standard operating conditions, and is preferably 75 in this embodiment. When the overall fatigue index is greater than the primary warning threshold but less than or equal to the secondary warning threshold, the system determines that the driver is in a state of mild fatigue. This range corresponds to an increasing trend in eyelid closure time or the presence of intermittent yawning, indicating that the driver has shown early signs of decreased attention. At this time, the system executes warning logic to prevent the fatigue level from deepening through a slight prompt.

[0122] When the overall fatigue index exceeds the Level 2 warning threshold (i.e., the value falls within the range of Level 2 warning threshold to 100), the system determines that the driver is in a state of severe fatigue. This range corresponds to a high PERCLOS value (e.g., exceeding 0.4) or frequent yawning, indicating that the driver has entered a state of microsleep or has lost sight of the road, and the system must immediately trigger a mandatory strong interference alarm.

[0123] Considering that driver reaction time is shortened at high speeds, the same level of fatigue can lead to more serious accident consequences. Therefore, this embodiment introduces a speed-based dynamic threshold adjustment mechanism. This mechanism aims to automatically lower the alarm threshold as vehicle speed increases, thereby improving system sensitivity. The central processing module reads the vehicle speed signal in real time through the vehicle's internal controller area network. When the vehicle speed exceeds a preset high-speed judgment point, the system updates the aforementioned benchmark threshold in real time using a linear correction model.

[0124] The calculation logic for the revised real-time level 1 threshold and real-time level 2 threshold is described as follows:

[0125] The real-time first-level threshold is equal to the baseline first-level warning threshold minus the speed correction amount;

[0126] The real-time secondary threshold is equal to the baseline secondary warning threshold minus the speed correction amount.

[0127] The speed correction is calculated as follows: first, the difference between the current real-time vehicle speed and the starting speed of the high-speed determination is calculated, and then the difference is multiplied by a preset speed sensitivity coefficient.

[0128] The definitions and value assignment logic of each physical quantity in the above calculation model are as follows:

[0129] The baseline first-level warning threshold and the baseline second-level warning threshold are the aforementioned set values ​​under low-speed conditions (e.g., 45 and 75).

[0130] The initial vehicle speed for high-speed determination is the critical speed value that triggers dynamic adjustment;

[0131] The speed sensitivity coefficient is used to control the rate of decrease of the threshold as the speed changes. In this embodiment, the value is set to 0.1 to 0.2, which means that for every 10 km / h increase in vehicle speed, the alarm threshold decreases by 1 to 2 units.

[0132] To prevent excessively lowered thresholds from increasing the false alarm rate, the system sets lower limits on the calculated real-time thresholds. Specifically, the real-time Level 1 threshold is no lower than 30, and the real-time Level 2 threshold is no lower than 60. Through the aforementioned dynamic adjustment logic, when a vehicle is traveling at 120 km / h on a highway, the Level 1 warning threshold automatically decreases from 45 to between approximately 37 and 41. This means that in high-speed scenarios, even if the driver exhibits only slight signs of fatigue, the system will intervene early to issue a warning. Therefore, the specific technical implementation path of the adaptive sensitivity adjustment described in the claims is fully disclosed in the specification. This design ensures that the system will not frequently disturb the driver due to excessive sensitivity in low-speed congested areas, while providing maximum safety in dangerous high-speed sections.

[0133] In step S7, after the central processing module completes the fatigue state classification, the system enters the signal generation stage. The core task of this stage is to convert the state flags at the software logic level into electrical signals that the hardware circuits can recognize and respond to. This process is executed by the central processing module, which is configured to send drive signals with specific timing and level characteristics to the peripheral actuators according to different fatigue levels.

[0134] The S701 central processing module connects to external devices through the microcontroller's internal general-purpose input / output interface and communication interface. In the conscious state, the module pulls all alarm-related input / output interface pins low to logic 0, ensuring that indicator lights are off, buzzers are silent, and vibration motors stop, maintaining a normal quiet driving environment for the vehicle.

[0135] When the assessment indicates mild fatigue, the central processing module activates the pulse width modulation signal generator. Mild fatigue is primarily assessed through visual and auditory channels, requiring the signal to be intermittent to attract the driver's attention. The system configures a timer register to generate a square wave signal with a frequency of 1Hz to 2Hz. The period of this signal is set to 0.5 seconds to 1.0 second, with the duty cycle (the ratio of the high-level duration to the low-level duration) set to 50%.

[0136] The pulse-width modulation (PWM) signal directly drives the yellow LED warning light circuit connected to the dashboard area. To protect the microcontroller pins, the signal is first electrically isolated via an optocoupler, and then amplified by a driving transistor to drive the LED load. During each high-level cycle, the transistor conducts, illuminating the warning light; during the low-level cycle, the warning light turns off. This alternating bright and dark flashing effect constitutes the visual alarm signal. Simultaneously, a branch of the PWM signal is sent to the buzzer driver circuit, driving a passive buzzer to emit a beeping sound synchronized with the flashing frequency.

[0137] When the judgment result jumps to a state of severe fatigue, the alarm strategy changes to a strong interference mode, and the signal generation logic becomes more complex, involving the interaction between tactile feedback and the vehicle control network.

[0138] First, for the seat vibration function, the central processing module outputs a high-frequency pulse-width modulation (PWM) signal on specific input / output interface pins. To generate a noticeable vibration, the frequency of the PWM signal is set to 100Hz to 200Hz, and the duty cycle is adjusted to 80% to 100%. This signal is connected to a DC motor drive module (such as an H-bridge drive circuit), which drives an eccentric wheel motor installed inside the driver's seat cushion and backrest to rotate at high speed. By adjusting the duty cycle of the PWM, the system can control the intensity of the vibration; in this embodiment, the system is configured to generate a continuous, strong vibration similar to that of a mobile phone receiving a call, forcing the driver to regain alertness through tactile stimulation.

[0139] Secondly, to achieve automatic window lowering and interior ventilation functions, the central processing module connects to the vehicle's controller local area network (LAN) via an integrated LAN controller interface. Since directly controlling the window motors involves vehicle chassis domain safety protocols, this invention requests the body controller to perform the action by sending standard LAN messages.

[0140] The signal generation module assembles a standard LAN 2.0A or 2.0B data frame. This data frame contains the following key fields:

[0141] Arbitration domain: Write a pre-assigned high-priority identifier to ensure that the alarm signal can obtain priority transmission on the bus and is not blocked by other non-emergency signals (such as entertainment system signals);

[0142] Control field: Defines the data length code, for example, set to 8 bytes;

[0143] Data field: Control commands are written at the agreed byte positions. For example, writing the hexadecimal value 0x01 in byte 0 represents a request to lower the left front window; writing the value 0x0A in byte 1 represents a descent distance of 10 centimeters or a continuous descent of 2 seconds.

[0144] After receiving and parsing the message, the body controller drives the window lift motor to perform the corresponding action. This bus-based communication control method, as clearly described in the specification, represents the specific technical means of vehicle integrated control in the claims, achieving deep integration of the fatigue monitoring system with the vehicle's electronic and electrical architecture. The transceiver circuit design and terminal resistor matching of the local area network bus physical layer are standard hardware designs in the automotive electronics field, and those skilled in the art can implement them according to relevant standards.

[0145] S702. As an important component of the audible and visual alarm system, the in-vehicle ambient lighting control module is configured to dynamically adjust the light emission mode of the in-vehicle light source based on the fatigue level output by the central processing module. By changing the color, brightness, and frequency of the light, the system uses the principle of photobiological regulation to intervene in the driver's visual nerves, thereby relieving fatigue or forcibly waking the driver.

[0146] This control process is achieved by adjusting the duty cycle of the pulse width modulation signal in the LED driver circuit. To distinguish different warning levels, this embodiment designs two specific light emission modes: a breathing mode corresponding to mild fatigue and a strobe mode corresponding to severe fatigue.

[0147] The system implements breathing mode control. When the system determines that the driver is in a state of mild fatigue, the control module switches the ambient lighting color to a cool tone (such as cyan-blue with a wavelength of 450nm to 485nm) and controls the brightness to present a soft, periodic change resembling a sine wave. This gradual lighting effect is designed to simulate the rhythm of deep human breathing, guiding the driver to adjust their breathing frequency, thereby alleviating mental stress and visual fatigue.

[0148] Brightness value in breathing mode Over time The mathematical model of change is set in the form of a cosine function:

[0149] ;

[0150] in, Current time The brightness value corresponds to the duty cycle (0-100%) of the pulse width modulation signal. The peak brightness for the respiratory cycle is set to 80% to 100% in this embodiment to ensure sufficient but not dazzling light; The trough brightness of the respiratory cycle is set to 10% to 20% in this embodiment to preserve the background light and prevent visual blackout. The breathing rate is set to 0.2Hz to 0.25Hz. This means that a complete cycle of light and dark changes lasts 4 to 5 seconds, matching the deep breathing cycle of an adult at rest.

[0151] When implemented inside the microcontroller, the central processing module pre-generates a lookup table containing the values ​​of the aforementioned cosine curve. A timer reads the next value from the table at fixed time intervals (e.g., 20 milliseconds) and updates the comparison value of the pulse width modulation register, thereby driving the LED to produce a smooth gradient effect.

[0152] The system employs a strobe mode control. When the system determines that the driver is in a state of severe fatigue, the control module immediately switches the ambient light color to a highly saturated red (wavelength 620nm to 750nm) and controls the brightness to exhibit a rapid, high-frequency rectangular wave-like transition. This mode utilizes the human eye's sensitivity to dynamic, high-contrast light to create a strong visual impact, thereby breaking the driver's micro-sleep state.

[0153] In strobe mode, the brightness control logic no longer follows a continuous function, but instead uses binary square wave control:

[0154] ;

[0155] in, Set the high-level brightness for flickering to 100% (full brightness) to maximize luminous flux output; Set the low-level brightness for flickering to 0% (completely off) to maximize the contrast between light and dark areas; The flicker period is set to 200 milliseconds to 333 milliseconds, corresponding to a flicker frequency of 3 Hz to 5 Hz. This frequency range falls within the sensitive range of the human eye's persistence of vision effect, and can produce a noticeable flickering sensation.

[0156] In the specific circuit implementation, for the strobe mode, the central processing module directly configures a timer to generate a square wave interrupt signal with a fixed frequency of 3Hz to 5Hz. The interrupt service routine alternately toggles the level states of the input / output interface pins. These input / output interface pins control the gate of the LED driver transistor, thereby achieving rapid switching of the light. Through the automatic switching between the two modes, this embodiment specifically discloses the technical features of the claims regarding biorhythmic light regulation and emergency visual blocking, realizing graded and multi-dimensional intervention of the light environment.

[0157] S703. In order to construct a visual interaction channel, the outdoor signal light assembly in this embodiment is configured to include two independent subsystems: an interactive matrix taillight assembly and a rearward road projection assembly.

[0158] The interactive matrix taillight assembly is integrated into the vehicle's taillight cluster and consists of a high-density array of Micro-LED or OLED pixels, used to display high-resolution icons directly on the surface of the lens.

[0159] The rear road projection component is installed at the bottom of the vehicle's rear bumper or below the license plate frame. It consists of a high-brightness LED light source and a lens assembly, and is used to project light and shadow patterns onto the road surface area behind the vehicle at a certain pitch angle.

[0160] The system executes the following signal projection control procedure:

[0161] Encoding of warning symbols and distribution of instructions.

[0162] The central processing module, acting as the decision-making core, sends command frames containing dual-channel control bits to the lighting control module via the vehicle communication bus. The system has pre-defined coding logic that strictly maps to fatigue levels.

[0163] Awake state: Always enabled position 0. The interactive matrix taillights execute normal daytime running light logic, and the road projection components are in the off state.

[0164] Mild fatigue state: Total enable position 1.

[0165] The interactive matrix taillights load icon data and display it in a soft yellow or amber constant light to alert the driver of the following vehicle that the driver of this vehicle is adjusting their status.

[0166] The system instructs the road projection component to load a safety distance marking pattern and project two parallel width indicator light strips onto the road behind the vehicle to help following vehicles maintain a safe distance.

[0167] Severe fatigue state: Total enable bit is 1, strobe control bit is activated.

[0168] The interactive matrix taillights are loaded with a red exclamation mark or DANGER bitmap and overlaid with a high-contrast border.

[0169] The command road surface projection component loads a grid pattern or a dynamic diffusion ripple pattern that prohibits approach.

[0170] Differentiated image rendering and pixel-driven.

[0171] After receiving the command, the lighting control module executes different image processing algorithms in parallel, taking into account the physical characteristics of the two sets of components:

[0172] For interactive matrix taillights: The module reads the corresponding bitmap data from non-volatile memory. Since the taillight surface is typically curved, the module executes a surface mapping algorithm to remap the two-dimensional bitmap data to a three-dimensional LED pixel coordinate system, ensuring that the icon is not distorted whether viewed from directly behind or from the side. Subsequently, the module directly drives the corresponding pixels to light up.

[0173] For the rearward road projection component: The module reads the projection source image data. Because the projection light source is installed low and at an acute angle to the road surface, direct projection would cause trapezoidal distortion in the image. The module performs trapezoidal correction and perspective transformation algorithms.

[0174] Specifically, the module applies a preset geometric transformation matrix to perform inverse predistortion processing on the source image, preprocessing the rectangular image into an inverted trapezoid. When this predistorted image is projected onto the road surface through an optical lens, the physical distortion of the optical path cancels out the predistortion of the algorithm, thus presenting a correctly proportioned rectangular or character pattern on the road surface.

[0175] Dynamic flicker and light intensity management. For severe fatigue conditions, the lighting control module implements synchronized flicker control for the two sets of components mentioned above. The control logic for flicker brightness is that the real-time output brightness equals the product of the preset maximum brightness and the time-based square wave modulation coefficient.

[0176] The frequency of the square wave modulation coefficient is set between 1Hz and 1.5Hz. This coefficient changes in a rectangular wave pattern between 1 and 0 over time, thus controlling the periodic hard switching of the lights between fully on and fully off states. This frequency is lower than the flicker frequency of the ambient lighting inside the vehicle, primarily to comply with road traffic safety regulations regarding the prevention of glare from external lights, avoiding high-frequency flickering that could cause visual interference to drivers of following vehicles or trigger photosensitive epilepsy, while still providing sufficient warning.

[0177] Safety priority arbitration. A strict priority logic is set within the lighting control module: legal driving signals take precedence over fatigue warning signals. When the driver operates the turn signal lever or presses the brake pedal, the lighting control module immediately activates the fatigue pattern display on the interactive matrix taillights, prioritizing the full-screen display of turn signals or high-brightness red brake light;

[0178] Meanwhile, the road projection components can selectively continue operating or be simultaneously turned off to avoid information overload. Once the legal signal is withdrawn, if the fatigue state has not been resolved, the system automatically resumes the previous warning pattern projection.

[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for controlling anti-fatigue driving signal lights and ambient lights, characterized in that, Includes the following steps: S1. The image acquisition module acquires a real-time video stream from inside the driver's cab and transmits it to the central processing module. S2. The central processing module performs image preprocessing on the received real-time video stream to obtain an enhanced grayscale image. S3. The central processing module performs face region detection on the grayscale image. If a face region is detected, the process proceeds to the next step. S4. The central processing module performs facial key point localization within the detected face region to obtain a set of facial key point coordinates, including the eye and mouth regions. S5. The central processing module calculates eye closure parameters and mouth opening / closing parameters based on the set of facial key point coordinates. The parameters are calculated, and multi-source feature fusion calculation is performed to obtain a comprehensive fatigue index; S6, the central processing module compares the comprehensive fatigue index with a set of judgment thresholds to determine the driver's current fatigue level; the set of judgment thresholds includes at least a first boundary threshold for distinguishing between a conscious state and a mild fatigue state, and a second boundary threshold for distinguishing between a mild fatigue state and a severe fatigue state; the fatigue level includes at least a conscious state, a mild fatigue state, and a severe fatigue state; S7, the central processing module generates a corresponding control command signal based on the determined fatigue level, and drives the indoor ambient light assembly and the outdoor signal light assembly to perform corresponding warning actions through the lighting drive module.

2. The method for controlling anti-fatigue driving signal lights and ambient lights according to claim 1, characterized in that, Step S2 specifically includes: the central processing module uses a weighted average method to convert the red, green, and blue channel components of the original image into single-channel grayscale values, wherein the weight coefficient of the green channel component is 0.587, the weight coefficient of the red channel component is 0.299, and the weight coefficient of the blue channel component is 0.114; the central processing module calculates the grayscale histogram of the grayscale image and calculates the cumulative distribution function, mapping the grayscale distribution of the original image to a uniform distribution, and performs histogram equalization processing; the central processing module uses a Gaussian filter with a convolution kernel size of 5x5 to smooth the equalized image.

3. The method for controlling anti-fatigue driving signal lights and ambient lights according to claim 1, characterized in that, Steps S3 and S4 specifically include: In step S3, the central processing module calculates the orientation gradient histogram features of the image and uses a preset linear support vector machine classifier to perform a sliding window scan on the image to identify the face region; In step S4, the central processing module adopts a cascaded regression tree algorithm, starting from the average shape of the face region, and gradually updates the shape position through a multi-level regressor, finally outputting a coordinate set composed of 68 key feature points; In the coordinate set, feature points with subscripts 37 to 48 mark the left and right eye regions, and feature points with subscripts 49 to 68 mark the mouth region.

4. The method for controlling anti-fatigue driving signal lights and ambient lights according to claim 3, characterized in that, In step S5, the process of calculating the eye closure parameters and the mouth opening and closing parameters specifically includes: the central processing module calculates the eye aspect ratio based on the upper and lower eyelid edge feature points and the inner and outer corners of the eyes, and maintains a first-in-first-out queue with a corresponding preset time sliding window in memory. The preset time sliding window has a duration of 60 to 180 seconds. The PERCLOS index is calculated by statistically analyzing the proportion of frames with closed eyes in the first-in-first-out queue to the total number of frames. The central processing module calculates the mouth aspect ratio based on the upper and lower lip edge feature points and the left and right corners of the mouth. When the mouth aspect ratio is greater than 0.5 and the duration exceeds 2 seconds, it is determined as a yawning action, and the yawning frequency within one minute is counted.

5. The method for controlling anti-fatigue driving signal lights and ambient lights according to claim 4, characterized in that, In step S5, the process of performing the multi-source feature fusion calculation specifically includes: the central processing module uses the PERCLOS index as the eye fatigue score and normalizes the yawn frequency to the mouth fatigue score through linear mapping; the central processing module calculates the comprehensive fatigue index using a linear weighted summation model, the calculation method is as follows: multiply the eye fatigue score by the eye feature weight coefficient to obtain a first product, multiply the mouth fatigue score by the mouth feature weight coefficient to obtain a second product, and add the first product and the second product to obtain the comprehensive fatigue index; wherein, the sum of the eye feature weight coefficient and the mouth feature weight coefficient is 1; when the rotation angle in the face plane exceeds 30 degrees, causing the confidence of eye feature detection to be lower than 0.6, the central processing module automatically adjusts the eye feature weight coefficient to 0 and the mouth feature weight coefficient to 1.

6. The method for controlling anti-fatigue driving signal lights and ambient lights according to claim 1, characterized in that, Step S6 specifically includes: the central processing module uses logic with hysteresis characteristics to determine the state and suppress frequent state switching caused by signal fluctuations: for the mild fatigue state, the first boundary threshold is specifically configured as a hysteresis comparison interval composed of a first activation threshold and a first reset threshold, wherein the first reset threshold is less than the first activation threshold; when the comprehensive fatigue index rises above the first activation threshold by 0.4, it is determined to enter the mild fatigue state, and only when the comprehensive fatigue index drops below the first reset threshold by 0.3 is it determined to return to the awake state; for the severe fatigue state, the second boundary threshold is specifically configured as a hysteresis comparison interval composed of a second activation threshold and a second reset threshold, wherein the second reset threshold is less than the second activation threshold; when the comprehensive fatigue index rises above the second activation threshold by 0.7, it is determined to enter the severe fatigue state, and only when the comprehensive fatigue index drops below the second reset threshold by 0.6 is it determined to downgrade to the mild fatigue state.

7. The method for controlling anti-fatigue driving signal lights and ambient lights according to claim 6, characterized in that, Step S6 also includes a speed-based threshold dynamic adjustment mechanism: the central processing module obtains the real-time vehicle speed through the vehicle network; when the real-time vehicle speed exceeds 80 kilometers per hour, the first opening threshold, the first reset threshold, the second opening threshold, and the second reset threshold are adjusted downward in real time using a linear correction model; the corrected threshold is equal to the base threshold minus the speed correction amount, where the speed correction amount is the product of the difference between the current real-time vehicle speed and 80 kilometers per hour and the speed sensitivity coefficient, and the speed sensitivity coefficient ranges from 0.001 to 0.

005.

8. The method for controlling anti-fatigue driving signal lights and ambient lights according to claim 1, characterized in that, In step S7, the central processing module controls the indoor ambient light component to perform the following actions according to different fatigue levels: When the fatigue level is determined to be mild, the indoor ambient light component is controlled to execute a breathing mode: the light emission color is switched to a cool tone, and the brightness is controlled to periodically change between the peak brightness with a pulse width modulation duty cycle of 100% and the valley brightness with a duty cycle of 20% according to the cosine function law, at a frequency of 0.2 Hz to 0.25 Hz; When the fatigue level is determined to be severe, the indoor ambient light component is controlled to execute a strobe mode: the light emission color is switched to red, and the brightness is controlled to alternate between the fully bright state and the fully off state according to the rectangular wave law, at a frequency of 3 Hz to 5 Hz.

9. A method for controlling anti-fatigue driving signal lights and ambient lights according to claim 1, characterized in that, The outdoor signal light assembly includes an interactive matrix taillight assembly and a rearward road projection assembly. In step S7, the central processing module controls the outdoor signal light assembly to perform the following actions: when the mild fatigue state is determined, the interactive matrix taillight assembly is controlled to display a yellow warning icon, and the rearward road projection assembly is controlled to project a width-marking light strip on the road behind the vehicle; when the severe fatigue state is determined, the interactive matrix taillight assembly is controlled to display a red warning icon, and the rearward road projection assembly is controlled to project a grid prohibition pattern; simultaneously, the above components are controlled to flash synchronously at a frequency of 1 Hz to 1.5 Hz; when controlling the rearward road projection assembly, the light driving module determines the homography transformation matrix according to the installation height and pitch angle of the rearward road projection assembly, and uses the homography transformation matrix to perform reverse pre-distortion processing on the source image to cancel the trapezoidal distortion caused by the projection angle.

10. A vehicle configured with the anti-fatigue driving signal light and ambient light control method according to any one of claims 1-9, characterized in that, include: An image acquisition module, installed inside the vehicle's driver's cab, is used to acquire facial image data of the driver. Indoor ambient lighting components and outdoor signal light components serve as warning actuators for vehicles; The lighting driver module is electrically connected to the indoor ambient light assembly and the outdoor signal light assembly respectively, and is used to output driving current; the central processing module is communicatively connected to the image acquisition module and the lighting driver module respectively; wherein, the central processing module stores a computer program.

Citation Information

Cited By

  • A control method of a special long tunnel driving fatigue awakening LED wall washing lamp

    CN122294323A