Camera exposure optimization method, apparatus, and medium for monitoring physiological signals
By establishing a model relating exposure time to brightness value, the camera exposure time is dynamically adjusted, which solves the problem of light source variation caused by fixed exposure time. This enables stable monitoring and accurate extraction of physiological signals, improving the detection effect of physiological parameters in vehicle and monitoring scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
- Filing Date
- 2025-11-20
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, fixed camera exposure time cannot be dynamically adjusted, leading to overexposure or underexposure of images due to changes in external light sources, which affects the accurate extraction of physiological signals.
By establishing a model relating exposure time to brightness value, the camera exposure time is dynamically adjusted to compensate for brightness interference from external light sources, and image brightness is optimized to adapt to changes in light sources, thus ensuring accurate extraction of physiological signals.
It enables stable monitoring of physiological signals in environments with changing light sources, improving the accuracy and stability of physiological parameter detection, and significantly enhancing the quality of rPPG signals, especially in vehicle-mounted and monitoring scenarios.
Smart Images

Figure CN121262471B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically to a camera exposure optimization method, device, and medium for monitoring physiological signals. Background Technology
[0002] Images of users are captured by a camera to analyze their physiological signals. However, excessively high or low image brightness can affect the analysis results. Both external light sources and camera exposure time influence image brightness. Current technology uses a fixed camera exposure time to capture user images. However, the light from external sources is constantly changing. Therefore, a fixed camera exposure time cannot dynamically compensate for the influence of external light sources on image brightness. This can lead to overexposure (too high image brightness) or underexposure (too low image brightness) in the captured user images, resulting in the inability to extract accurate physiological signals from the images.
[0003] In conclusion, user images acquired using existing technologies are insufficient to accurately extract user physiological signals.
[0004] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a camera exposure optimization method, device, and medium for monitoring physiological signals, which solves the problem that existing technologies cannot accurately extract user physiological signals from user images.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a camera exposure optimization method for monitoring physiological signals, comprising:
[0008] The system acquires historical user images captured by the camera, as well as the historical exposure duration when the camera captured the historical user images, and determines the historical brightness value of the historical user images. The user was in an external light source environment when the images were captured by the camera.
[0009] Based on the historical exposure duration and the historical brightness value, a model is fitted to fit the relationship between exposure duration and brightness value;
[0010] A target brightness value is set, and the relationship model is applied to the target brightness value to obtain the target exposure time required for the camera to acquire the real-time image of the user. The brightness provided by the camera within the target exposure time is used to compensate for the brightness interference of the external light source on the real-time image of the user. The real-time image of the user is used to monitor the user's physiological signals in real time.
[0011] In one implementation, the historical exposure duration includes a first exposure duration and a second exposure duration, wherein the first exposure duration is related to the highest brightness that the external light source can provide, and the second exposure duration is related to the lowest brightness that the external light source can provide; the user's historical images include a first image captured by the camera using the first exposure duration and a second image captured by the camera using the second exposure duration.
[0012] In one implementation, determining the historical brightness value of the user's historical image includes:
[0013] A face recognition algorithm is applied to the user's historical images to obtain the facial region;
[0014] Several brightness statistics algorithms are applied to the facial region to obtain sub-brightness values of the facial region calculated by each of the several brightness statistics algorithms;
[0015] The historical brightness value is obtained by weighting several of the aforementioned sub-brightness values.
[0016] In one implementation, based on the historical exposure duration and the historical brightness value, a relationship model between exposure duration and brightness value is fitted, including:
[0017] A linear fitting model of exposure duration and brightness value is obtained by fitting the historical exposure duration and the historical brightness value using the least squares method, and the linear fitting model is used as the relationship model.
[0018] In one implementation, setting the target brightness value includes:
[0019] Extract historical face images from the user's historical images;
[0020] A skin color detection algorithm is applied to the historical facial images to obtain the user's facial skin color type;
[0021] Set the target brightness value based on the user's facial skin tone type.
[0022] In one implementation, a target brightness value is set, and the relational model is applied to the target brightness value to obtain the target exposure duration required for the camera to capture a real-time user portrait. The method then further includes:
[0023] The true brightness distribution of the user's real-time image is detected, and overbright areas with true brightness greater than a first threshold and underbright areas with true brightness less than a second threshold are extracted from the user's real-time image, wherein the first threshold is greater than the second threshold.
[0024] The overbright areas are optimized using the areas on the second image corresponding to the overbright areas of the user's real-time image, and the underbright areas are optimized using the areas on the first image corresponding to the underbright areas of the user's real-time image, in order to optimize the brightness of the user's real-time image.
[0025] In one implementation, a target brightness value is set, and the relational model is applied to the target brightness value to obtain the target exposure duration required for the camera to capture the real-time user portrait. This then includes:
[0026] Extract the real-time face region from the user's real-time image;
[0027] Based on the three-channel color data of the real-time face region, the user's remote photoplethysmography signal is obtained;
[0028] Based on the remote photoplethysmography signal, the user's real-time heart rate data is obtained.
[0029] In one implementation, the camera is a vehicle-mounted camera.
[0030] Secondly, embodiments of the present invention also provide a terminal device, wherein the terminal device includes a memory, a processor, and a camera exposure optimization program for monitoring physiological signals stored in the memory and executable on the processor, wherein when the processor executes the camera exposure optimization program for monitoring physiological signals, it implements the steps of the camera exposure optimization method for monitoring physiological signals described above.
[0031] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing a camera exposure optimization program for monitoring physiological signals. When the camera exposure optimization program for monitoring physiological signals is executed by a processor, it implements the steps of the camera exposure optimization method for monitoring physiological signals described above.
[0032] Beneficial Effects: This invention first establishes a relationship model between the historical image brightness value caused by the combined effects of camera exposure and external light source and the historical exposure time of the camera. It then obtains a pre-calculated target brightness value for the image required to extract physiological signals. Next, the aforementioned relationship model is applied to this target brightness value to deduce the target exposure time of the camera required to achieve the target brightness value. The camera is then controlled to acquire real-time images of the user at the target exposure time, resulting in real-time images that display the target brightness value required for physiological signal extraction. The target exposure time calculated by the relationship model of this invention can compensate for the instability of reflected light from human skin caused by the instability of external light sources. Furthermore, the target exposure time of the camera compensates for the influence of the instability of reflected light from the skin on image brightness, enabling the image after brightness adjustment to accurately extract physiological signals. Attached Figure Description
[0033] Figure 1 This is an overall flowchart of the present invention;
[0034] Figure 2 This is a block diagram illustrating the internal structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation
[0035] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0036] Research has found that when using cameras to capture user images for physiological signal analysis, excessively high or low image brightness can affect the analysis results. Both external light sources and camera exposure time influence image brightness. Current technology uses a fixed camera exposure time, but the light from external sources is constantly changing. Therefore, a fixed camera exposure time cannot dynamically compensate for the influence of external light sources on image brightness, potentially leading to overexposure (too high brightness) or underexposure (too low brightness) in the captured user images. Consequently, accurate physiological signals cannot be extracted from the images.
[0037] To address the aforementioned technical problems, this invention provides a camera exposure optimization method, device, and medium for monitoring physiological signals, which solves the problem that existing technologies cannot accurately extract user physiological signals from user images.
[0038] Example 1: This example illustrates a camera exposure optimization method for monitoring physiological signals, which can be applied to a terminal device. The terminal device can be a terminal product with image processing capabilities, such as a computer. In this example, as... Figure 1 As shown, the camera exposure optimization method for monitoring physiological signals specifically includes the following steps:
[0039] S100, acquire the user's historical images captured by the camera, acquire the historical exposure duration when the camera captured the user's historical images, and determine the historical brightness value of the user's historical images. The user was in an external light source environment when the camera captured the images.
[0040] S200, based on the historical exposure duration and the historical brightness value, fit a relationship model between exposure duration and brightness value;
[0041] S300, Set a target brightness value, apply the relationship model to the target brightness value to obtain the target exposure time required for the camera to acquire the real-time image of the user, the brightness provided by the camera within the target exposure time is used to compensate for the brightness interference of the external light source on the real-time image of the user, and the real-time image of the user is used to monitor the user's physiological signals in real time.
[0042] The camera exposure optimization method based on steps S100, S200, and S300 can be used to optimize the exposure time of vehicle-mounted cameras. The specific application process is as follows:
[0043] The process involves acquiring a facial image of the driver (i.e., the user's image) and extracting a remote photoplethysmography (rPPG) signal from it. Based on the rPPG signal, the driver's heart rate (i.e., the user's physiological signal) can be calculated, allowing for monitoring of the driver's cardiovascular status and potential fatigue. However, during vehicle operation, various light sources (i.e., external light sources) illuminating the driver's face affect the brightness of the facial image, which in turn affects the quality of the extracted rPPG signal. Camera exposure time also influences facial image brightness. Therefore, controlling the camera exposure time can mitigate the impact of various light sources on facial image brightness, ultimately enabling the extraction of a high-quality rPPG signal from the facial image. To achieve the above objectives, this invention first fits a relationship model between exposure time and brightness value based on the camera's historical exposure time and the user's historical image brightness values. Since the historical brightness value is the brightness value of the face image generated under the combined effect of camera exposure and external light source, and the external light source can be considered constant for a short period of time, the relationship model can characterize the correspondence between camera exposure time and face image brightness. Therefore, the camera's exposure time can be set to the target exposure time within a short period of time, so that the photons collected by the camera within the target exposure time interact with the photons of the external light source, making the brightness of the face image reach the target brightness value. A face image with the target brightness value can be used to extract a high-quality rPPG signal.
[0044] The reason for establishing a model relating exposure time and brightness value, and then using the brightness value to deduce the exposure time corresponding to the rPPG signal quality through this model, rather than directly establishing a model relating rPPG signal and exposure time, is that obtaining the rPPG signal by processing the image takes a long time. Therefore, it would take a certain amount of time to establish a model relating rPPG signal and exposure time, which would not meet the real-time requirement of the vehicle camera for solving the exposure time. However, the brightness value of the image can be calculated very quickly, thus meeting the real-time requirement of the vehicle camera.
[0045] This invention solves the problem of overexposure or underexposure caused by drastic changes in light in vehicle-mounted scenes by dynamically adjusting the camera exposure time. It keeps the brightness of the acquired facial video within the target range, ensures that the rPPG signal is not lost, and significantly improves the detection accuracy and stability of physiological parameters such as heart rate.
[0046] The camera exposure optimization method based on steps S100, S200, and S300 can also be used to optimize the exposure time of a surveillance camera. The surveillance camera is used to capture facial images of athletes. The rPPG signal is extracted through analysis of the facial images. The heart rate of the athletes is analyzed using the rPPG signal to prevent them from overexerting themselves and endangering their safety. A relationship model between exposure time and image brightness is fitted using the brightness value of the facial images captured by the surveillance camera and the used exposure time. Then, this relationship model is used to inversely calculate the target exposure time corresponding to the target image brightness value required to extract a high-quality rPPG signal. In other words, by controlling the exposure time of the surveillance camera to the target exposure time, a high-quality rPPG signal can be extracted from the real-time user images captured by the surveillance camera.
[0047] In this embodiment, the historical exposure duration in step S100 includes a first exposure duration and a second exposure duration. The number of photons collected by the camera during the first exposure duration is equivalent to the maximum number of photons that the external light source can provide. That is, within the first exposure duration, the brightness provided by the camera is equal to the maximum brightness that the changing external light source can provide. The number of photons collected by the camera during the second exposure duration is equivalent to the minimum number of photons that the external light source can provide. That is, within the second exposure duration, the brightness provided by the camera is equal to the minimum brightness that the changing external light source can provide. In other words, the first and second exposure durations cover all possible light variation ranges in the scene where the external light source is located. Simultaneously, the setting of the first exposure duration must consider the above factors while also taking into account the overexposure phenomenon when the light is too strong, and the setting of the second exposure duration must consider the above factors while also taking into account the underexposure phenomenon when the light is too weak.
[0048] In addition to setting the first and second exposure times using the methods described above, the first and second exposure times can also be preset based on the camera hardware parameters (including the minimum and maximum exposure times) and the user's common lighting environment (such as midday on a sunny day or streetlights at night).
[0049] The user's historical images in step S100 include a first image and a second image of the user under external light source conditions, captured by the camera using a first exposure time and a second exposure time, respectively. This means that the captured image brightness should cover all possible brightness levels, so that the subsequently fitted relationship model can solve for the camera exposure time corresponding to more brightness values.
[0050] In this embodiment, the historical brightness value of the user's historical image is calculated in the following manner: a face recognition algorithm is applied to the user's historical image to obtain a facial region; several brightness statistics algorithms are applied to the facial region to obtain sub-brightness values of the facial region calculated by each of the several brightness statistics algorithms; and the several sub-brightness values are weighted and calculated to obtain the historical brightness value.
[0051] In other words, the camera captures real-time video frames of the user's (who could be the driver) face, and performs face detection and extraction after each frame. Face detection algorithms (such as MTCNN, YuNet, etc.) are used to locate the facial region, eliminating background interference (such as car windows, steering wheel, etc.). To characterize the brightness value within the facial region, methods such as global average, Trimmean (Trimmean represents a trimmed average algorithm), median, and Gaussian weighted average brightness can be used. MTCNN stands for Multi-task Cascaded Convolutional Neural Networks. YuNet represents the algorithm used for face detection.
[0052] In this embodiment, the average brightness of the first image is calculated to form high exposure time sampling data, and the average brightness of the second image is calculated to form low exposure time sampling data. The two sets of sampling data are stored in the historical sampling database to update the relational model in step S200.
[0053] Step S200 includes the following specific steps: using the least squares method to fit a linear fitting model of exposure time and brightness value based on the historical exposure time and the historical brightness value, and using the linear fitting model as the relationship model.
[0054] Model building: ,in The parameter representing the camera's exposure time. The parameter representing the image brightness. Represents an unknown slope. This represents the unknown intercept. The least squares method is applied to historical exposure durations and historical brightness values to solve for... The value and The value will be obtained by solving. The value and Substitute the value Thus, a linear fitting model of exposure time and brightness value was obtained.
[0055] Where calculation The value and The process of obtaining the value is as follows:
[0056] The optimal parameters are solved by minimizing the sum of squared residuals, i.e. .
[0057] Within one cycle, the first frame of an image is acquired first, followed by the second frame. The time between acquiring the first and second frames and the time of acquiring the user's real-time image (i.e., the third frame) constitutes one cycle, which is approximately 22ms. The first image includes all first frames from all cycles, and the second image includes all second frames from all cycles. The first and second images form an image library. This embodiment uses images from multiple cycles to calculate the required parameters. of and The value, that is:
[0058] ;
[0059] ;
[0060] In the formula, This represents the total number of images in the image library. Represents the first in the image library Historical brightness values of the frame image The camera captures the first... The historical exposure duration used for the frame image.
[0061] When the first image includes only the first frame captured within the current period, and the second image also includes only the second frame captured within the current period, that is, only the two frames within the current period satisfy the condition... ,but and The values are as follows:
[0062] ;
[0063] ;
[0064] In the formula, This represents the historical brightness value of the first frame of the image within the current period. This represents the historical brightness value of the second frame image within the current period. This represents the camera's historical exposure duration when acquiring the first frame of the current period. This represents the camera's historical exposure duration when acquiring the second frame image within the current period.
[0065] In this embodiment, step S300 uses the following formula to calculate the target exposure time of the camera. :
[0066] ;
[0067] In the formula, Represents the target brightness value. This represents the target. If calculated using the above formula... If the exposure time is less than the camera's minimum exposure time or greater than the camera's maximum exposure time, then it needs to be... Adjust to the exposure time range formed by the minimum and maximum exposure times.
[0068] The camera in this embodiment is based on the target exposure time in the current cycle. The system acquires real-time user images and stores them in a historical sampling database. Then, it proceeds to the next cycle, repeatedly acquiring images with two different exposure durations. The brightness and exposure duration of these two frames are used to fit a model representing the relationship between brightness and exposure duration for the next cycle. This model is then applied to the target brightness value to determine the target exposure duration for the next cycle. The camera then acquires real-time user images for the next cycle using this target exposure duration. During each loop, the historical sampling database automatically discards old data, retaining only data acquired within a certain timeframe from the current moment. This ensures the fitted model reflects real-time changes in light intensity, enabling dynamic adaptive adjustment. The system stores the third frame image from each cycle, forming a continuous video sequence with suitable brightness for subsequent rPPG signal analysis.
[0069] The steps for setting the target brightness value in this embodiment are as follows: extract historical face images from the user's historical images; apply a skin color detection algorithm to the historical face images to obtain the user's face skin color type; and set the target brightness value based on the user's face skin color type.
[0070] This means adjusting the target brightness value in real time based on the user's facial skin tone. For example, for users with light skin tone (light skin tone is one type of facial skin tone), the target brightness value is reduced to avoid overexposure; for users with dark skin tone (dark skin tone is another type of facial skin tone), the target brightness value is increased to avoid underexposure. The target brightness value is adaptively adjusted through skin tone detection algorithms (such as those based on RGB color space thresholds).
[0071] This embodiment also presets target brightness templates for scenarios such as daytime, nighttime, and tunnels. It uses an ambient light sensor to help determine the scene type and automatically switches the target brightness value to improve scene adaptability.
[0072] This embodiment can also be dynamically adjusted according to the rate of change in light intensity. Value. For example, increase when there are drastic changes in light. value, This represents the total number of images in the image database, improving fitting accuracy; it also reduces [the number of images] under stable lighting conditions. This reduces computational overhead.
[0073] This embodiment can also set a target brightness value based on the correspondence between the brightness value and the signal-to-noise ratio of the rPPG signal, that is, using the brightness value corresponding to the rPPG signal with the highest signal-to-noise ratio as the target brightness value. When the rPPG signal of the face image has the highest signal-to-noise ratio, the image can clearly retain subtle color changes in the facial skin.
[0074] In this embodiment, the first two frames of the user's historical image and the user's real-time image constitute a period. It is assumed that the external light source does not change within the same period. Under this assumption, a relationship model is fitted using the historical brightness values of the first two frames of the user's historical image and the historical exposure time of the camera corresponding to the first two frames of the user's historical image. The target exposure time of the camera required to achieve the target brightness value is calculated through this relationship model. Therefore, the target exposure time is calculated based on the premise that the external light source does not change within the same period. The user's real-time image corresponding to the target exposure time is also obtained based on the premise that the external light source does not change within the same period. However, in reality, even within a period, the external light source will change. This results in the user's real-time image not having the target brightness value required to extract a high-quality rPPG signal. Therefore, it is necessary to optimize the user's real-time image to make its brightness closer to the target brightness value.
[0075] This embodiment optimizes the brightness of a user's real-time image by including the following specific steps: detecting the true brightness distribution of the user's real-time image; extracting overly bright areas where the true brightness is greater than a first threshold and underly bright areas where the true brightness is less than a second threshold from the user's real-time image, wherein the first threshold is greater than the second threshold; optimizing the overly bright areas using the areas on the second frame image corresponding to the overly bright areas of the user's real-time image, and optimizing the underly bright areas using the areas on the first frame image corresponding to the underly bright areas of the user's real-time image, thereby optimizing the brightness of the user's real-time image.
[0076] Since the brightness of the first frame image is relatively high, this brightness can be used to neutralize the dim areas, which are the dim areas on the user's real-time image. Similarly, since the brightness of the second frame image is relatively low, this brightness can be used to neutralize the overly bright areas on the user's real-time image, thereby optimizing the brightness of the user's real-time image and making the optimized brightness closer to the target brightness value.
[0077] After obtaining the third frame image (i.e., the user's real-time image) with appropriate overall brightness, local brightness fusion technology can be introduced to further optimize image quality. This involves setting two brightness thresholds (a high threshold and a low threshold; the high threshold is the first threshold, and the low threshold is the second threshold). For overly bright areas in the third frame exceeding the high threshold (such as areas near car windows exposed to strong sunlight), the corresponding area from the first frame image (generally darker but with less overexposed details) is used to replace the overly bright area, reducing its brightness while preserving its true detail. For overly dark areas below the low threshold, the corresponding area from the second frame image (generally brighter, with visible details in the shadows) is used to supplement the dark area. In this way, while ensuring the overall brightness of the face is close to the target brightness value, the potential interference of local over-brightness or under-brightness on rPPG signal extraction is eliminated, further improving the accuracy of heart rate monitoring.
[0078] Example 2, based on Example 1, analyzes the user's real-time image to obtain an rPPG signal, and then obtains heart rate data based on the rPPG signal. The specific steps include: extracting the real-time face region from the user's real-time image; obtaining the user's remote photoplethysmography (RPG) signal (i.e., the rPPG signal) based on the three-channel color data of the real-time face region; and obtaining the user's real-time heart rate data based on the RPG signal.
[0079] This involves calculating the average RGB color signal of the real-time face region (RGB color refers to three-channel color, where R represents red, G represents green, and B represents blue). A sliding window approach is used to process these color signals: within each window, after preprocessing through normalization and bandpass filtering, the three-channel color signal is converted into a single-channel pulse wave signal using the POS algorithm (Plane-Orthogonal-to-Skin). To improve signal quality, the system selects several local signals with the highest signal-to-noise ratio for averaging and fusion, and uses an overlap-addition technique to smoothly stitch the results from each window into a continuous pulse waveform. Finally, a Fast Fourier Transform is performed on this waveform to find the peak with the highest energy in its spectrum; the frequency corresponding to this peak is the driver's real-time heart rate. Through these signal processing techniques, the rPPG signal is extracted from the video, and physiological parameters such as the driver's heart rate are calculated, providing data support for heart rate monitoring.
[0080] This invention acquires user images by dynamically adjusting the exposure time. The mean absolute error of the heart rate calculated from these images is 4.13, and the signal-to-noise ratio (SNR) of the extracted rPPG signal is 4.61. In contrast, existing technologies use a fixed exposure mode (10ms exposure time) to acquire user images, resulting in a mean absolute error of 36.01 for the calculated heart rate and a SNR of -7.66 for the extracted rPPG signal. Existing technologies use the camera's built-in automatic exposure mode, acquiring user images with this mode. The mean absolute error of the heart rate calculated from these images is 28.68, and the SNR of the extracted rPPG signal is -4.89. These comparative experiments demonstrate that this invention significantly improves upon existing technologies in both the mean absolute error of heart rate prediction and the SNR of the extracted rPPG signal.
[0081] Based on the above embodiments, the present invention also provides a terminal device, the principle block diagram of which can be as follows: Figure 2 As shown, the terminal device includes a processor, memory, network interface, and display screen 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 camera exposure optimization method for monitoring physiological signals. The display screen can be a liquid crystal display (LCD) or an e-ink display.
[0082] Those skilled in the art will understand that Figure 2 The schematic diagram shown is only a partial structural diagram related to the present invention and does not constitute a limitation on the terminal device to which the present invention is applied. The specific terminal device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0083] In one embodiment, a terminal device is provided, comprising a memory, a processor, and a camera exposure optimization program for monitoring physiological signals stored in the memory and executable on the processor. When the processor executes the camera exposure optimization program for monitoring physiological signals, it implements the following operation instructions:
[0084] The system acquires historical user images captured by the camera, as well as the historical exposure duration when the camera captured the historical user images, and determines the historical brightness value of the historical user images. The user was in an external light source environment when the images were captured by the camera.
[0085] Based on the historical exposure duration and the historical brightness value, a model is fitted to fit the relationship between exposure duration and brightness value;
[0086] A target brightness value is set, and the relationship model is applied to the target brightness value to obtain the target exposure time required for the camera to acquire the real-time image of the user. The brightness provided by the camera within the target exposure time is used to compensate for the brightness interference of the external light source on the real-time image of the user. The real-time image of the user is used to monitor the user's physiological signals in real time.
[0087] 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 by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various 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.
[0088] 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for camera exposure optimization for monitoring a physiological signal, characterized in that, include: The system acquires historical user images captured by the camera, as well as the historical exposure duration when the camera captured these historical user images. It also determines the historical brightness values of the historical user images. The user was in an external light source environment when the images were captured by the camera. The historical exposure duration includes a first exposure duration and a second exposure duration. The first exposure duration is related to the highest brightness that the external light source can provide, and the second exposure duration is related to the lowest brightness that the external light source can provide. The historical user images include a first image captured by the camera using the first exposure duration and a second image captured by the camera using the second exposure duration. Based on the historical exposure duration and the historical brightness value, a model is fitted to fit the relationship between exposure duration and brightness value; Extract historical face images from the user's historical images; A skin color detection algorithm is applied to the historical facial images to obtain the user's facial skin color type; Based on the user's facial skin color type, a target brightness value is set. A high-quality rPPG signal can be extracted from a facial image with the target brightness value. The relationship model is applied to the target brightness value to obtain the target exposure time required for the camera to acquire the real-time portrait of the user. The brightness provided by the camera within the target exposure time is used to compensate for the brightness interference of the external light source on the real-time portrait of the user. The real-time portrait of the user is used to monitor the user's physiological signals in real time. The true brightness distribution of the real-time user profile is detected, and overly bright areas with true brightness greater than a first threshold and underly bright areas with true brightness less than a second threshold are extracted from the real-time user profile, wherein the first threshold is greater than the second threshold. The overbright areas are optimized using the areas on the second image corresponding to the overbright areas of the real-time user portrait, and the underbright areas are optimized using the areas on the first image corresponding to the underbright areas of the real-time user portrait, so as to optimize the brightness of the real-time user portrait so that the optimized brightness is close to the target brightness value, thereby eliminating the interference of local overbrightness or underbrightness on rPPG signal extraction. Extract the real-time face region from the user's real-time profile; Based on the three-channel color data of the real-time face region, the user's remote photoplethysmography signal is obtained; Based on the remote photoplethysmography signal, the user's real-time heart rate data is obtained.
2. The camera exposure optimization method for monitoring physiological signals of claim 1, wherein, Determining the historical brightness values of the user's historical images includes: A face recognition algorithm is applied to the user's historical images to obtain the facial region; Several brightness statistics algorithms are applied to the facial region to obtain sub-brightness values of the facial region calculated by each of the several brightness statistics algorithms; The historical brightness value is obtained by weighting several of the aforementioned sub-brightness values.
3. The camera exposure optimization method for monitoring physiological signals of claim 1, wherein, Based on the historical exposure duration and the historical brightness value, a model is fitted to fit the relationship between exposure duration and brightness value, including: A linear fitting model of exposure duration and brightness value is obtained by fitting the historical exposure duration and the historical brightness value using the least squares method, and the linear fitting model is used as the relationship model.
4. The camera exposure optimization method for monitoring a physiological signal according to any one of claims 1-3, characterized in that, The camera in question is a vehicle-mounted camera.
5. A terminal device, characterized by, The terminal device includes a memory, a processor, and a camera exposure optimization program for monitoring physiological signals stored in the memory and executable on the processor. When the processor executes the camera exposure optimization program for monitoring physiological signals, it implements the steps of the camera exposure optimization method for monitoring physiological signals as described in any one of claims 1-4.
6. A computer readable storage medium characterized by, The computer-readable storage medium stores a camera exposure optimization program for monitoring physiological signals. When the camera exposure optimization program for monitoring physiological signals is executed by a processor, it implements the steps of the camera exposure optimization method for monitoring physiological signals as described in any one of claims 1-4.