Driver health state monitoring method and device, computer device and storage medium
By using image recognition technology to monitor changes in the driver's facial skin tone and calculate the rate of color gradation change, the problem of non-contact monitoring by contact sensors is solved, enabling non-contact monitoring of the driver's health status and improving driving safety and privacy protection.
Patent Information
- Application Number
- CN202310479962.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-04-28
AI Technical Summary
Current technologies for monitoring driver health status rely on contact sensors, which cannot achieve contactless monitoring.
By acquiring facial images of the driver, counting the changes in the number of pixels of the same color level, calculating the color level change rate, and judging the driver's health status.
It enables contactless monitoring of driver health status without the need for physical sensors, ensuring driver privacy and improving driving safety.
Smart Images

Figure CN116612460B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, computer device, and storage medium for monitoring driver health status. Background Technology
[0002] Driver monitoring systems (DMS) are being used more and more widely in automobiles. Major OEMs are successively launching methods to monitor drivers' emotions, fatigue, attention, health, and other aspects. The technology is becoming increasingly mature, and by judging the driver's health and other aspects, it has greatly helped to increase driving safety.
[0003] However, most current monitoring of drivers' health status still relies on contact sensors or physiological monitoring devices such as biosensors or smart bracelets, which require drivers to actively wear or maintain contact in order to achieve monitoring, and cannot achieve non-contact monitoring. Summary of the Invention
[0004] Based on this, a method, device, computer equipment, and storage medium for monitoring driver health status are provided to improve the problem that existing technologies cannot monitor driver health status in a non-intrusive manner.
[0005] On the one hand, a method for monitoring the health status of a driver is provided, the method comprising:
[0006] A target image set is obtained, wherein each image in the target image set includes at least the driver's face; a first target image and a second target image are obtained based on the target image set.
[0007] The color level change rate is obtained by statistically analyzing the change in the number of pixels of the same color level in the target region in the first target image and the second target image. The target region includes the facial region, and the color level change rate includes the first color level change rate corresponding to the facial region.
[0008] The driver's health status is determined based on the magnitude of the first color level change rate.
[0009] In one embodiment, the target region further includes a reference region, and the step of obtaining the color level change rate by statistically analyzing the change in the number of pixels of the same color level in the target region in the first target image and the second target image further includes:
[0010] The change rate of the second color level corresponding to the reference area is obtained by statistically analyzing the change in the number of pixels of the same color level in the reference area in the first target image and the second target image.
[0011] The validity of the first color gradation change rate is determined based on the magnitude of the second color gradation change rate, and the driver's health status is determined based on the valid first color gradation change rate.
[0012] In one embodiment, the step of statistically analyzing the change in the number of pixels of the same color level in the target region of the first target image and the second target image to obtain the color level change rate includes:
[0013] Based on the decomposition of the first target image, the first single-channel image of the target region under the target channel is obtained, and histogram statistics are performed on the color levels of the pixels of the first single-channel image to obtain the first single-channel histogram.
[0014] Based on the decomposition of the second target image, a second single-channel image of the target region under the target channel is obtained, and histogram statistics are performed on the color levels of the pixels in the second single-channel image to obtain the second single-channel histogram.
[0015] Based on the comparison between the first single-channel histogram and the second single-channel histogram, the numerical difference of each interval is obtained, and the sum is used to obtain the total color level change.
[0016] The sampling time interval between the first target image and the second target image is obtained, and the color level change rate is obtained based on the total color level change and the sampling time interval.
[0017] In one embodiment, the step of obtaining the color level change rate by statistically analyzing the change in the number of pixels of the same color level in the target region of the first target image and the second target image further includes:
[0018] When there are multiple target channels, obtain the total color level change of the target region under each target channel;
[0019] The single-channel color gradation change rate is obtained by calculating the average of the single-channel color gradation change rates for each target channel and the sampling time interval.
[0020] In one embodiment, obtaining the color level change rate by statistically analyzing the change in the number of pixels of the same color level in the target region in the first target image and the second target image includes: obtaining the color level change rate according to the following mathematical expression:
[0021] ,
[0022] in, S is the color gradation rate of the target area, and S is the total number of pixels in the target area. The value of the m-th interval in the second single-channel histogram. is the value of the m-th interval in the first single-channel histogram, where 0≤m≤255, and Δt is the sampling time interval between the first target image and the second target image, wherein the color level of each pixel is divided into 0-255.
[0023] In one embodiment, determining the driver's health status based on the magnitude of the first color level change rate includes:
[0024] When the first color level change rate is greater than the first threshold and less than or equal to the second threshold, the driver's second evaluation parameter is obtained, and the first color level change rate and the second evaluation parameter are weighted to obtain a comprehensive evaluation value. When the comprehensive evaluation value is greater than or equal to the warning threshold, a warning command is executed. The second evaluation parameter includes one or more of body temperature and emotional parameters.
[0025] When the rate of change of the first color level is greater than the second threshold, the warning instruction is executed.
[0026] In one embodiment, determining whether the first color level change rate is valid based on the numerical value of the second color level change rate includes:
[0027] When the change rate of the second color level is less than the validity threshold, the change rate of the first color level is determined to be valid.
[0028] In another aspect, a driver health status monitoring device is provided, the device comprising:
[0029] An image acquisition module is used to acquire a target image set, wherein each image in the target image set includes at least the driver's facial region, and to acquire a first target image and a second target image based on the target image set;
[0030] The calculation module is used to statistically analyze the change in the number of pixels of the same color level in the target region in the first target image and the second target image to obtain the color level change rate. The target region includes a facial region, and the color level change rate includes the first color level change rate corresponding to the facial region.
[0031] The judgment module is used to determine the driver's health status based on the magnitude of the first color level change rate.
[0032] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method.
[0033] A computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method.
[0034] The aforementioned driver health status monitoring method, device, computer equipment, and storage medium acquire an image containing the driver's facial region, and obtain a color gradation change rate that can represent the driver's facial skin color change by statistically analyzing the changes in the number of pixels of the same color gradation in the facial region of the image. Based on the magnitude of the color gradation change rate, the changes in the driver's facial skin color characteristics are judged, thereby determining the driver's health status. The method provided in this application does not require the use of contact sensors and can acquire the driver's health status imperceptibly. Attached Figure Description
[0035] Figure 1 This is a flowchart illustrating a driver health status monitoring method in one embodiment;
[0036] Figure 2 This is a flowchart illustrating the steps for calculating the rate of change of color levels in one embodiment;
[0037] Figure 3 This is a schematic diagram of histogram statistics in one embodiment;
[0038] Figure 4 This is a structural block diagram of a driver health status monitoring device in one embodiment;
[0039] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0041] A driver's health has a significant impact on driving. Good physical condition can improve driving efficiency, while poor physical condition may lead to problems such as driver fatigue, lack of concentration, and slow reaction time, thereby causing traffic accidents.
[0042] The detection of drivers' health status is mainly based on the drivers' physiological characteristics, such as the drivers' heart rate and blood pressure. It requires the use of contact sensors to obtain relevant parameters, which cannot provide drivers with a seamless monitoring experience.
[0043] The driver health status monitoring method provided in this application uses image recognition to judge the driver's health status based on changes in facial skin color.
[0044] In one embodiment, a method for monitoring driver health status is provided, such as... Figure 1 As shown, it includes the following steps:
[0045] Step 101: Obtain a target image set, wherein each image in the target image set includes at least the driver's facial region, and obtain a first target image and a second target image based on the target image set.
[0046] For example, the target image set can be obtained by an image acquisition module, such as an image recognition device, located at the driver's position in the vehicle. The image recognition device continuously captures images of the driving area and extracts all images containing the driver's facial area as the target image set after the driver enters the cockpit.
[0047] In some implementations, two consecutive frames of images are acquired and used as the first target image and the second target image, respectively.
[0048] Step 102: Statistically analyze the changes in the number of pixels of the same color level in the target region in the first target image and the second target image to obtain the color level change rate. The target region includes the facial region, and the color level change rate includes the first color level change rate corresponding to the facial region.
[0049] As can be illustrated, there may be one or more target regions. In this application, the entire facial region of the driver in the image is used as one of the target regions for analysis. In some embodiments, some feature sub-regions in the facial region may also be used as analysis targets.
[0050] It is understandable that in the target image (first target image or second target image), the outer contour closed curve of the driver's face region can be obtained by algorithms such as color difference boundary and image edge detection, and the dynamic contour and static contour can be compared and reinforced. The area inside the outer contour closed curve is regarded as the driver's face region, and the area outside the closed curve is regarded as the environment region.
[0051] In this embodiment, the color level of each pixel in the facial region is determined based on its brightness. The number of pixels in the first target image and the second target image that are in the same color level is counted and subtracted to obtain the change in the number of pixels in the same color level. In this embodiment, the rate of change of the number of pixels in the same color level is obtained as the color level change rate based on the time interval between two target images. In other embodiments, the proportion of pixels whose color level changes is obtained as the color level change rate based on the total number of pixels in the target region in two target images.
[0052] Step 103: Determine the driver's health status based on the value of the first color level change rate.
[0053] It is understandable that the first color level change rate reflects the degree of change in the brightness of the driver's facial skin. For example, when the first color level change rate exceeds a certain threshold, it is judged that the driver's facial skin has changed significantly, such as becoming pale, and it can be considered that the driver has a health abnormality.
[0054] Compared to wearable health monitoring devices such as wristbands, using the image recognition method described above to acquire health status can achieve non-intrusive monitoring. On the other hand, it has the advantage that the status monitoring results will not be output after the driver leaves the vehicle, which helps to protect the driver's privacy and security.
[0055] On the other hand, compared with contact sensors installed on the steering wheel, seat and other locations, the method provided in this application does not require the driver to keep in contact, will not affect the driver's actions, and is conducive to driving safety.
[0056] In some embodiments, the target image set obtained by the image acquisition module may be a single-channel image, such as a grayscale image, or a multi-channel color image. In a multi-channel color image, the color level of a certain channel may be selectively determined to participate in image recognition, or a combination of color levels of multiple channels may be selected to participate in recognition.
[0057] In one embodiment, the rate of change of the number of pixels at the same color level is obtained as the color level change rate based on the time interval between two frames of the target image. Figure 2 As shown, it includes the following steps:
[0058] Step 201: Based on the decomposition of the first target image, obtain the first single-channel image of the target region in the target channel. Taking the first target image as a color image in RGB space as an example, the color level of the R channel of the image can be selected as a feature value to participate in the calculation to determine the driver's health status. For example, if the color level values of the G channel and B channel in the first target image are both set to 0, a first single-channel image with only the R channel color level value can be obtained.
[0059] Histogram statistics are performed on the color levels of the pixels in the first single-channel image to obtain the first single-channel histogram, as shown below. Figure 3 As shown in Figure a, the first single-channel histogram can be either a frequency histogram or a number histogram. In this embodiment, the first single-channel image uses color level as the horizontal axis and the ratio of the number of pixels in each color level interval to the total number of pixels in the target area (facial area) as the vertical axis.
[0060] On the other hand, based on the decomposition of the second target image, a second single-channel image of the target region under the target channel is obtained, and histogram statistics are performed on the color levels of the pixels in the second single-channel image to obtain a second single-channel histogram, such as... Figure 3 As shown in b.
[0061] Step 202: Based on the comparison between the first single-channel histogram and the second single-channel histogram, obtain the numerical difference of each interval and sum them to obtain the total color level change. For example... Figure 3 The non-overlapping portion of the first and second single-channel histograms shown in Figure c;
[0062] Step 203: Obtain the sampling time interval between the first target image and the second target image, and obtain the color level change rate based on the total color level change and the sampling time interval.
[0063] It is understandable that, within the same time interval, the greater the total change in color gradation and the greater the rate of change in color gradation, the more drastic the change in the driver's facial skin color is, and the greater the possibility of a health abnormality.
[0064] In some embodiments, a multi-channel color image is used as the target image, and the color gradation of each channel is statistically analyzed to identify changes in the driver's skin tone.
[0065] For example, the total color gradation change of the target area, i.e., the facial area, under each target channel is obtained; the single-channel color gradation change rate is obtained based on the total color gradation change of each target channel and the sampling time interval; and the average of the single-channel color gradation change rates under each target channel is used to obtain the color gradation change rate.
[0066] For example, for the R, G, and B channels in the RGB image space, by retaining the color level of one channel and setting the color level values of the other two channels to zero, we can obtain an R channel image with only R channel color level values, a G channel image with only G channel color level values, and a B channel image with only B channel values. Then, we can perform histogram statistics to obtain the R channel histogram, G channel histogram, and B channel histogram.
[0067] The total change in R-channel chromaticity is obtained by summing the differences in the same chromaticity level between the R-channel histograms obtained from the two consecutive target images, and the rate of change in R-channel chromaticity level is obtained based on this.
[0068] The total change in color level of the G channel is obtained by summing the differences in the same color level of the G channel histograms obtained from the two consecutive target images, and the rate of change in color level of the G channel is obtained based on this.
[0069] The total change in B-channel chromaticity is obtained by summing the differences in the same chromaticity level of the B-channel histograms obtained from the two consecutive target images, and the rate of change in B-channel chromaticity level is obtained based on this.
[0070] The final gradation change rate is obtained by averaging the gradation change rates of the R channel, G channel, and B channel.
[0071] The above method performs multi-channel statistics on color images to improve the accuracy of judgment.
[0072] During vehicle operation, the driver's facial lighting environment is affected by external light. In this application, the accuracy of judgment is improved by eliminating the influence of environmental factors.
[0073] In one embodiment, the target region further includes a reference region, which may be an environmental region outside the facial region. It may be the entirety of the environmental region or a part of the environmental region. The reference region may also be a feature region within the facial region.
[0074] This application statistically analyzes the change in the number of pixels of the same color level in the reference region in the first target image and the second target image to obtain the second color level change rate corresponding to the reference region.
[0075] The validity of the first color gradation change rate is determined based on the magnitude of the second color gradation change rate, and the driver's health status is determined based on the valid first color gradation change rate.
[0076] Taking a color image in RGB space as an example, based on the decomposition of the first target image, a first single-channel image of the reference region is obtained. The first single-channel image includes a first R channel image, a first G channel image, and a first B channel image. Furthermore, the first R channel histogram, the first G channel histogram, and the first B channel histogram of the reference region in the first target image are obtained by statistical analysis.
[0077] Based on the decomposition of the second target image, a second single-channel image of the reference region is obtained. The first single-channel image includes a second R-channel image, a second G-channel image, and a second B-channel image. Furthermore, the second R-channel histogram, the second G-channel histogram, and the second B-channel histogram of the reference region in the second target image are obtained by statistical analysis.
[0078] The color level change rate of the reference area's R channel is obtained by summing the differences of the same color levels in the first and second R channel histograms and based on the sampling time interval; the color level change rate of the reference area's G channel is obtained by summing the differences of the same color levels in the first and second G channel histograms and based on the sampling time interval; the color level change rate of the reference area's B channel is obtained by summing the differences of the same color levels in the first and second B channel histograms and based on the sampling time interval; and the color level change rates of the R, G, and B channels are then averaged to obtain the color level change rate of the reference area, i.e., the second color level change rate.
[0079] Understandably, the vehicle system can set an effectiveness threshold. When the second color level change rate is less than the effectiveness threshold, it can be considered that the influence of environmental factors on the first target image and the second target image is low, and the first color level change rate is considered effective. The driver's health status is judged based on the effective first color level change rate and the judgment result is output. Otherwise, no judgment result is output.
[0080] In one embodiment, the color level of each pixel is divided into 0-255, and the color level change rate can be obtained according to the following mathematical expression:
[0081] ,
[0082] in, S is the color gradation rate of the target area, and S is the total number of pixels in the target area. The value of the m-th interval in the second single-channel histogram. is the value of the m-th interval in the first single-channel histogram, where 0≤m≤255 and Δt is the sampling time interval between the first target image and the second target image.
[0083] For example, the first color level change rate of the facial region can be obtained using the following mathematical expression:
[0084] ,
[0085] In the above mathematical expression, That is, the rate of change of the first color level. This represents the value of the m-th interval (color level value m) in the second single-channel histogram corresponding to the facial region. This represents the value of the m-th interval in the first single-channel histogram corresponding to the facial region. This represents the total number of pixels in the facial region.
[0086] Understandably, the target image is divided into a facial region and an environment region. When calculating the facial region, the values of all pixels in the environment region are set to "0", and the values of all pixels in the facial region are set to "1", generating a two-dimensional matrix. The value U(i,j) at pixel (i,j) satisfies the set state. Therefore, the area of the facial region (the total number of pixels in the facial region) is the sum of all pixel values in this matrix, that is:
[0087] ,
[0088] The same method can be used to obtain the total number of pixels corresponding to the reference area and the second color level change rate.
[0089] In one embodiment, the driver's health status can be assessed by comprehensively considering multiple physiological parameters. In actual implementation, when the first color level change rate is greater than a first threshold and less than or equal to a second threshold, it can be considered that the driver's facial area changes little. The driver's second evaluation parameter can be obtained, and the first color level change rate and the second evaluation parameter can be weighted to obtain a comprehensive evaluation value. When the comprehensive evaluation value is greater than or equal to a warning threshold, a warning command is executed. The warning command may be, for example, using other controllers to provide alarm prompts and take measures to avoid driving safety hazards. The second evaluation parameter includes one or more of body temperature and emotional parameters.
[0090] When the rate of change of the first color level is greater than the second threshold, the warning instruction can be executed directly.
[0091] By employing the above strategies, different execution strategies can be used in different situations to improve the accuracy of early warnings.
[0092] It should be understood that, although Figure 1-2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0093] In one embodiment, such as Figure 4 As shown, a driver health status monitoring device is provided, including: an image acquisition module 301, a calculation module 302, and a judgment module 303, wherein:
[0094] Image acquisition module 301 is used to acquire a target image set, wherein each image in the target image set includes at least the driver's facial region, and to acquire a first target image and a second target image based on the target image set;
[0095] The calculation module 302 is used to perform statistical analysis on the change in the number of pixels of the same color level in the target region in the first target image and the second target image to obtain the color level change rate. The target region includes a facial region, and the color level change rate includes the first color level change rate corresponding to the facial region.
[0096] The judgment module 303 is used to judge the driver's health status based on the magnitude of the first color level change rate.
[0097] The driver health status monitoring device described above acquires an image containing the driver's facial area. By statistically analyzing the changes in the number of pixels of the same color level in the facial area of the image, a color level change rate that can represent the changes in the driver's facial skin color is obtained. The driver's health status can be determined by judging the changes in the driver's facial skin color features based on the magnitude of the color level change rate. The method provided in this application does not require the use of contact sensors and can acquire the driver's health status imperceptibly.
[0098] In one embodiment, the target image set acquired by the image acquisition module 301 further includes a reference region. The calculation module 302 is further configured to perform statistical analysis based on the change in the number of pixels of the same color level in the reference region in the first target image and the second target image to obtain the second color level change rate corresponding to the reference region. The judgment module 303 is further configured to determine whether the first color level change rate is valid based on the magnitude of the second color level change rate, so as to determine the driver's health status based on the valid first color level change rate.
[0099] By calculating and comparing the color gradation change rate of the reference area, the effectiveness of the color gradation change rate of the facial area can be determined, thereby improving the effectiveness of health status assessment.
[0100] In one embodiment, the calculation of the color gradation change rate of the facial area and the reference area can be performed by referring to the following steps:
[0101] Based on the decomposition of the first target image, the first single-channel image of the target region under the target channel is obtained, and histogram statistics are performed on the color levels of the pixels of the first single-channel image to obtain the first single-channel histogram.
[0102] Based on the decomposition of the second target image, a second single-channel image of the target region under the target channel is obtained, and histogram statistics are performed on the color levels of the pixels in the second single-channel image to obtain the second single-channel histogram.
[0103] Based on the comparison between the first single-channel histogram and the second single-channel histogram, the numerical difference of each interval is obtained, and the sum is used to obtain the total color level change.
[0104] The sampling time interval between the first target image and the second target image is obtained, and the color level change rate is obtained based on the total color level change and the sampling time interval.
[0105] In another embodiment, the images in the target image set are multi-channel color images, and the total color gradation change of the target region in each target channel can be obtained; the single-channel color gradation change rate is obtained based on the total color gradation change in each target channel and the sampling time interval, and the average of the single-channel color gradation change rates in each target channel is used to obtain the color gradation change rate.
[0106] In one embodiment, the calculation module 302 can obtain the color gradation change rate using the following mathematical expression:
[0107] ,
[0108] in, S is the color gradation rate of the target area, and S is the total number of pixels in the target area. The value of the m-th interval in the second single-channel histogram. is the value of the m-th interval in the first single-channel histogram, where 0≤m≤255, and Δt is the sampling time interval between the first target image and the second target image, wherein the color level of each pixel is divided into 0-255.
[0109] In one embodiment, the judgment module 303 judges the driver's health status based on the magnitude of the first color level change rate, including:
[0110] When the first color gradation change rate is greater than the first threshold and less than or equal to the second threshold, the driver's second evaluation parameter is obtained, and the first color gradation change rate and the second evaluation parameter are weighted to obtain a comprehensive evaluation value. When the comprehensive evaluation value is greater than or equal to the warning threshold, a warning command is executed. The second evaluation parameter includes one or more of body temperature and emotional parameters. When the first color gradation change rate is greater than the second threshold, the warning command is executed.
[0111] Specific limitations regarding the driver health monitoring device can be found in the limitations of the driver health monitoring method described above, and will not be repeated here. Each module in the aforementioned driver health monitoring device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0112] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for monitoring driver health. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0113] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0114] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0115] Step A: Obtain a target image set, wherein each image in the target image set includes at least the driver's face; and obtain a first target image and a second target image based on the target image set.
[0116] Step B: Statistically analyze the changes in the number of pixels of the same color level in the target region in the first target image and the second target image to obtain the color level change rate. The target region includes the facial region, and the color level change rate includes the first color level change rate corresponding to the facial region.
[0117] Step C: Determine the driver's health status based on the magnitude of the first color level change rate.
[0118] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0119] The change rate of the second color level corresponding to the reference area is obtained by statistically analyzing the change in the number of pixels of the same color level in the reference area in the first target image and the second target image.
[0120] The validity of the first color gradation change rate is determined based on the magnitude of the second color gradation change rate, and the driver's health status is determined based on the valid first color gradation change rate.
[0121] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0122] Based on the decomposition of the first target image, a first single-channel image of the target region in the target channel is obtained, and histogram statistics are performed on the color levels of the pixels in the first single-channel image to obtain a first single-channel histogram. Based on the decomposition of the second target image, a second single-channel image of the target region in the target channel is obtained, and histogram statistics are performed on the color levels of the pixels in the second single-channel image to obtain a second single-channel histogram. Based on the comparison between the first single-channel histogram and the second single-channel histogram, the numerical difference of each interval is obtained, and the summation is used to obtain the total color level change. The sampling time interval between the first target image and the second target image is obtained, and the color level change rate is obtained based on the total color level change and the sampling time interval.
[0123] When there are multiple target channels, the total color level change of the target area under each target channel is obtained; the single-channel color level change rate is obtained based on the total color level change under each target channel and the sampling time interval, and the average of the single-channel color level change rates under each target channel is used to obtain the color level change rate.
[0124] When the processor executes the computer program, it obtains the color gradation rate according to the following mathematical expression:
[0125] ,
[0126] in, S is the color gradation rate of the target area, and S is the total number of pixels in the target area. The value of the m-th interval in the second single-channel histogram. is the value of the m-th interval in the first single-channel histogram, where 0≤m≤255, and Δt is the sampling time interval between the first target image and the second target image, wherein the color level of each pixel is divided into 0-255.
[0127] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0128] When the first color gradation change rate is greater than the first threshold and less than or equal to the second threshold, the driver's second evaluation parameter is obtained, and the first color gradation change rate and the second evaluation parameter are weighted to obtain a comprehensive evaluation value. When the comprehensive evaluation value is greater than or equal to the warning threshold, a warning command is executed. The second evaluation parameter includes one or more of body temperature and emotional parameters. When the first color gradation change rate is greater than the second threshold, the warning command is executed.
[0129] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0130] Step A: Obtain a target image set, wherein each image in the target image set includes at least the driver's face; and obtain a first target image and a second target image based on the target image set.
[0131] Step B: Statistically analyze the changes in the number of pixels of the same color level in the target region in the first target image and the second target image to obtain the color level change rate. The target region includes the facial region, and the color level change rate includes the first color level change rate corresponding to the facial region.
[0132] Step C: Determine the driver's health status based on the magnitude of the first color level change rate.
[0133] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0134] The change rate of the second color level corresponding to the reference area is obtained by statistically analyzing the change in the number of pixels of the same color level in the reference area in the first target image and the second target image.
[0135] The validity of the first color gradation change rate is determined based on the magnitude of the second color gradation change rate, and the driver's health status is determined based on the valid first color gradation change rate.
[0136] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0137] Based on the decomposition of the first target image, the first single-channel image of the target region under the target channel is obtained, and histogram statistics are performed on the color levels of the pixels of the first single-channel image to obtain the first single-channel histogram.
[0138] Based on the decomposition of the second target image, a second single-channel image of the target region under the target channel is obtained, and histogram statistics are performed on the color levels of the pixels in the second single-channel image to obtain the second single-channel histogram.
[0139] Based on the comparison between the first single-channel histogram and the second single-channel histogram, the numerical difference of each interval is obtained, and the sum is used to obtain the total color level change.
[0140] The sampling time interval between the first target image and the second target image is obtained, and the color gradation change rate is obtained based on the total color gradation change and the sampling time interval. When there are multiple target channels, the total color gradation change of the target region under each target channel is obtained; the single-channel color gradation change rate is obtained based on the total color gradation change under each target channel and the sampling time interval, and the average of the single-channel color gradation change rates under each target channel is used to obtain the color gradation change rate.
[0141] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0142] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for monitoring the health status of drivers, characterized in that, include: A target image set is obtained, wherein each image in the target image set includes at least the driver's face; a first target image and a second target image are obtained based on the target image set. Based on the first target image and the second target image, the number of pixels of the same color level in the target area is statistically analyzed to obtain the color level change rate. This includes obtaining the first single-channel image of the target area in the target channel based on the decomposition of the first target image, and performing histogram statistics on the color levels of the pixels in the first single-channel image to obtain the first single-channel histogram. Based on the decomposition of the second target image, a second single-channel image of the target region under the target channel is obtained, and histogram statistics are performed on the color levels of the pixels in the second single-channel image to obtain a second single-channel histogram; based on the comparison of the first single-channel histogram and the second single-channel histogram, the numerical difference of each interval is obtained, and the sum is obtained to obtain the total color level change. The sampling time interval between the first target image and the second target image is obtained, and the color level change rate is obtained based on the total color level change and the sampling time interval. The target region includes the facial region, and the color level change rate includes the first color level change rate corresponding to the facial region. The driver's health status is determined based on the magnitude of the first color level change rate, including determining that the driver has a health abnormality when the first color level change rate exceeds a certain threshold.
2. The driver health status monitoring method according to claim 1, characterized in that, The target region further includes a reference region, and the step of obtaining the color level change rate by statistically analyzing the change in the number of pixels of the same color level in the target region in the first target image and the second target image further includes: The change rate of the second color level corresponding to the reference area is obtained by statistically analyzing the change in the number of pixels of the same color level in the reference area in the first target image and the second target image. The validity of the first color gradation change rate is determined based on the magnitude of the second color gradation change rate, and the driver's health status is determined based on the valid first color gradation change rate.
3. The driver health status monitoring method according to claim 1, characterized in that, The step of statistically analyzing the change in the number of pixels of the same color level in the target region of the first target image and the second target image to obtain the color level change rate further includes: When there are multiple target channels, obtain the total color level change of the target region under each target channel; The single-channel color gradation change rate is obtained by calculating the average of the single-channel color gradation change rates for each target channel and the sampling time interval.
4. The driver health status monitoring method according to claim 1, characterized in that, The color level change rate is obtained by statistically analyzing the change in the number of pixels of the same color level in the target region in the first target image and the second target image, including obtaining the color level change rate according to the following mathematical expression: , Where f is the color gradation rate of the target area, and S is the total number of pixels in the target area. The value of the m-th interval in the second single-channel histogram. is the value of the m-th interval in the first single-channel histogram, where 0≤m≤255, and Δt is the sampling time interval between the first target image and the second target image, wherein the color level of each pixel is divided into 0-255.
5. The driver health status monitoring method according to claim 1, characterized in that, The step of determining the driver's health status based on the magnitude of the first color level change rate includes: When the first color level change rate is greater than the first threshold and less than or equal to the second threshold, the driver's second evaluation parameter is obtained, and the first color level change rate and the second evaluation parameter are weighted to obtain a comprehensive evaluation value. When the comprehensive evaluation value is greater than or equal to the warning threshold, a warning command is executed. The second evaluation parameter includes one or more of body temperature and emotional parameters. When the rate of change of the first color level is greater than the second threshold, the warning instruction is executed.
6. The driver health status monitoring method according to claim 2, characterized in that, The step of determining whether the first color level change rate is valid based on the magnitude of the second color level change rate includes: When the change rate of the second color level is less than the validity threshold, the change rate of the first color level is determined to be valid.
7. A driver health status monitoring device, characterized in that, The device includes: An image acquisition module is used to acquire a target image set, wherein each image in the target image set includes at least the driver's facial region, and to acquire a first target image and a second target image based on the target image set; The calculation module is used to statistically analyze the change in the number of pixels of the same color level in the target region in the first target image and the second target image to obtain the color level change rate. This includes: decomposing the first target image to obtain a first single-channel image of the target region in the target channel; performing histogram statistics on the color levels of the pixels in the first single-channel image to obtain a first single-channel histogram; decomposing the second target image to obtain a second single-channel image of the target region in the target channel; performing histogram statistics on the color levels of the pixels in the second single-channel image to obtain a second single-channel histogram; comparing the first single-channel histogram and the second single-channel histogram to obtain the numerical difference between each interval and summing them to obtain the total color level change; obtaining the sampling time interval between the first target image and the second target image; and obtaining the color level change rate based on the total color level change and the sampling time interval. The target region includes a facial region, and the color level change rate includes the first color level change rate corresponding to the facial region. The judgment module is used to judge the driver's health status based on the value of the first color level change rate, including determining that the driver has a health abnormality when the first color level change rate exceeds a certain threshold.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Health analysis method, mobile terminal and computer readable storage medium
CN110909566A
Vital sign monitoring method, device and system and storage medium
CN115299896A